! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
mousepad: Resetting some of settings after the opening non-utf8 file
Status:
RESOLVED: DUPLICATE
Product:
Mousepad
Component:
General

Comments

Description Mihail Golubchikov 2017-10-15 16:12:23 CEST
Created attachment 7369 
example of non utf8 file

Steps:
1. Open mousepad, enable settings [Ru] "Вид" - "Нумеровать строки", "Документ" - "Перенос слов"  ([En] - somewhere around "View" - "Line numbers", "Document" - "Text wrap"). Write some text to see, that we see line numbers and text automatically wrapped in app window.
2. Open file with non utf-8 coding (example in attachment). When a window with an encoding option appears, "Line numbers" and "Text wrap" settings are reset (you will see no line numbers and text not wrapped in other mousepad app window or if you chooce encoding option to opened file (for this file it "Windows-1251")).
Possible, sime of another mousepad settings are also reset at this moment.

PS. Sorry for my english.
Comment 1 Mihail Golubchikov 2017-10-15 16:15:50 CEST
Created attachment 7370 
[Ru] mousepad window to select encoding to non utf-8 file
Comment 2 Mihail Golubchikov 2017-10-16 10:03:41 CEST
I think, problem in file mousepad-encoding-dialog.c in mousepad_encoding_dialog_init() method:

200.  /* create text view */
201.  dialog->document = mousepad_document_new ();
202.  gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (dialog->document), TRUE, TRUE, 0);
203.  gtk_text_view_set_editable (GTK_TEXT_VIEW (dialog->document->textview), FALSE);
204.  gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (dialog->document->textview), FALSE);
205.  gtk_source_view_set_show_line_numbers (GTK_SOURCE_VIEW (dialog->document->textview), FALSE);
206.  mousepad_view_set_word_wrap (dialog->document->textview, FALSE);
207.  gtk_widget_show (GTK_WIDGET (dialog->document));

In lines 205 & 206 values sets to FALSE in gtk_source_view_set_show_line_numbers & mousepad_view_set_word_wrap.
So it changed user settings.
Comment 3 Andre Miranda editbugs 2017-10-16 14:56:51 CEST
Thanks for looking into this, please check if the patch attached to bug #12298 fixes this problem for you.

*** This bug has been marked as a duplicate of bug 12298 ***

Bug #13926

Reported by:
Mihail Golubchikov
Reported on: 2017-10-15
Last modified on: 2017-10-16

People

Assignee:
Matthew Brush
CC List:
2 users

Version

Target Milestone:
Mousepad 0.2.x

Attachments

example of non utf8 file (58 bytes, text/x-pascal)
2017-10-15 16:12 CEST , Mihail Golubchikov
no flags
[Ru] mousepad window to select encoding to non utf-8 file (24.83 KB, image/png)
2017-10-15 16:15 CEST , Mihail Golubchikov
no flags

Additional information