Fixed wrong insert position when the cursor was moved by keyboard and comments, includes or a date was inserted.

Also fixed some segfault when inserting comments, dates and includes at a position prior to some deleted text.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1112 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2006-12-17 19:31:32 +00:00
parent 6d3cacaccb
commit 33e1f7e8d0
6 changed files with 177 additions and 93 deletions

View File

@ -2,6 +2,12 @@
* geany.glade, src/interface.c: * geany.glade, src/interface.c:
Made the sidebar notebook tabs scrollable. Made the sidebar notebook tabs scrollable.
* geany.glade, src/callbacks.c, src/callbacks.h, src/interface.c,
src/ui_utils.c:
Fixed wrong insert position when the cursor was moved by keyboard
and comments, includes or a date was inserted.
Also fixed some segfault when inserting comments, dates and includes
at a position prior to some deleted text.
2006-12-17 Nick Treleaven <nick.treleaven@btinternet.com> 2006-12-17 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="image1319"> <widget class="GtkImage" id="image1331">
<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>
@ -138,7 +138,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="image1320"> <widget class="GtkImage" id="image1332">
<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>
@ -159,7 +159,7 @@
<signal name="activate" handler="on_toolbutton23_clicked" last_modification_time="Mon, 24 Jul 2006 19:26:04 GMT"/> <signal name="activate" handler="on_toolbutton23_clicked" last_modification_time="Mon, 24 Jul 2006 19:26:04 GMT"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image1321"> <widget class="GtkImage" id="image1333">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-revert-to-saved</property> <property name="stock">gtk-revert-to-saved</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -179,7 +179,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="image1322"> <widget class="GtkImage" id="image1334">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-revert-to-saved</property> <property name="stock">gtk-revert-to-saved</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -259,7 +259,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="image1323"> <widget class="GtkImage" id="image1335">
<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>
@ -467,7 +467,7 @@
<signal name="activate" handler="on_menu_increase_indent1_activate" last_modification_time="Tue, 01 Aug 2006 10:28:54 GMT"/> <signal name="activate" handler="on_menu_increase_indent1_activate" last_modification_time="Tue, 01 Aug 2006 10:28:54 GMT"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image1324"> <widget class="GtkImage" id="image1336">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-indent</property> <property name="stock">gtk-indent</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -488,7 +488,7 @@
<signal name="activate" handler="on_menu_decrease_indent1_activate" last_modification_time="Tue, 01 Aug 2006 10:28:54 GMT"/> <signal name="activate" handler="on_menu_decrease_indent1_activate" last_modification_time="Tue, 01 Aug 2006 10:28:54 GMT"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image1325"> <widget class="GtkImage" id="image1337">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-unindent</property> <property name="stock">gtk-unindent</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -518,7 +518,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="image1326"> <widget class="GtkImage" id="image1338">
<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>
@ -550,7 +550,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="image1327"> <widget class="GtkImage" id="image1339">
<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>
@ -600,7 +600,7 @@
<property name="tooltip" translatable="yes">Inserts a multiline comment</property> <property name="tooltip" translatable="yes">Inserts a multiline comment</property>
<property name="label" translatable="yes">Insert Multiline Comment</property> <property name="label" translatable="yes">Insert Multiline Comment</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<signal name="activate" handler="on_comments_multiline_activate" last_modification_time="Sat, 01 Oct 2005 17:35:15 GMT"/> <signal name="activate" handler="on_menu_comments_multiline_activate" last_modification_time="Sun, 17 Dec 2006 19:01:32 GMT"/>
</widget> </widget>
</child> </child>
@ -610,7 +610,7 @@
<property name="tooltip" translatable="yes">Inserts a GPL notice (should be done at the beginning of the file)</property> <property name="tooltip" translatable="yes">Inserts a GPL notice (should be done at the beginning of the file)</property>
<property name="label" translatable="yes">Insert GPL Notice</property> <property name="label" translatable="yes">Insert GPL Notice</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<signal name="activate" handler="on_comments_gpl_activate" last_modification_time="Sun, 02 Oct 2005 17:37:43 GMT"/> <signal name="activate" handler="on_menu_comments_gpl_activate" last_modification_time="Sun, 17 Dec 2006 19:01:32 GMT"/>
</widget> </widget>
</child> </child>
</widget> </widget>
@ -710,7 +710,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="image1328"> <widget class="GtkImage" id="image1340">
<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>
@ -752,7 +752,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="image1329"> <widget class="GtkImage" id="image1341">
<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>
@ -787,7 +787,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="image1330"> <widget class="GtkImage" id="image1342">
<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>
@ -1137,7 +1137,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="image1331"> <widget class="GtkImage" id="image1343">
<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>

View File

@ -69,6 +69,11 @@ static gboolean closing_all = FALSE;
// 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;
// flag to indicate that an insert callback was triggered from the file menu,
// so we need to store the current cursor position in editor_info.click_pos.
/// TODO rename me
static gboolean insert_callback_from_menu = FALSE;
// represents the state at switching a notebook page(in the left treeviews widget), to not emit // represents the state at switching a notebook page(in the left treeviews widget), to not emit
// the selection-changed signal from tv.tree_openfiles // the selection-changed signal from tv.tree_openfiles
//static gboolean switch_tv_notebook_page = FALSE; //static gboolean switch_tv_notebook_page = FALSE;
@ -116,6 +121,18 @@ static gboolean account_for_unsaved()
} }
// set editor_info.click_pos to the current cursor position if insert_callback_from_menu is TRUE
// to prevent invalid cursor positions which can cause segfaults
static void verify_click_pos(gint idx)
{
if (insert_callback_from_menu)
{
editor_info.click_pos = sci_get_current_position(doc_list[idx].sci);
insert_callback_from_menu = FALSE;
}
}
// should only be called from on_exit_clicked // should only be called from on_exit_clicked
static void quit_app() static void quit_app()
{ {
@ -1489,6 +1506,8 @@ on_comments_multiline_activate (GtkMenuItem *menuitem,
} }
} }
verify_click_pos(idx); // make sure that the click_pos is valid
sci_insert_text(doc_list[idx].sci, editor_info.click_pos, text); sci_insert_text(doc_list[idx].sci, editor_info.click_pos, text);
g_free(text); g_free(text);
} }
@ -1503,6 +1522,8 @@ on_comments_gpl_activate (GtkMenuItem *menuitem,
text = templates_get_template_gpl(FILETYPE_ID(doc_list[idx].file_type)); text = templates_get_template_gpl(FILETYPE_ID(doc_list[idx].file_type));
verify_click_pos(idx); // make sure that the click_pos is valid
sci_insert_text(doc_list[idx].sci, editor_info.click_pos, text); sci_insert_text(doc_list[idx].sci, editor_info.click_pos, text);
g_free(text); g_free(text);
} }
@ -1611,7 +1632,8 @@ on_insert_date_activate (GtkMenuItem *menuitem,
tm = localtime(&t); tm = localtime(&t);
if (strftime(time_str, sizeof time_str, format, tm) != 0) if (strftime(time_str, sizeof time_str, format, tm) != 0)
{ {
/// FIXME inserts at wrong position if not clicked and the cursor was moved by keyboard verify_click_pos(idx); // make sure that the click_pos is valid
sci_insert_text(doc_list[idx].sci, editor_info.click_pos, time_str); sci_insert_text(doc_list[idx].sci, editor_info.click_pos, time_str);
} }
else else
@ -1627,9 +1649,14 @@ void
on_insert_include_activate (GtkMenuItem *menuitem, on_insert_include_activate (GtkMenuItem *menuitem,
gpointer user_data) gpointer user_data)
{ {
gint idx = document_get_cur_idx(), pos = -1; gint idx = document_get_cur_idx();
gint pos = -1;
gchar *text; gchar *text;
if (! DOC_IDX_VALID(idx) || user_data == NULL) return;
verify_click_pos(idx); // make sure that the click_pos is valid
if (utils_str_equal(user_data, "blank")) if (utils_str_equal(user_data, "blank"))
{ {
text = g_strdup("#include \"\"\n"); text = g_strdup("#include \"\"\n");
@ -1640,10 +1667,10 @@ on_insert_include_activate (GtkMenuItem *menuitem,
text = g_strconcat("#include <", user_data, ">\n", NULL); text = g_strconcat("#include <", user_data, ">\n", NULL);
} }
/// FIXME inserts at wrong position if not clicked and the cursor was moved by keyboard
sci_insert_text(doc_list[idx].sci, editor_info.click_pos, text); sci_insert_text(doc_list[idx].sci, editor_info.click_pos, text);
g_free(text); g_free(text);
if (pos > 0) sci_goto_pos(doc_list[idx].sci, pos, FALSE); if (pos >= 0)
sci_goto_pos(doc_list[idx].sci, pos, FALSE);
} }
@ -2012,3 +2039,38 @@ on_menu_insert_special_chars1_activate (GtkMenuItem *menuitem,
tools_show_dialog_insert_special_chars(); tools_show_dialog_insert_special_chars();
} }
void
on_menu_comments_multiline_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
insert_callback_from_menu = TRUE;
on_comments_multiline_activate(menuitem, user_data);
}
void
on_menu_comments_gpl_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
insert_callback_from_menu = TRUE;
on_comments_gpl_activate(menuitem, user_data);
}
void
on_menu_insert_include_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
insert_callback_from_menu = TRUE;
on_insert_include_activate(menuitem, user_data);
}
void
on_menu_insert_date_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
insert_callback_from_menu = TRUE;
on_insert_date_activate(menuitem, user_data);
}

View File

@ -546,3 +546,19 @@ on_next_message1_activate (GtkMenuItem *menuitem,
void void
on_menu_insert_special_chars1_activate (GtkMenuItem *menuitem, on_menu_insert_special_chars1_activate (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void
on_menu_comments_multiline_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_menu_comments_gpl_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_menu_insert_include_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_menu_insert_date_activate (GtkMenuItem *menuitem,
gpointer user_data);

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 *image1319; GtkWidget *image1331;
GtkWidget *menu_new_with_template1_menu; GtkWidget *menu_new_with_template1_menu;
GtkWidget *invisible2; GtkWidget *invisible2;
GtkWidget *separator12; GtkWidget *separator12;
@ -47,11 +47,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 *image1320; GtkWidget *image1332;
GtkWidget *menu_reload1; GtkWidget *menu_reload1;
GtkWidget *image1321; GtkWidget *image1333;
GtkWidget *menu_reload_as1; GtkWidget *menu_reload_as1;
GtkWidget *image1322; GtkWidget *image1334;
GtkWidget *menu_reload_as1_menu; GtkWidget *menu_reload_as1_menu;
GtkWidget *invisible7; GtkWidget *invisible7;
GtkWidget *separator21; GtkWidget *separator21;
@ -61,7 +61,7 @@ create_window1 (void)
GtkWidget *separator14; GtkWidget *separator14;
GtkWidget *menu_close1; GtkWidget *menu_close1;
GtkWidget *menu_close_all1; GtkWidget *menu_close_all1;
GtkWidget *image1323; GtkWidget *image1335;
GtkWidget *menu_separatormenuitem1; GtkWidget *menu_separatormenuitem1;
GtkWidget *menu_quit1; GtkWidget *menu_quit1;
GtkWidget *edit1; GtkWidget *edit1;
@ -87,16 +87,16 @@ create_window1 (void)
GtkWidget *menu_duplicate_line1; GtkWidget *menu_duplicate_line1;
GtkWidget *separator29; GtkWidget *separator29;
GtkWidget *menu_increase_indent1; GtkWidget *menu_increase_indent1;
GtkWidget *image1324; GtkWidget *image1336;
GtkWidget *menu_decrease_indent1; GtkWidget *menu_decrease_indent1;
GtkWidget *image1325; GtkWidget *image1337;
GtkWidget *separator18; GtkWidget *separator18;
GtkWidget *insert_include2; GtkWidget *insert_include2;
GtkWidget *image1326; GtkWidget *image1338;
GtkWidget *insert_include2_menu; GtkWidget *insert_include2_menu;
GtkWidget *invisible4; GtkWidget *invisible4;
GtkWidget *add_comments1; GtkWidget *add_comments1;
GtkWidget *image1327; GtkWidget *image1339;
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;
@ -115,16 +115,16 @@ create_window1 (void)
GtkWidget *find_previous1; GtkWidget *find_previous1;
GtkWidget *find_in_files1; GtkWidget *find_in_files1;
GtkWidget *replace1; GtkWidget *replace1;
GtkWidget *image1328; GtkWidget *image1340;
GtkWidget *separator33; GtkWidget *separator33;
GtkWidget *next_message1; GtkWidget *next_message1;
GtkWidget *separator32; GtkWidget *separator32;
GtkWidget *go_to_line1; GtkWidget *go_to_line1;
GtkWidget *image1329; GtkWidget *image1341;
GtkWidget *menuitem3; GtkWidget *menuitem3;
GtkWidget *menuitem3_menu; GtkWidget *menuitem3_menu;
GtkWidget *menu_change_font1; GtkWidget *menu_change_font1;
GtkWidget *image1330; GtkWidget *image1342;
GtkWidget *menu_separator4; GtkWidget *menu_separator4;
GtkWidget *menu_fullscreen1; GtkWidget *menu_fullscreen1;
GtkWidget *menu_show_messages_window1; GtkWidget *menu_show_messages_window1;
@ -166,7 +166,7 @@ create_window1 (void)
GtkWidget *tools1; GtkWidget *tools1;
GtkWidget *tools1_menu; GtkWidget *tools1_menu;
GtkWidget *menu_choose_color1; GtkWidget *menu_choose_color1;
GtkWidget *image1331; GtkWidget *image1343;
GtkWidget *menu_count_words1; GtkWidget *menu_count_words1;
GtkWidget *menu_insert_special_chars1; GtkWidget *menu_insert_special_chars1;
GtkWidget *menu_item5; GtkWidget *menu_item5;
@ -267,9 +267,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);
image1319 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU); image1331 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU);
gtk_widget_show (image1319); gtk_widget_show (image1331);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_new_with_template1), image1319); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_new_with_template1), image1331);
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);
@ -308,25 +308,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);
image1320 = gtk_image_new_from_stock ("gtk-save", GTK_ICON_SIZE_MENU); image1332 = gtk_image_new_from_stock ("gtk-save", GTK_ICON_SIZE_MENU);
gtk_widget_show (image1320); gtk_widget_show (image1332);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_save_all1), image1320); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_save_all1), image1332);
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);
image1321 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU); image1333 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU);
gtk_widget_show (image1321); gtk_widget_show (image1333);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload1), image1321); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload1), image1333);
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);
image1322 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU); image1334 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU);
gtk_widget_show (image1322); gtk_widget_show (image1334);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload_as1), image1322); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload_as1), image1334);
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);
@ -367,9 +367,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);
image1323 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU); image1335 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU);
gtk_widget_show (image1323); gtk_widget_show (image1335);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_close_all1), image1323); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_close_all1), image1335);
menu_separatormenuitem1 = gtk_separator_menu_item_new (); menu_separatormenuitem1 = gtk_separator_menu_item_new ();
gtk_widget_show (menu_separatormenuitem1); gtk_widget_show (menu_separatormenuitem1);
@ -477,17 +477,17 @@ create_window1 (void)
gtk_widget_show (menu_increase_indent1); gtk_widget_show (menu_increase_indent1);
gtk_container_add (GTK_CONTAINER (menu_format1_menu), menu_increase_indent1); gtk_container_add (GTK_CONTAINER (menu_format1_menu), menu_increase_indent1);
image1324 = gtk_image_new_from_stock ("gtk-indent", GTK_ICON_SIZE_MENU); image1336 = gtk_image_new_from_stock ("gtk-indent", GTK_ICON_SIZE_MENU);
gtk_widget_show (image1324); gtk_widget_show (image1336);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_increase_indent1), image1324); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_increase_indent1), image1336);
menu_decrease_indent1 = gtk_image_menu_item_new_with_mnemonic (_("_Decrease Indent")); menu_decrease_indent1 = gtk_image_menu_item_new_with_mnemonic (_("_Decrease Indent"));
gtk_widget_show (menu_decrease_indent1); gtk_widget_show (menu_decrease_indent1);
gtk_container_add (GTK_CONTAINER (menu_format1_menu), menu_decrease_indent1); gtk_container_add (GTK_CONTAINER (menu_format1_menu), menu_decrease_indent1);
image1325 = gtk_image_new_from_stock ("gtk-unindent", GTK_ICON_SIZE_MENU); image1337 = gtk_image_new_from_stock ("gtk-unindent", GTK_ICON_SIZE_MENU);
gtk_widget_show (image1325); gtk_widget_show (image1337);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_decrease_indent1), image1325); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_decrease_indent1), image1337);
separator18 = gtk_separator_menu_item_new (); separator18 = gtk_separator_menu_item_new ();
gtk_widget_show (separator18); gtk_widget_show (separator18);
@ -498,9 +498,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);
image1326 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); image1338 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
gtk_widget_show (image1326); gtk_widget_show (image1338);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_include2), image1326); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_include2), image1338);
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);
@ -512,9 +512,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);
image1327 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); image1339 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
gtk_widget_show (image1327); gtk_widget_show (image1339);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (add_comments1), image1327); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (add_comments1), image1339);
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);
@ -590,9 +590,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);
image1328 = gtk_image_new_from_stock ("gtk-find-and-replace", GTK_ICON_SIZE_MENU); image1340 = gtk_image_new_from_stock ("gtk-find-and-replace", GTK_ICON_SIZE_MENU);
gtk_widget_show (image1328); gtk_widget_show (image1340);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (replace1), image1328); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (replace1), image1340);
separator33 = gtk_separator_menu_item_new (); separator33 = gtk_separator_menu_item_new ();
gtk_widget_show (separator33); gtk_widget_show (separator33);
@ -612,9 +612,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);
image1329 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU); image1341 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU);
gtk_widget_show (image1329); gtk_widget_show (image1341);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (go_to_line1), image1329); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (go_to_line1), image1341);
menuitem3 = gtk_menu_item_new_with_mnemonic (_("_View")); menuitem3 = gtk_menu_item_new_with_mnemonic (_("_View"));
gtk_widget_show (menuitem3); gtk_widget_show (menuitem3);
@ -628,9 +628,9 @@ 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);
image1330 = gtk_image_new_from_stock ("gtk-select-font", GTK_ICON_SIZE_MENU); image1342 = gtk_image_new_from_stock ("gtk-select-font", GTK_ICON_SIZE_MENU);
gtk_widget_show (image1330); gtk_widget_show (image1342);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_change_font1), image1330); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_change_font1), image1342);
menu_separator4 = gtk_separator_menu_item_new (); menu_separator4 = gtk_separator_menu_item_new ();
gtk_widget_show (menu_separator4); gtk_widget_show (menu_separator4);
@ -815,9 +815,9 @@ create_window1 (void)
gtk_container_add (GTK_CONTAINER (tools1_menu), menu_choose_color1); gtk_container_add (GTK_CONTAINER (tools1_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);
image1331 = gtk_image_new_from_stock ("gtk-select-color", GTK_ICON_SIZE_MENU); image1343 = gtk_image_new_from_stock ("gtk-select-color", GTK_ICON_SIZE_MENU);
gtk_widget_show (image1331); gtk_widget_show (image1343);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_choose_color1), image1331); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_choose_color1), image1343);
menu_count_words1 = gtk_menu_item_new_with_mnemonic (_("_Word Count")); menu_count_words1 = gtk_menu_item_new_with_mnemonic (_("_Word Count"));
gtk_widget_show (menu_count_words1); gtk_widget_show (menu_count_words1);
@ -1220,10 +1220,10 @@ create_window1 (void)
G_CALLBACK (on_comments_function_activate), G_CALLBACK (on_comments_function_activate),
NULL); NULL);
g_signal_connect ((gpointer) insert_multiline_comment2, "activate", g_signal_connect ((gpointer) insert_multiline_comment2, "activate",
G_CALLBACK (on_comments_multiline_activate), G_CALLBACK (on_menu_comments_multiline_activate),
NULL); NULL);
g_signal_connect ((gpointer) insert_gpl_notice2, "activate", g_signal_connect ((gpointer) insert_gpl_notice2, "activate",
G_CALLBACK (on_comments_gpl_activate), G_CALLBACK (on_menu_comments_gpl_activate),
NULL); NULL);
g_signal_connect ((gpointer) preferences1, "activate", g_signal_connect ((gpointer) preferences1, "activate",
G_CALLBACK (on_preferences1_activate), G_CALLBACK (on_preferences1_activate),
@ -1412,7 +1412,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, image1319, "image1319"); GLADE_HOOKUP_OBJECT (window1, image1331, "image1331");
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");
@ -1422,11 +1422,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, image1320, "image1320"); GLADE_HOOKUP_OBJECT (window1, image1332, "image1332");
GLADE_HOOKUP_OBJECT (window1, menu_reload1, "menu_reload1"); GLADE_HOOKUP_OBJECT (window1, menu_reload1, "menu_reload1");
GLADE_HOOKUP_OBJECT (window1, image1321, "image1321"); GLADE_HOOKUP_OBJECT (window1, image1333, "image1333");
GLADE_HOOKUP_OBJECT (window1, menu_reload_as1, "menu_reload_as1"); GLADE_HOOKUP_OBJECT (window1, menu_reload_as1, "menu_reload_as1");
GLADE_HOOKUP_OBJECT (window1, image1322, "image1322"); GLADE_HOOKUP_OBJECT (window1, image1334, "image1334");
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");
@ -1436,7 +1436,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, image1323, "image1323"); GLADE_HOOKUP_OBJECT (window1, image1335, "image1335");
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");
@ -1462,16 +1462,16 @@ create_window1 (void)
GLADE_HOOKUP_OBJECT (window1, menu_duplicate_line1, "menu_duplicate_line1"); GLADE_HOOKUP_OBJECT (window1, menu_duplicate_line1, "menu_duplicate_line1");
GLADE_HOOKUP_OBJECT (window1, separator29, "separator29"); GLADE_HOOKUP_OBJECT (window1, separator29, "separator29");
GLADE_HOOKUP_OBJECT (window1, menu_increase_indent1, "menu_increase_indent1"); GLADE_HOOKUP_OBJECT (window1, menu_increase_indent1, "menu_increase_indent1");
GLADE_HOOKUP_OBJECT (window1, image1324, "image1324"); GLADE_HOOKUP_OBJECT (window1, image1336, "image1336");
GLADE_HOOKUP_OBJECT (window1, menu_decrease_indent1, "menu_decrease_indent1"); GLADE_HOOKUP_OBJECT (window1, menu_decrease_indent1, "menu_decrease_indent1");
GLADE_HOOKUP_OBJECT (window1, image1325, "image1325"); GLADE_HOOKUP_OBJECT (window1, image1337, "image1337");
GLADE_HOOKUP_OBJECT (window1, separator18, "separator18"); GLADE_HOOKUP_OBJECT (window1, separator18, "separator18");
GLADE_HOOKUP_OBJECT (window1, insert_include2, "insert_include2"); GLADE_HOOKUP_OBJECT (window1, insert_include2, "insert_include2");
GLADE_HOOKUP_OBJECT (window1, image1326, "image1326"); GLADE_HOOKUP_OBJECT (window1, image1338, "image1338");
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, image1327, "image1327"); GLADE_HOOKUP_OBJECT (window1, image1339, "image1339");
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");
@ -1490,16 +1490,16 @@ create_window1 (void)
GLADE_HOOKUP_OBJECT (window1, find_previous1, "find_previous1"); GLADE_HOOKUP_OBJECT (window1, find_previous1, "find_previous1");
GLADE_HOOKUP_OBJECT (window1, find_in_files1, "find_in_files1"); GLADE_HOOKUP_OBJECT (window1, find_in_files1, "find_in_files1");
GLADE_HOOKUP_OBJECT (window1, replace1, "replace1"); GLADE_HOOKUP_OBJECT (window1, replace1, "replace1");
GLADE_HOOKUP_OBJECT (window1, image1328, "image1328"); GLADE_HOOKUP_OBJECT (window1, image1340, "image1340");
GLADE_HOOKUP_OBJECT (window1, separator33, "separator33"); GLADE_HOOKUP_OBJECT (window1, separator33, "separator33");
GLADE_HOOKUP_OBJECT (window1, next_message1, "next_message1"); GLADE_HOOKUP_OBJECT (window1, next_message1, "next_message1");
GLADE_HOOKUP_OBJECT (window1, separator32, "separator32"); GLADE_HOOKUP_OBJECT (window1, separator32, "separator32");
GLADE_HOOKUP_OBJECT (window1, go_to_line1, "go_to_line1"); GLADE_HOOKUP_OBJECT (window1, go_to_line1, "go_to_line1");
GLADE_HOOKUP_OBJECT (window1, image1329, "image1329"); GLADE_HOOKUP_OBJECT (window1, image1341, "image1341");
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, image1330, "image1330"); GLADE_HOOKUP_OBJECT (window1, image1342, "image1342");
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");
@ -1540,7 +1540,7 @@ create_window1 (void)
GLADE_HOOKUP_OBJECT (window1, tools1, "tools1"); GLADE_HOOKUP_OBJECT (window1, tools1, "tools1");
GLADE_HOOKUP_OBJECT (window1, tools1_menu, "tools1_menu"); GLADE_HOOKUP_OBJECT (window1, tools1_menu, "tools1_menu");
GLADE_HOOKUP_OBJECT (window1, menu_choose_color1, "menu_choose_color1"); GLADE_HOOKUP_OBJECT (window1, menu_choose_color1, "menu_choose_color1");
GLADE_HOOKUP_OBJECT (window1, image1331, "image1331"); GLADE_HOOKUP_OBJECT (window1, image1343, "image1343");
GLADE_HOOKUP_OBJECT (window1, menu_count_words1, "menu_count_words1"); GLADE_HOOKUP_OBJECT (window1, menu_count_words1, "menu_count_words1");
GLADE_HOOKUP_OBJECT (window1, menu_insert_special_chars1, "menu_insert_special_chars1"); GLADE_HOOKUP_OBJECT (window1, menu_insert_special_chars1, "menu_insert_special_chars1");
GLADE_HOOKUP_OBJECT (window1, menu_item5, "menu_item5"); GLADE_HOOKUP_OBJECT (window1, menu_item5, "menu_item5");

View File

@ -467,10 +467,10 @@ static void insert_include_items(GtkMenu *me, GtkMenu *mp, gchar **includes, gch
tmp_popup = gtk_menu_item_new_with_label(includes[i]); tmp_popup = gtk_menu_item_new_with_label(includes[i]);
gtk_container_add(GTK_CONTAINER(edit_menu), tmp_menu); gtk_container_add(GTK_CONTAINER(edit_menu), tmp_menu);
gtk_container_add(GTK_CONTAINER(popup_menu), tmp_popup); gtk_container_add(GTK_CONTAINER(popup_menu), tmp_popup);
g_signal_connect((gpointer) tmp_menu, "activate", G_CALLBACK(on_insert_include_activate), g_signal_connect((gpointer) tmp_menu, "activate",
(gpointer) includes[i]); G_CALLBACK(on_menu_insert_include_activate), (gpointer) includes[i]);
g_signal_connect((gpointer) tmp_popup, "activate", G_CALLBACK(on_insert_include_activate), g_signal_connect((gpointer) tmp_popup, "activate",
(gpointer) includes[i]); G_CALLBACK(on_insert_include_activate), (gpointer) includes[i]);
i++; i++;
} }
gtk_widget_show_all(edit_menu_item); gtk_widget_show_all(edit_menu_item);
@ -508,7 +508,7 @@ void ui_create_insert_menu_items()
blank = gtk_menu_item_new_with_label("#include \"...\""); blank = gtk_menu_item_new_with_label("#include \"...\"");
gtk_container_add(GTK_CONTAINER(menu_edit), blank); gtk_container_add(GTK_CONTAINER(menu_edit), blank);
gtk_widget_show(blank); gtk_widget_show(blank);
g_signal_connect((gpointer) blank, "activate", G_CALLBACK(on_insert_include_activate), g_signal_connect((gpointer) blank, "activate", G_CALLBACK(on_menu_insert_include_activate),
(gpointer) "blank"); (gpointer) "blank");
blank = gtk_separator_menu_item_new (); blank = gtk_separator_menu_item_new ();
gtk_container_add(GTK_CONTAINER(menu_edit), blank); gtk_container_add(GTK_CONTAINER(menu_edit), blank);
@ -538,7 +538,7 @@ static void insert_date_items(GtkMenu *me, GtkMenu *mp, gchar *label)
item = gtk_menu_item_new_with_label(label); item = gtk_menu_item_new_with_label(label);
gtk_container_add(GTK_CONTAINER(me), item); gtk_container_add(GTK_CONTAINER(me), item);
gtk_widget_show(item); gtk_widget_show(item);
g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_insert_date_activate), label); g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_menu_insert_date_activate), label);
item = gtk_menu_item_new_with_label(label); item = gtk_menu_item_new_with_label(label);
gtk_container_add(GTK_CONTAINER(mp), item); gtk_container_add(GTK_CONTAINER(mp), item);
@ -580,7 +580,7 @@ void ui_create_insert_date_menu_items()
item = gtk_menu_item_new_with_label(str); item = gtk_menu_item_new_with_label(str);
gtk_container_add(GTK_CONTAINER(menu_edit), item); gtk_container_add(GTK_CONTAINER(menu_edit), item);
gtk_widget_show(item); gtk_widget_show(item);
g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_insert_date_activate), g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_menu_insert_date_activate),
str); str);
g_object_set_data_full(G_OBJECT(app->window), "insert_date_custom1", gtk_widget_ref(item), g_object_set_data_full(G_OBJECT(app->window), "insert_date_custom1", gtk_widget_ref(item),
(GDestroyNotify)gtk_widget_unref); (GDestroyNotify)gtk_widget_unref);