Added menu item to the document menu to add/remove BOM.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@620 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2006-07-24 20:23:56 +00:00
parent 088880208b
commit e1f79b7d3e
7 changed files with 200 additions and 124 deletions

View File

@ -3,6 +3,8 @@
* src/geany.h, tagmanager/strlist.c, tagmanager/tm_project.c, * src/geany.h, tagmanager/strlist.c, tagmanager/tm_project.c,
tagmanager/parse.c, tagmanager/general.h, tagmanager/ctags.c, tagmanager/parse.c, tagmanager/general.h, tagmanager/ctags.c,
tagmanager/tm_workspace.c: Fixed some cross compiling/Win32 issues. tagmanager/tm_workspace.c: Fixed some cross compiling/Win32 issues.
* geany.glade, src/callbacks.c, src/document.c, src/interface.c,
src/main.c: Added menu item to the document menu to add/remove BOM.
2006-07-24 Nick Treleaven <nick.treleaven@btinternet.com> 2006-07-24 Nick Treleaven <nick.treleaven@btinternet.com>

View File

@ -57,7 +57,7 @@
<property name="use_underline">True</property> <property name="use_underline">True</property>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image881"> <widget class="GtkImage" id="image929">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-new</property> <property name="stock">gtk-new</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -150,7 +150,7 @@
<signal name="activate" handler="on_save_all1_activate" last_modification_time="Thu, 02 Jun 2005 14:15:30 GMT"/> <signal name="activate" handler="on_save_all1_activate" last_modification_time="Thu, 02 Jun 2005 14:15:30 GMT"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image882"> <widget class="GtkImage" id="image930">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-save</property> <property name="stock">gtk-save</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -164,11 +164,55 @@
</child> </child>
<child> <child>
<widget class="GtkImageMenuItem" id="revert1"> <widget class="GtkImageMenuItem" id="menu_reload1">
<property name="visible">True</property> <property name="visible">True</property>
<property name="label">gtk-revert-to-saved</property> <property name="label" translatable="yes">_Reload</property>
<property name="use_stock">True</property> <property name="use_underline">True</property>
<signal name="activate" handler="on_toolbutton23_clicked" last_modification_time="Sun, 18 Dec 2005 22:24:52 GMT"/> <signal name="activate" handler="on_toolbutton23_clicked" last_modification_time="Mon, 24 Jul 2006 19:26:04 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image931">
<property name="visible">True</property>
<property name="stock">gtk-revert-to-saved</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="menu_reload_as1">
<property name="visible">True</property>
<property name="label" translatable="yes">R_eload as</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image932">
<property name="visible">True</property>
<property name="stock">gtk-revert-to-saved</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
<child>
<widget class="GtkMenu" id="menu_reload_as1_menu">
<child>
<widget class="GtkMenuItem" id="invisible7">
<property name="label" translatable="yes">invisible</property>
<property name="use_underline">True</property>
</widget>
</child>
</widget>
</child>
</widget> </widget>
</child> </child>
@ -187,27 +231,6 @@
</widget> </widget>
</child> </child>
<child>
<widget class="GtkMenuItem" id="reload_as1">
<property name="visible">True</property>
<property name="label" translatable="yes">Reload as</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_reload_as_activate" last_modification_time="Fri, 21 Jul 2006 18:00:16 GMT"/>
<child>
<widget class="GtkMenu" id="reload_as1_menu">
<child>
<widget class="GtkMenuItem" id="invisible7">
<property name="label" translatable="yes">invisible</property>
<property name="use_underline">True</property>
</widget>
</child>
</widget>
</child>
</widget>
</child>
<child> <child>
<widget class="GtkSeparatorMenuItem" id="separator24"> <widget class="GtkSeparatorMenuItem" id="separator24">
<property name="visible">True</property> <property name="visible">True</property>
@ -248,7 +271,7 @@
<signal name="activate" handler="on_close_all1_activate" last_modification_time="Thu, 02 Jun 2005 14:15:30 GMT"/> <signal name="activate" handler="on_close_all1_activate" last_modification_time="Thu, 02 Jun 2005 14:15:30 GMT"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image883"> <widget class="GtkImage" id="image933">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-close</property> <property name="stock">gtk-close</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -379,7 +402,7 @@
<property name="use_underline">True</property> <property name="use_underline">True</property>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image884"> <widget class="GtkImage" id="image934">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-add</property> <property name="stock">gtk-add</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -411,7 +434,7 @@
<property name="use_underline">True</property> <property name="use_underline">True</property>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image885"> <widget class="GtkImage" id="image935">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-add</property> <property name="stock">gtk-add</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -589,7 +612,7 @@
<signal name="activate" handler="on_replace1_activate" last_modification_time="Sun, 23 Oct 2005 13:22:36 GMT"/> <signal name="activate" handler="on_replace1_activate" last_modification_time="Sun, 23 Oct 2005 13:22:36 GMT"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image886"> <widget class="GtkImage" id="image936">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-find-and-replace</property> <property name="stock">gtk-find-and-replace</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -631,7 +654,7 @@
<signal name="activate" handler="on_go_to_line1_activate" last_modification_time="Tue, 23 May 2006 17:10:49 GMT"/> <signal name="activate" handler="on_go_to_line1_activate" last_modification_time="Tue, 23 May 2006 17:10:49 GMT"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image887"> <widget class="GtkImage" id="image937">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-jump-to</property> <property name="stock">gtk-jump-to</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -666,7 +689,7 @@
<signal name="activate" handler="on_change_font1_activate" last_modification_time="Fri, 22 Apr 2005 18:58:45 GMT"/> <signal name="activate" handler="on_change_font1_activate" last_modification_time="Fri, 22 Apr 2005 18:58:45 GMT"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image888"> <widget class="GtkImage" id="image938">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-select-font</property> <property name="stock">gtk-select-font</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -688,7 +711,7 @@
<signal name="activate" handler="on_show_color_chooser1_activate" last_modification_time="Wed, 22 Jun 2005 18:10:21 GMT"/> <signal name="activate" handler="on_show_color_chooser1_activate" last_modification_time="Wed, 22 Jun 2005 18:10:21 GMT"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image889"> <widget class="GtkImage" id="image939">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-select-color</property> <property name="stock">gtk-select-color</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -849,6 +872,16 @@
</widget> </widget>
</child> </child>
<child>
<widget class="GtkCheckMenuItem" id="menu_write_unicode_bom1">
<property name="visible">True</property>
<property name="label" translatable="yes">_Write Unicode BOM</property>
<property name="use_underline">True</property>
<property name="active">False</property>
<signal name="toggled" handler="on_menu_write_unicode_bom1_toggled" last_modification_time="Mon, 24 Jul 2006 19:30:07 GMT"/>
</widget>
</child>
<child> <child>
<widget class="GtkSeparatorMenuItem" id="separator10"> <widget class="GtkSeparatorMenuItem" id="separator10">
<property name="visible">True</property> <property name="visible">True</property>

View File

@ -66,9 +66,6 @@ gchar current_word[GEANY_MAX_WORD_LENGTH];
// represents the state while closing all tabs(used to prevent notebook switch page signals) // represents the state while closing all tabs(used to prevent notebook switch page signals)
static gboolean closing_all = FALSE; static gboolean closing_all = FALSE;
// represents the state at switching a notebook page, to update check menu items in document menu
static gboolean switch_notebook_page = FALSE;
// flag to indicate the explicit change of a toggle button of the toolbar menu and so the // flag to indicate the explicit change of a toggle button of the toolbar menu and so the
// toggled callback should ignore the change since it is not triggered by the user // toggled callback should ignore the change since it is not triggered by the user
static gboolean ignore_toolbar_toggle = FALSE; static gboolean ignore_toolbar_toggle = FALSE;
@ -739,7 +736,7 @@ on_notebook1_switch_page (GtkNotebook *notebook,
if (idx >= 0 && app->opening_session_files == FALSE) if (idx >= 0 && app->opening_session_files == FALSE)
{ {
switch_notebook_page = TRUE; app->ignore_callback = TRUE;
gtk_check_menu_item_set_active( gtk_check_menu_item_set_active(
GTK_CHECK_MENU_ITEM(lookup_widget(app->window, "menu_line_breaking1")), GTK_CHECK_MENU_ITEM(lookup_widget(app->window, "menu_line_breaking1")),
doc_list[idx].line_breaking); doc_list[idx].line_breaking);
@ -749,6 +746,12 @@ on_notebook1_switch_page (GtkNotebook *notebook,
gtk_check_menu_item_set_active( gtk_check_menu_item_set_active(
GTK_CHECK_MENU_ITEM(lookup_widget(app->window, "set_file_readonly1")), GTK_CHECK_MENU_ITEM(lookup_widget(app->window, "set_file_readonly1")),
doc_list[idx].readonly); doc_list[idx].readonly);
gtk_check_menu_item_set_active(
GTK_CHECK_MENU_ITEM(lookup_widget(app->window, "menu_write_unicode_bom1")),
doc_list[idx].has_bom);
gtk_widget_set_sensitive(lookup_widget(app->window, "menu_write_unicode_bom1"),
utils_is_unicode_charset(doc_list[idx].encoding));
gtk_tree_model_foreach(GTK_TREE_MODEL(tv.store_openfiles), treeviews_find_node, GINT_TO_POINTER(idx)); gtk_tree_model_foreach(GTK_TREE_MODEL(tv.store_openfiles), treeviews_find_node, GINT_TO_POINTER(idx));
@ -758,7 +761,7 @@ on_notebook1_switch_page (GtkNotebook *notebook,
utils_set_window_title(idx); utils_set_window_title(idx);
utils_update_tag_list(idx, FALSE); utils_update_tag_list(idx, FALSE);
switch_notebook_page = FALSE; app->ignore_callback = FALSE;
} }
} }
@ -1183,7 +1186,7 @@ on_openfiles_tree_selection_changed (GtkTreeSelection *selection,
gint idx = 0; gint idx = 0;
// use switch_notebook_page to ignore changing the notebook page because it is already done // use switch_notebook_page to ignore changing the notebook page because it is already done
if (gtk_tree_selection_get_selected(selection, &model, &iter) && ! switch_notebook_page) if (gtk_tree_selection_get_selected(selection, &model, &iter) && ! app->ignore_callback)
{ {
gtk_tree_model_get(model, &iter, 1, &idx, -1); gtk_tree_model_get(model, &iter, 1, &idx, -1);
gtk_notebook_set_current_page(GTK_NOTEBOOK(app->notebook), gtk_notebook_set_current_page(GTK_NOTEBOOK(app->notebook),
@ -1287,7 +1290,7 @@ void
on_line_breaking1_toggled (GtkCheckMenuItem *checkmenuitem, on_line_breaking1_toggled (GtkCheckMenuItem *checkmenuitem,
gpointer user_data) gpointer user_data)
{ {
if (! switch_notebook_page) if (! app->ignore_callback)
{ {
gint idx = document_get_cur_idx(); gint idx = document_get_cur_idx();
if (idx == -1 || ! doc_list[idx].is_valid) return; if (idx == -1 || ! doc_list[idx].is_valid) return;
@ -1301,7 +1304,7 @@ void
on_set_file_readonly1_toggled (GtkCheckMenuItem *checkmenuitem, on_set_file_readonly1_toggled (GtkCheckMenuItem *checkmenuitem,
gpointer user_data) gpointer user_data)
{ {
if (! switch_notebook_page) if (! app->ignore_callback)
{ {
gint idx = document_get_cur_idx(); gint idx = document_get_cur_idx();
if (idx == -1 || ! doc_list[idx].is_valid) return; if (idx == -1 || ! doc_list[idx].is_valid) return;
@ -1316,7 +1319,7 @@ void
on_use_auto_indention1_toggled (GtkCheckMenuItem *checkmenuitem, on_use_auto_indention1_toggled (GtkCheckMenuItem *checkmenuitem,
gpointer user_data) gpointer user_data)
{ {
if (! switch_notebook_page) if (! app->ignore_callback)
{ {
gint idx = document_get_cur_idx(); gint idx = document_get_cur_idx();
if (idx == -1 || ! doc_list[idx].is_valid) return; if (idx == -1 || ! doc_list[idx].is_valid) return;
@ -2587,6 +2590,8 @@ on_encoding_change (GtkMenuItem *menuitem,
doc_list[idx].changed = TRUE; doc_list[idx].changed = TRUE;
document_set_text_changed(idx); document_set_text_changed(idx);
utils_update_statusbar(idx, -1); utils_update_statusbar(idx, -1);
gtk_widget_set_sensitive(lookup_widget(app->window, "menu_write_unicode_bom1"),
utils_is_unicode_charset(doc_list[idx].encoding));
} }
@ -2649,3 +2654,23 @@ on_menu_show_sidebar1_toggled (GtkCheckMenuItem *checkmenuitem,
} }
utils_treeviews_showhide(TRUE); utils_treeviews_showhide(TRUE);
} }
void
on_menu_write_unicode_bom1_toggled (GtkCheckMenuItem *checkmenuitem,
gpointer user_data)
{
if (! app->ignore_callback)
{
gint idx = document_get_cur_idx();
if (idx == -1 || ! doc_list[idx].is_valid) return;
doc_list[idx].has_bom = ! doc_list[idx].has_bom;
doc_list[idx].changed = TRUE;
document_set_text_changed(idx);
utils_update_statusbar(idx, -1);
}
}

View File

@ -620,3 +620,6 @@ void
on_menu_show_sidebar1_toggled (GtkCheckMenuItem *checkmenuitem, on_menu_show_sidebar1_toggled (GtkCheckMenuItem *checkmenuitem,
gpointer user_data); gpointer user_data);
void
on_menu_write_unicode_bom1_toggled (GtkCheckMenuItem *checkmenuitem,
gpointer user_data);

View File

@ -597,25 +597,28 @@ int document_open_file(gint idx, const gchar *filename, gint pos, gboolean reado
sci_goto_pos(doc_list[idx].sci, pos, TRUE); sci_goto_pos(doc_list[idx].sci, pos, TRUE);
app->ignore_callback = TRUE;
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(
lookup_widget(app->window, "menu_write_unicode_bom1")), doc_list[idx].has_bom);
gtk_widget_set_sensitive(lookup_widget(app->window, "menu_write_unicode_bom1"),
utils_is_unicode_charset(doc_list[idx].encoding));
app->ignore_callback = FALSE;
if (! reload) if (! reload)
{ {
filetype *use_ft = (ft != NULL) ? ft : filetypes_get_from_filename(utf8_filename); filetype *use_ft = (ft != NULL) ? ft : filetypes_get_from_filename(utf8_filename);
if (readonly) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM( app->ignore_callback = TRUE;
lookup_widget(app->window, "set_file_readonly1")), TRUE);
/* This is so ugly, but the checkbox in the file menu can be still checked from a previous gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(lookup_widget(app->window, "set_file_readonly1")),
* read only file, a won't be checked out since notebook-switch-signal is ignored readonly);
* so we need to check it out by hand and this emits the toggled-signal and therefore
* we must set the file to read only and the toggle-callback will set it again to not app->ignore_callback = FALSE;
* read only. It's ugly. Any ideas are welcome. */
else if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM( doc_list[idx].readonly = readonly;
lookup_widget(app->window, "set_file_readonly1")))) sci_set_readonly(doc_list[idx].sci, readonly);
{
doc_list[idx].readonly = TRUE;
sci_set_readonly(doc_list[idx].sci, TRUE);
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(
lookup_widget(app->window, "set_file_readonly1")), FALSE);
}
document_set_filetype(idx, use_ft); document_set_filetype(idx, use_ft);
utils_build_show_hide(idx); utils_build_show_hide(idx);

View File

@ -37,7 +37,7 @@ create_window1 (void)
GtkWidget *menuitem1_menu; GtkWidget *menuitem1_menu;
GtkWidget *menu_new1; GtkWidget *menu_new1;
GtkWidget *menu_new_with_template1; GtkWidget *menu_new_with_template1;
GtkWidget *image956; GtkWidget *image929;
GtkWidget *menu_new_with_template1_menu; GtkWidget *menu_new_with_template1_menu;
GtkWidget *invisible2; GtkWidget *invisible2;
GtkWidget *separator12; GtkWidget *separator12;
@ -49,11 +49,11 @@ create_window1 (void)
GtkWidget *menu_save1; GtkWidget *menu_save1;
GtkWidget *menu_save_as1; GtkWidget *menu_save_as1;
GtkWidget *menu_save_all1; GtkWidget *menu_save_all1;
GtkWidget *image957; GtkWidget *image930;
GtkWidget *menu_reload1; GtkWidget *menu_reload1;
GtkWidget *image958; GtkWidget *image931;
GtkWidget *menu_reload_as1; GtkWidget *menu_reload_as1;
GtkWidget *image959; GtkWidget *image932;
GtkWidget *menu_reload_as1_menu; GtkWidget *menu_reload_as1_menu;
GtkWidget *invisible7; GtkWidget *invisible7;
GtkWidget *separator21; GtkWidget *separator21;
@ -63,7 +63,7 @@ create_window1 (void)
GtkWidget *separator14; GtkWidget *separator14;
GtkWidget *menu_close1; GtkWidget *menu_close1;
GtkWidget *menu_close_all1; GtkWidget *menu_close_all1;
GtkWidget *image960; GtkWidget *image933;
GtkWidget *menu_separatormenuitem1; GtkWidget *menu_separatormenuitem1;
GtkWidget *menu_quit1; GtkWidget *menu_quit1;
GtkWidget *edit1; GtkWidget *edit1;
@ -79,11 +79,11 @@ create_window1 (void)
GtkWidget *menu_select_all1; GtkWidget *menu_select_all1;
GtkWidget *separator25; GtkWidget *separator25;
GtkWidget *insert_include2; GtkWidget *insert_include2;
GtkWidget *image961; GtkWidget *image934;
GtkWidget *insert_include2_menu; GtkWidget *insert_include2_menu;
GtkWidget *invisible4; GtkWidget *invisible4;
GtkWidget *add_comments1; GtkWidget *add_comments1;
GtkWidget *image962; GtkWidget *image935;
GtkWidget *add_comments1_menu; GtkWidget *add_comments1_menu;
GtkWidget *menu_add_changelog_entry1; GtkWidget *menu_add_changelog_entry1;
GtkWidget *insert_file_header1; GtkWidget *insert_file_header1;
@ -104,18 +104,18 @@ create_window1 (void)
GtkWidget *find_next1; GtkWidget *find_next1;
GtkWidget *find_previous1; GtkWidget *find_previous1;
GtkWidget *replace1; GtkWidget *replace1;
GtkWidget *image963; GtkWidget *image936;
GtkWidget *separator27; GtkWidget *separator27;
GtkWidget *find_in_files1; GtkWidget *find_in_files1;
GtkWidget *separator11; GtkWidget *separator11;
GtkWidget *go_to_line1; GtkWidget *go_to_line1;
GtkWidget *image964; GtkWidget *image937;
GtkWidget *menuitem3; GtkWidget *menuitem3;
GtkWidget *menuitem3_menu; GtkWidget *menuitem3_menu;
GtkWidget *menu_change_font1; GtkWidget *menu_change_font1;
GtkWidget *image965; GtkWidget *image938;
GtkWidget *menu_choose_color1; GtkWidget *menu_choose_color1;
GtkWidget *image966; GtkWidget *image939;
GtkWidget *menu_separator4; GtkWidget *menu_separator4;
GtkWidget *menu_fullscreen1; GtkWidget *menu_fullscreen1;
GtkWidget *menu_show_messages_window1; GtkWidget *menu_show_messages_window1;
@ -132,6 +132,7 @@ create_window1 (void)
GtkWidget *menu_line_breaking1; GtkWidget *menu_line_breaking1;
GtkWidget *menu_use_auto_indention1; GtkWidget *menu_use_auto_indention1;
GtkWidget *set_file_readonly1; GtkWidget *set_file_readonly1;
GtkWidget *menu_write_unicode_bom1;
GtkWidget *separator10; GtkWidget *separator10;
GtkWidget *set_filetype1; GtkWidget *set_filetype1;
GtkWidget *set_filetype1_menu; GtkWidget *set_filetype1_menu;
@ -250,9 +251,9 @@ create_window1 (void)
gtk_widget_show (menu_new_with_template1); gtk_widget_show (menu_new_with_template1);
gtk_container_add (GTK_CONTAINER (menuitem1_menu), menu_new_with_template1); gtk_container_add (GTK_CONTAINER (menuitem1_menu), menu_new_with_template1);
image956 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU); image929 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU);
gtk_widget_show (image956); gtk_widget_show (image929);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_new_with_template1), image956); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_new_with_template1), image929);
menu_new_with_template1_menu = gtk_menu_new (); menu_new_with_template1_menu = gtk_menu_new ();
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_new_with_template1), menu_new_with_template1_menu); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_new_with_template1), menu_new_with_template1_menu);
@ -297,27 +298,25 @@ create_window1 (void)
gtk_container_add (GTK_CONTAINER (menuitem1_menu), menu_save_all1); gtk_container_add (GTK_CONTAINER (menuitem1_menu), menu_save_all1);
gtk_tooltips_set_tip (tooltips, menu_save_all1, _("Saves all open files"), NULL); gtk_tooltips_set_tip (tooltips, menu_save_all1, _("Saves all open files"), NULL);
image957 = gtk_image_new_from_stock ("gtk-save", GTK_ICON_SIZE_MENU); image930 = gtk_image_new_from_stock ("gtk-save", GTK_ICON_SIZE_MENU);
gtk_widget_show (image957); gtk_widget_show (image930);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_save_all1), image957); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_save_all1), image930);
menu_reload1 = gtk_image_menu_item_new_with_mnemonic (_("_Reload")); menu_reload1 = gtk_image_menu_item_new_with_mnemonic (_("_Reload"));
gtk_widget_show (menu_reload1); gtk_widget_show (menu_reload1);
gtk_container_add (GTK_CONTAINER (menuitem1_menu), menu_reload1); gtk_container_add (GTK_CONTAINER (menuitem1_menu), menu_reload1);
gtk_tooltips_set_tip (tooltips, menu_reload1, _("Reload the current file from disk"), NULL);
image958 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU); image931 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU);
gtk_widget_show (image958); gtk_widget_show (image931);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload1), image958); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload1), image931);
menu_reload_as1 = gtk_image_menu_item_new_with_mnemonic (_("R_eload as")); menu_reload_as1 = gtk_image_menu_item_new_with_mnemonic (_("R_eload as"));
gtk_widget_show (menu_reload_as1); gtk_widget_show (menu_reload_as1);
gtk_container_add (GTK_CONTAINER (menuitem1_menu), menu_reload_as1); gtk_container_add (GTK_CONTAINER (menuitem1_menu), menu_reload_as1);
gtk_tooltips_set_tip (tooltips, menu_reload_as1, _("Reloads the current file with the specified encoding"), NULL);
image959 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU); image932 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU);
gtk_widget_show (image959); gtk_widget_show (image932);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload_as1), image959); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload_as1), image932);
menu_reload_as1_menu = gtk_menu_new (); menu_reload_as1_menu = gtk_menu_new ();
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_reload_as1), menu_reload_as1_menu); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_reload_as1), menu_reload_as1_menu);
@ -358,9 +357,9 @@ create_window1 (void)
gtk_container_add (GTK_CONTAINER (menuitem1_menu), menu_close_all1); gtk_container_add (GTK_CONTAINER (menuitem1_menu), menu_close_all1);
gtk_tooltips_set_tip (tooltips, menu_close_all1, _("Closes all open files"), NULL); gtk_tooltips_set_tip (tooltips, menu_close_all1, _("Closes all open files"), NULL);
image960 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU); image933 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU);
gtk_widget_show (image960); gtk_widget_show (image933);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_close_all1), image960); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_close_all1), image933);
menu_separatormenuitem1 = gtk_separator_menu_item_new (); menu_separatormenuitem1 = gtk_separator_menu_item_new ();
gtk_widget_show (menu_separatormenuitem1); gtk_widget_show (menu_separatormenuitem1);
@ -426,9 +425,9 @@ create_window1 (void)
gtk_widget_show (insert_include2); gtk_widget_show (insert_include2);
gtk_container_add (GTK_CONTAINER (edit1_menu), insert_include2); gtk_container_add (GTK_CONTAINER (edit1_menu), insert_include2);
image961 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); image934 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
gtk_widget_show (image961); gtk_widget_show (image934);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_include2), image961); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_include2), image934);
insert_include2_menu = gtk_menu_new (); insert_include2_menu = gtk_menu_new ();
gtk_menu_item_set_submenu (GTK_MENU_ITEM (insert_include2), insert_include2_menu); gtk_menu_item_set_submenu (GTK_MENU_ITEM (insert_include2), insert_include2_menu);
@ -440,9 +439,9 @@ create_window1 (void)
gtk_widget_show (add_comments1); gtk_widget_show (add_comments1);
gtk_container_add (GTK_CONTAINER (edit1_menu), add_comments1); gtk_container_add (GTK_CONTAINER (edit1_menu), add_comments1);
image962 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); image935 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
gtk_widget_show (image962); gtk_widget_show (image935);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (add_comments1), image962); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (add_comments1), image935);
add_comments1_menu = gtk_menu_new (); add_comments1_menu = gtk_menu_new ();
gtk_menu_item_set_submenu (GTK_MENU_ITEM (add_comments1), add_comments1_menu); gtk_menu_item_set_submenu (GTK_MENU_ITEM (add_comments1), add_comments1_menu);
@ -529,9 +528,9 @@ create_window1 (void)
gtk_widget_show (replace1); gtk_widget_show (replace1);
gtk_container_add (GTK_CONTAINER (search1_menu), replace1); gtk_container_add (GTK_CONTAINER (search1_menu), replace1);
image963 = gtk_image_new_from_stock ("gtk-find-and-replace", GTK_ICON_SIZE_MENU); image936 = gtk_image_new_from_stock ("gtk-find-and-replace", GTK_ICON_SIZE_MENU);
gtk_widget_show (image963); gtk_widget_show (image936);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (replace1), image963); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (replace1), image936);
separator27 = gtk_separator_menu_item_new (); separator27 = gtk_separator_menu_item_new ();
gtk_widget_show (separator27); gtk_widget_show (separator27);
@ -551,9 +550,9 @@ create_window1 (void)
gtk_widget_show (go_to_line1); gtk_widget_show (go_to_line1);
gtk_container_add (GTK_CONTAINER (search1_menu), go_to_line1); gtk_container_add (GTK_CONTAINER (search1_menu), go_to_line1);
image964 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU); image937 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU);
gtk_widget_show (image964); gtk_widget_show (image937);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (go_to_line1), image964); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (go_to_line1), image937);
menuitem3 = gtk_menu_item_new_with_mnemonic (_("_View")); menuitem3 = gtk_menu_item_new_with_mnemonic (_("_View"));
gtk_widget_show (menuitem3); gtk_widget_show (menuitem3);
@ -567,18 +566,18 @@ create_window1 (void)
gtk_container_add (GTK_CONTAINER (menuitem3_menu), menu_change_font1); gtk_container_add (GTK_CONTAINER (menuitem3_menu), menu_change_font1);
gtk_tooltips_set_tip (tooltips, menu_change_font1, _("Change the default font"), NULL); gtk_tooltips_set_tip (tooltips, menu_change_font1, _("Change the default font"), NULL);
image965 = gtk_image_new_from_stock ("gtk-select-font", GTK_ICON_SIZE_MENU); image938 = gtk_image_new_from_stock ("gtk-select-font", GTK_ICON_SIZE_MENU);
gtk_widget_show (image965); gtk_widget_show (image938);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_change_font1), image965); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_change_font1), image938);
menu_choose_color1 = gtk_image_menu_item_new_with_mnemonic (_("Show _Colour Chooser")); menu_choose_color1 = gtk_image_menu_item_new_with_mnemonic (_("Show _Colour Chooser"));
gtk_widget_show (menu_choose_color1); gtk_widget_show (menu_choose_color1);
gtk_container_add (GTK_CONTAINER (menuitem3_menu), menu_choose_color1); gtk_container_add (GTK_CONTAINER (menuitem3_menu), menu_choose_color1);
gtk_tooltips_set_tip (tooltips, menu_choose_color1, _("Open a color chooser dialog, to interactively pick colors from a palette."), NULL); gtk_tooltips_set_tip (tooltips, menu_choose_color1, _("Open a color chooser dialog, to interactively pick colors from a palette."), NULL);
image966 = gtk_image_new_from_stock ("gtk-select-color", GTK_ICON_SIZE_MENU); image939 = gtk_image_new_from_stock ("gtk-select-color", GTK_ICON_SIZE_MENU);
gtk_widget_show (image966); gtk_widget_show (image939);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_choose_color1), image966); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_choose_color1), image939);
menu_separator4 = gtk_separator_menu_item_new (); menu_separator4 = gtk_separator_menu_item_new ();
gtk_widget_show (menu_separator4); gtk_widget_show (menu_separator4);
@ -658,6 +657,10 @@ create_window1 (void)
gtk_container_add (GTK_CONTAINER (menu_item4_menu), set_file_readonly1); gtk_container_add (GTK_CONTAINER (menu_item4_menu), set_file_readonly1);
gtk_tooltips_set_tip (tooltips, set_file_readonly1, _("Treat this file as read-only. No changes can be made."), NULL); gtk_tooltips_set_tip (tooltips, set_file_readonly1, _("Treat this file as read-only. No changes can be made."), NULL);
menu_write_unicode_bom1 = gtk_check_menu_item_new_with_mnemonic (_("_Write Unicode BOM"));
gtk_widget_show (menu_write_unicode_bom1);
gtk_container_add (GTK_CONTAINER (menu_item4_menu), menu_write_unicode_bom1);
separator10 = gtk_separator_menu_item_new (); separator10 = gtk_separator_menu_item_new ();
gtk_widget_show (separator10); gtk_widget_show (separator10);
gtk_container_add (GTK_CONTAINER (menu_item4_menu), separator10); gtk_container_add (GTK_CONTAINER (menu_item4_menu), separator10);
@ -1185,6 +1188,9 @@ create_window1 (void)
g_signal_connect ((gpointer) set_file_readonly1, "toggled", g_signal_connect ((gpointer) set_file_readonly1, "toggled",
G_CALLBACK (on_set_file_readonly1_toggled), G_CALLBACK (on_set_file_readonly1_toggled),
NULL); NULL);
g_signal_connect ((gpointer) menu_write_unicode_bom1, "toggled",
G_CALLBACK (on_menu_write_unicode_bom1_toggled),
NULL);
g_signal_connect ((gpointer) crlf, "activate", g_signal_connect ((gpointer) crlf, "activate",
G_CALLBACK (on_crlf_activate), G_CALLBACK (on_crlf_activate),
NULL); NULL);
@ -1297,7 +1303,7 @@ create_window1 (void)
GLADE_HOOKUP_OBJECT (window1, menuitem1_menu, "menuitem1_menu"); GLADE_HOOKUP_OBJECT (window1, menuitem1_menu, "menuitem1_menu");
GLADE_HOOKUP_OBJECT (window1, menu_new1, "menu_new1"); GLADE_HOOKUP_OBJECT (window1, menu_new1, "menu_new1");
GLADE_HOOKUP_OBJECT (window1, menu_new_with_template1, "menu_new_with_template1"); GLADE_HOOKUP_OBJECT (window1, menu_new_with_template1, "menu_new_with_template1");
GLADE_HOOKUP_OBJECT (window1, image956, "image956"); GLADE_HOOKUP_OBJECT (window1, image929, "image929");
GLADE_HOOKUP_OBJECT (window1, menu_new_with_template1_menu, "menu_new_with_template1_menu"); GLADE_HOOKUP_OBJECT (window1, menu_new_with_template1_menu, "menu_new_with_template1_menu");
GLADE_HOOKUP_OBJECT (window1, invisible2, "invisible2"); GLADE_HOOKUP_OBJECT (window1, invisible2, "invisible2");
GLADE_HOOKUP_OBJECT (window1, separator12, "separator12"); GLADE_HOOKUP_OBJECT (window1, separator12, "separator12");
@ -1309,11 +1315,11 @@ create_window1 (void)
GLADE_HOOKUP_OBJECT (window1, menu_save1, "menu_save1"); GLADE_HOOKUP_OBJECT (window1, menu_save1, "menu_save1");
GLADE_HOOKUP_OBJECT (window1, menu_save_as1, "menu_save_as1"); GLADE_HOOKUP_OBJECT (window1, menu_save_as1, "menu_save_as1");
GLADE_HOOKUP_OBJECT (window1, menu_save_all1, "menu_save_all1"); GLADE_HOOKUP_OBJECT (window1, menu_save_all1, "menu_save_all1");
GLADE_HOOKUP_OBJECT (window1, image957, "image957"); GLADE_HOOKUP_OBJECT (window1, image930, "image930");
GLADE_HOOKUP_OBJECT (window1, menu_reload1, "menu_reload1"); GLADE_HOOKUP_OBJECT (window1, menu_reload1, "menu_reload1");
GLADE_HOOKUP_OBJECT (window1, image958, "image958"); GLADE_HOOKUP_OBJECT (window1, image931, "image931");
GLADE_HOOKUP_OBJECT (window1, menu_reload_as1, "menu_reload_as1"); GLADE_HOOKUP_OBJECT (window1, menu_reload_as1, "menu_reload_as1");
GLADE_HOOKUP_OBJECT (window1, image959, "image959"); GLADE_HOOKUP_OBJECT (window1, image932, "image932");
GLADE_HOOKUP_OBJECT (window1, menu_reload_as1_menu, "menu_reload_as1_menu"); GLADE_HOOKUP_OBJECT (window1, menu_reload_as1_menu, "menu_reload_as1_menu");
GLADE_HOOKUP_OBJECT (window1, invisible7, "invisible7"); GLADE_HOOKUP_OBJECT (window1, invisible7, "invisible7");
GLADE_HOOKUP_OBJECT (window1, separator21, "separator21"); GLADE_HOOKUP_OBJECT (window1, separator21, "separator21");
@ -1323,7 +1329,7 @@ create_window1 (void)
GLADE_HOOKUP_OBJECT (window1, separator14, "separator14"); GLADE_HOOKUP_OBJECT (window1, separator14, "separator14");
GLADE_HOOKUP_OBJECT (window1, menu_close1, "menu_close1"); GLADE_HOOKUP_OBJECT (window1, menu_close1, "menu_close1");
GLADE_HOOKUP_OBJECT (window1, menu_close_all1, "menu_close_all1"); GLADE_HOOKUP_OBJECT (window1, menu_close_all1, "menu_close_all1");
GLADE_HOOKUP_OBJECT (window1, image960, "image960"); GLADE_HOOKUP_OBJECT (window1, image933, "image933");
GLADE_HOOKUP_OBJECT (window1, menu_separatormenuitem1, "menu_separatormenuitem1"); GLADE_HOOKUP_OBJECT (window1, menu_separatormenuitem1, "menu_separatormenuitem1");
GLADE_HOOKUP_OBJECT (window1, menu_quit1, "menu_quit1"); GLADE_HOOKUP_OBJECT (window1, menu_quit1, "menu_quit1");
GLADE_HOOKUP_OBJECT (window1, edit1, "edit1"); GLADE_HOOKUP_OBJECT (window1, edit1, "edit1");
@ -1339,11 +1345,11 @@ create_window1 (void)
GLADE_HOOKUP_OBJECT (window1, menu_select_all1, "menu_select_all1"); GLADE_HOOKUP_OBJECT (window1, menu_select_all1, "menu_select_all1");
GLADE_HOOKUP_OBJECT (window1, separator25, "separator25"); GLADE_HOOKUP_OBJECT (window1, separator25, "separator25");
GLADE_HOOKUP_OBJECT (window1, insert_include2, "insert_include2"); GLADE_HOOKUP_OBJECT (window1, insert_include2, "insert_include2");
GLADE_HOOKUP_OBJECT (window1, image961, "image961"); GLADE_HOOKUP_OBJECT (window1, image934, "image934");
GLADE_HOOKUP_OBJECT (window1, insert_include2_menu, "insert_include2_menu"); GLADE_HOOKUP_OBJECT (window1, insert_include2_menu, "insert_include2_menu");
GLADE_HOOKUP_OBJECT (window1, invisible4, "invisible4"); GLADE_HOOKUP_OBJECT (window1, invisible4, "invisible4");
GLADE_HOOKUP_OBJECT (window1, add_comments1, "add_comments1"); GLADE_HOOKUP_OBJECT (window1, add_comments1, "add_comments1");
GLADE_HOOKUP_OBJECT (window1, image962, "image962"); GLADE_HOOKUP_OBJECT (window1, image935, "image935");
GLADE_HOOKUP_OBJECT (window1, add_comments1_menu, "add_comments1_menu"); GLADE_HOOKUP_OBJECT (window1, add_comments1_menu, "add_comments1_menu");
GLADE_HOOKUP_OBJECT (window1, menu_add_changelog_entry1, "menu_add_changelog_entry1"); GLADE_HOOKUP_OBJECT (window1, menu_add_changelog_entry1, "menu_add_changelog_entry1");
GLADE_HOOKUP_OBJECT (window1, insert_file_header1, "insert_file_header1"); GLADE_HOOKUP_OBJECT (window1, insert_file_header1, "insert_file_header1");
@ -1364,18 +1370,18 @@ create_window1 (void)
GLADE_HOOKUP_OBJECT (window1, find_next1, "find_next1"); GLADE_HOOKUP_OBJECT (window1, find_next1, "find_next1");
GLADE_HOOKUP_OBJECT (window1, find_previous1, "find_previous1"); GLADE_HOOKUP_OBJECT (window1, find_previous1, "find_previous1");
GLADE_HOOKUP_OBJECT (window1, replace1, "replace1"); GLADE_HOOKUP_OBJECT (window1, replace1, "replace1");
GLADE_HOOKUP_OBJECT (window1, image963, "image963"); GLADE_HOOKUP_OBJECT (window1, image936, "image936");
GLADE_HOOKUP_OBJECT (window1, separator27, "separator27"); GLADE_HOOKUP_OBJECT (window1, separator27, "separator27");
GLADE_HOOKUP_OBJECT (window1, find_in_files1, "find_in_files1"); GLADE_HOOKUP_OBJECT (window1, find_in_files1, "find_in_files1");
GLADE_HOOKUP_OBJECT (window1, separator11, "separator11"); GLADE_HOOKUP_OBJECT (window1, separator11, "separator11");
GLADE_HOOKUP_OBJECT (window1, go_to_line1, "go_to_line1"); GLADE_HOOKUP_OBJECT (window1, go_to_line1, "go_to_line1");
GLADE_HOOKUP_OBJECT (window1, image964, "image964"); GLADE_HOOKUP_OBJECT (window1, image937, "image937");
GLADE_HOOKUP_OBJECT (window1, menuitem3, "menuitem3"); GLADE_HOOKUP_OBJECT (window1, menuitem3, "menuitem3");
GLADE_HOOKUP_OBJECT (window1, menuitem3_menu, "menuitem3_menu"); GLADE_HOOKUP_OBJECT (window1, menuitem3_menu, "menuitem3_menu");
GLADE_HOOKUP_OBJECT (window1, menu_change_font1, "menu_change_font1"); GLADE_HOOKUP_OBJECT (window1, menu_change_font1, "menu_change_font1");
GLADE_HOOKUP_OBJECT (window1, image965, "image965"); GLADE_HOOKUP_OBJECT (window1, image938, "image938");
GLADE_HOOKUP_OBJECT (window1, menu_choose_color1, "menu_choose_color1"); GLADE_HOOKUP_OBJECT (window1, menu_choose_color1, "menu_choose_color1");
GLADE_HOOKUP_OBJECT (window1, image966, "image966"); GLADE_HOOKUP_OBJECT (window1, image939, "image939");
GLADE_HOOKUP_OBJECT (window1, menu_separator4, "menu_separator4"); GLADE_HOOKUP_OBJECT (window1, menu_separator4, "menu_separator4");
GLADE_HOOKUP_OBJECT (window1, menu_fullscreen1, "menu_fullscreen1"); GLADE_HOOKUP_OBJECT (window1, menu_fullscreen1, "menu_fullscreen1");
GLADE_HOOKUP_OBJECT (window1, menu_show_messages_window1, "menu_show_messages_window1"); GLADE_HOOKUP_OBJECT (window1, menu_show_messages_window1, "menu_show_messages_window1");
@ -1392,6 +1398,7 @@ create_window1 (void)
GLADE_HOOKUP_OBJECT (window1, menu_line_breaking1, "menu_line_breaking1"); GLADE_HOOKUP_OBJECT (window1, menu_line_breaking1, "menu_line_breaking1");
GLADE_HOOKUP_OBJECT (window1, menu_use_auto_indention1, "menu_use_auto_indention1"); GLADE_HOOKUP_OBJECT (window1, menu_use_auto_indention1, "menu_use_auto_indention1");
GLADE_HOOKUP_OBJECT (window1, set_file_readonly1, "set_file_readonly1"); GLADE_HOOKUP_OBJECT (window1, set_file_readonly1, "set_file_readonly1");
GLADE_HOOKUP_OBJECT (window1, menu_write_unicode_bom1, "menu_write_unicode_bom1");
GLADE_HOOKUP_OBJECT (window1, separator10, "separator10"); GLADE_HOOKUP_OBJECT (window1, separator10, "separator10");
GLADE_HOOKUP_OBJECT (window1, set_filetype1, "set_filetype1"); GLADE_HOOKUP_OBJECT (window1, set_filetype1, "set_filetype1");
GLADE_HOOKUP_OBJECT (window1, set_filetype1_menu, "set_filetype1_menu"); GLADE_HOOKUP_OBJECT (window1, set_filetype1_menu, "set_filetype1_menu");

View File

@ -181,10 +181,12 @@ static void apply_settings(void)
gtk_window_set_default_size(GTK_WINDOW(app->window), app->geometry[2], app->geometry[3]); gtk_window_set_default_size(GTK_WINDOW(app->window), app->geometry[2], app->geometry[3]);
} }
g_object_set(G_OBJECT(lookup_widget(app->window, "menu_line_breaking1")), "active", app->ignore_callback = TRUE;
GINT_TO_POINTER(app->pref_editor_line_breaking), NULL); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(
g_object_set(G_OBJECT(lookup_widget(app->window, "menu_use_auto_indention1")), "active", lookup_widget(app->window, "menu_line_breaking1")), app->pref_editor_line_breaking);
GINT_TO_POINTER(app->pref_editor_use_auto_indention), NULL); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(
lookup_widget(app->window, "menu_use_auto_indention1")), app->pref_editor_use_auto_indention);
app->ignore_callback = FALSE;
gtk_menu_tool_button_set_menu(GTK_MENU_TOOL_BUTTON( gtk_menu_tool_button_set_menu(GTK_MENU_TOOL_BUTTON(
lookup_widget(app->window, "menutoolbutton1")), app->new_file_menu); lookup_widget(app->window, "menutoolbutton1")), app->new_file_menu);
@ -227,6 +229,7 @@ static void main_init(void)
app->main_window_realized= FALSE; app->main_window_realized= FALSE;
app->tab_order_ltr = FALSE; app->tab_order_ltr = FALSE;
app->quitting = FALSE; app->quitting = FALSE;
app->ignore_callback = FALSE;
#ifdef HAVE_FIFO #ifdef HAVE_FIFO
app->ignore_fifo = ignore_fifo; app->ignore_fifo = ignore_fifo;
#endif #endif
@ -613,11 +616,11 @@ gint main(gint argc, gchar **argv)
configuration_apply_settings(); configuration_apply_settings();
dialogs_show_info( dialogs_show_info( // will be removed soon
"Please use this SVN version not for production use!\nWe added recently some experimental features which" "Please use this SVN version not for production use!\nWe added recently some experimental features which"
" can really damage your files when saving or make cofusing things with your file when opening.\n" " can really damage your files when saving or make cofusing things with your file when opening.\n"
"Read the mailing list for more information. I'm very sorry, please be patient.\n\n" "Read the mailing list for more information. I'm very sorry, please be patient.\nThis dialog "
"(to disable this message, edit src/main.c at line 616)."); "will be removed soon.\n\n(to disable this message, edit src/main.c at line %d).", __LINE__ - 4);
//g_timeout_add(0, (GSourceFunc)destroyapp, NULL); // useful for start time tests //g_timeout_add(0, (GSourceFunc)destroyapp, NULL); // useful for start time tests
gtk_main(); gtk_main();