Rename "delete_event" to "delete-event".

Remove some unnecessary GObject casts in g_signal_connect() calls.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2788 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2008-07-18 13:40:48 +00:00
parent 9469f020c8
commit 8d67117d47
28 changed files with 257 additions and 294 deletions

View File

@ -1,3 +1,16 @@
2008-07-18 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* plugins/classbuilder.c, plugins/demoplugin.c, plugins/export.c,
plugins/filebrowser.c, plugins/htmlchars.c, plugins/vcdiff.c,
src/about.c, src/build.c, src/dialogs.c, src/document.c,
src/editor.c, src/encodings.c, src/filetypes.c, src/gb.c, src/main.c,
src/msgwindow.c, src/notebook.c, src/plugins.c, src/prefs.c,
src/printing.c, src/project.c, src/search.c, src/templates.c,
src/tools.c, src/treeviews.c, src/ui_utils.c, src/vte.c:
Rename "delete_event" to "delete-event".
Remove some unnecessary GObject casts in g_signal_connect() calls.
2008-07-17 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/ui_utils.c, src/ui_utils.h, src/main.c:

View File

@ -361,8 +361,7 @@ void show_dialog_create_class(gint type)
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
NULL);
g_signal_connect_swapped(G_OBJECT(cc_dlg->dialog), "destroy",
G_CALLBACK(g_free), (gpointer)cc_dlg);
g_signal_connect_swapped(cc_dlg->dialog, "destroy", G_CALLBACK(g_free), (gpointer)cc_dlg);
main_box = p_ui->dialog_vbox_new(GTK_DIALOG(cc_dlg->dialog));
@ -380,7 +379,7 @@ void show_dialog_create_class(gint type)
cc_dlg->class_name_entry = gtk_entry_new();
gtk_box_pack_start(GTK_BOX(hbox), cc_dlg->class_name_entry, TRUE, TRUE, 0);
g_signal_connect(G_OBJECT(cc_dlg->class_name_entry), "changed",
g_signal_connect(cc_dlg->class_name_entry, "changed",
G_CALLBACK(cc_dlg_on_class_name_entry_changed), cc_dlg);
hbox = gtk_hbox_new(FALSE, 10);
@ -417,7 +416,7 @@ void show_dialog_create_class(gint type)
if (type == GEANY_CLASS_TYPE_GTK)
gtk_entry_set_text(GTK_ENTRY(cc_dlg->base_name_entry), "GObject");
gtk_container_add(GTK_CONTAINER(hbox), cc_dlg->base_name_entry);
g_signal_connect(G_OBJECT(cc_dlg->base_name_entry), "changed",
g_signal_connect(cc_dlg->base_name_entry, "changed",
G_CALLBACK(cc_dlg_on_base_name_entry_changed), (gpointer)cc_dlg);
hbox = gtk_hbox_new(FALSE, 10);
@ -468,7 +467,7 @@ void show_dialog_create_class(gint type)
{
hbox = gtk_hbox_new(FALSE, 10);
gtk_container_add(GTK_CONTAINER(vbox), hbox);
g_signal_connect(G_OBJECT(cc_dlg->create_constructor_box), "toggled",
g_signal_connect(cc_dlg->create_constructor_box, "toggled",
G_CALLBACK(cc_dlg_on_set_sensitive_toggled), (gpointer)hbox);
label = gtk_label_new(_("GTK+ constructor type"));
@ -793,10 +792,10 @@ void plugin_init(GeanyData *data)
menu_create_gtk_class = gtk_menu_item_new_with_mnemonic (_("_GTK+ Class"));
gtk_container_add (GTK_CONTAINER (menu_create_class1_menu), menu_create_gtk_class);
g_signal_connect ((gpointer) menu_create_cpp_class, "activate",
g_signal_connect(menu_create_cpp_class, "activate",
G_CALLBACK (on_menu_create_cpp_class_activate),
NULL);
g_signal_connect ((gpointer) menu_create_gtk_class, "activate",
g_signal_connect(menu_create_gtk_class, "activate",
G_CALLBACK (on_menu_create_gtk_class_activate),
NULL);

View File

@ -92,7 +92,7 @@ void plugin_init(GeanyData *data)
demo_item = gtk_menu_item_new_with_mnemonic(_("_Demo Plugin"));
gtk_widget_show(demo_item);
gtk_container_add(GTK_CONTAINER(geany->main_widgets->tools_menu), demo_item);
g_signal_connect(G_OBJECT(demo_item), "activate", G_CALLBACK(item_activate), NULL);
g_signal_connect(demo_item, "activate", G_CALLBACK(item_activate), NULL);
welcome_text = g_strdup(_("Hello World!"));

View File

@ -200,10 +200,8 @@ static void create_file_save_as_dialog(const gchar *extension, ExportFunc func,
exi->have_zoom_level_checkbox = TRUE;
}
g_signal_connect((gpointer) dialog, "delete_event",
G_CALLBACK(gtk_widget_hide_on_delete), NULL);
g_signal_connect((gpointer) dialog, "response",
G_CALLBACK(on_file_save_dialog_response), exi);
g_signal_connect(dialog, "delete-event", G_CALLBACK(gtk_widget_hide_on_delete), NULL);
g_signal_connect(dialog, "response", G_CALLBACK(on_file_save_dialog_response), exi);
gtk_window_set_transient_for(GTK_WINDOW(dialog), GTK_WINDOW(geany->main_widgets->window));
@ -721,14 +719,13 @@ void plugin_init(GeanyData *data)
menu_create_html = gtk_menu_item_new_with_mnemonic(_("As _HTML"));
gtk_container_add(GTK_CONTAINER (menu_export_menu), menu_create_html);
g_signal_connect((gpointer) menu_create_html, "activate",
G_CALLBACK(on_menu_create_html_activate), NULL);
g_signal_connect(menu_create_html, "activate", G_CALLBACK(on_menu_create_html_activate), NULL);
/* LaTeX */
menu_create_latex = gtk_menu_item_new_with_mnemonic(_("As _LaTeX"));
gtk_container_add(GTK_CONTAINER (menu_export_menu), menu_create_latex);
g_signal_connect((gpointer) menu_create_latex, "activate",
g_signal_connect(menu_create_latex, "activate",
G_CALLBACK(on_menu_create_latex_activate), NULL);
/* disable menu_item when there are no documents open */

View File

@ -530,8 +530,7 @@ static GtkWidget *create_popup_menu(void)
item = gtk_image_menu_item_new_from_stock(GTK_STOCK_OPEN, NULL);
gtk_widget_show(item);
gtk_container_add(GTK_CONTAINER(menu), item);
g_signal_connect((gpointer) item, "activate",
G_CALLBACK(on_open_clicked), NULL);
g_signal_connect(item, "activate", G_CALLBACK(on_open_clicked), NULL);
popup_items.open = item;
image = gtk_image_new_from_stock(GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU);
@ -540,8 +539,7 @@ static GtkWidget *create_popup_menu(void)
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image);
gtk_widget_show(item);
gtk_container_add(GTK_CONTAINER(menu), item);
g_signal_connect((gpointer) item, "activate",
G_CALLBACK(on_external_open), NULL);
g_signal_connect(item, "activate", G_CALLBACK(on_external_open), NULL);
popup_items.open_external = item;
image = gtk_image_new_from_stock(GTK_STOCK_FIND, GTK_ICON_SIZE_MENU);
@ -550,7 +548,7 @@ static GtkWidget *create_popup_menu(void)
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image);
gtk_widget_show(item);
gtk_container_add(GTK_CONTAINER(menu), item);
g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_find_in_files), NULL);
g_signal_connect(item, "activate", G_CALLBACK(on_find_in_files), NULL);
popup_items.find_in_files = item;
item = gtk_separator_menu_item_new();
@ -560,7 +558,7 @@ static GtkWidget *create_popup_menu(void)
item = gtk_check_menu_item_new_with_mnemonic(_("Show _Hidden Files"));
gtk_widget_show(item);
gtk_container_add(GTK_CONTAINER(menu), item);
g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_hidden_files_clicked), NULL);
g_signal_connect(item, "activate", G_CALLBACK(on_hidden_files_clicked), NULL);
item = gtk_separator_menu_item_new();
gtk_widget_show(item);
@ -571,7 +569,7 @@ static GtkWidget *create_popup_menu(void)
gtk_image_new_from_stock("gtk-close", GTK_ICON_SIZE_MENU));
gtk_widget_show(item);
gtk_container_add(GTK_CONTAINER(menu), item);
g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_hide_sidebar), NULL);
g_signal_connect(item, "activate", G_CALLBACK(on_hide_sidebar), NULL);
return menu;
}
@ -712,12 +710,9 @@ static void prepare_file_view(void)
gtk_tree_selection_set_mode(select, GTK_SELECTION_MULTIPLE);
g_signal_connect(G_OBJECT(file_view), "realize", G_CALLBACK(on_current_path), NULL);
g_signal_connect(G_OBJECT(file_view), "button-press-event",
G_CALLBACK(on_button_press), NULL);
g_signal_connect(G_OBJECT(file_view), "button-release-event",
G_CALLBACK(on_button_release), NULL);
g_signal_connect(G_OBJECT(file_view), "key-press-event",
G_CALLBACK(on_key_press), NULL);
g_signal_connect(file_view, "button-press-event", G_CALLBACK(on_button_press), NULL);
g_signal_connect(file_view, "button-release-event", G_CALLBACK(on_button_release), NULL);
g_signal_connect(file_view, "key-press-event", G_CALLBACK(on_key_press), NULL);
}
@ -734,25 +729,25 @@ static GtkWidget *make_toolbar(void)
wid = (GtkWidget *) gtk_tool_button_new_from_stock(GTK_STOCK_GO_UP);
gtk_tool_item_set_tooltip(GTK_TOOL_ITEM(wid), tooltips,
_("Up"), NULL);
g_signal_connect(G_OBJECT(wid), "clicked", G_CALLBACK(on_go_up), NULL);
g_signal_connect(wid, "clicked", G_CALLBACK(on_go_up), NULL);
gtk_container_add(GTK_CONTAINER(toolbar), wid);
wid = (GtkWidget *) gtk_tool_button_new_from_stock(GTK_STOCK_REFRESH);
gtk_tool_item_set_tooltip(GTK_TOOL_ITEM(wid), tooltips,
_("Refresh"), NULL);
g_signal_connect(G_OBJECT(wid), "clicked", G_CALLBACK(refresh), NULL);
g_signal_connect(wid, "clicked", G_CALLBACK(refresh), NULL);
gtk_container_add(GTK_CONTAINER(toolbar), wid);
wid = (GtkWidget *) gtk_tool_button_new_from_stock(GTK_STOCK_HOME);
gtk_tool_item_set_tooltip(GTK_TOOL_ITEM(wid), tooltips,
_("Home"), NULL);
g_signal_connect(G_OBJECT(wid), "clicked", G_CALLBACK(on_go_home), NULL);
g_signal_connect(wid, "clicked", G_CALLBACK(on_go_home), NULL);
gtk_container_add(GTK_CONTAINER(toolbar), wid);
wid = (GtkWidget *) gtk_tool_button_new_from_stock(GTK_STOCK_JUMP_TO);
gtk_tool_item_set_tooltip(GTK_TOOL_ITEM(wid), tooltips,
_("Set path from document"), NULL);
g_signal_connect(G_OBJECT(wid), "clicked", G_CALLBACK(on_current_path), NULL);
g_signal_connect(wid, "clicked", G_CALLBACK(on_current_path), NULL);
gtk_container_add(GTK_CONTAINER(toolbar), wid);
wid = (GtkWidget *) gtk_separator_tool_item_new();
@ -760,7 +755,7 @@ static GtkWidget *make_toolbar(void)
wid = (GtkWidget *) gtk_tool_button_new_from_stock(GTK_STOCK_CLEAR);
gtk_tool_item_set_tooltip(GTK_TOOL_ITEM(wid), tooltips, _("Clear the filter"), NULL);
g_signal_connect(G_OBJECT(wid), "clicked", G_CALLBACK(on_clear_filter), NULL);
g_signal_connect(wid, "clicked", G_CALLBACK(on_clear_filter), NULL);
gtk_container_add(GTK_CONTAINER(toolbar), wid);
return toolbar;
@ -776,7 +771,7 @@ static GtkWidget *make_filterbar(void)
label = gtk_label_new(_("Filter:"));
filter_entry = gtk_entry_new();
g_signal_connect(G_OBJECT(filter_entry), "activate", G_CALLBACK(on_filter_activate), NULL);
g_signal_connect(filter_entry, "activate", G_CALLBACK(on_filter_activate), NULL);
gtk_box_pack_start(GTK_BOX(filterbar), label, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(filterbar), filter_entry, TRUE, TRUE, 0);
@ -911,7 +906,7 @@ void plugin_init(GeanyData *data)
path_entry = gtk_entry_new();
gtk_box_pack_start(GTK_BOX(file_view_vbox), path_entry, FALSE, FALSE, 2);
g_signal_connect(G_OBJECT(path_entry), "activate", G_CALLBACK(on_path_entry_activate), NULL);
g_signal_connect(path_entry, "activate", G_CALLBACK(on_path_entry_activate), NULL);
file_view = gtk_tree_view_new();
prepare_file_view();

View File

@ -128,14 +128,12 @@ static void tools_show_dialog_insert_special_chars(void)
gtk_box_pack_start(GTK_BOX(vbox), swin, TRUE, TRUE, 0);
g_signal_connect((gpointer) sc_tree, "row-activated",
G_CALLBACK(sc_on_tree_row_activated), NULL);
g_signal_connect(sc_tree, "row-activated", G_CALLBACK(sc_on_tree_row_activated), NULL);
g_signal_connect((gpointer) sc_dialog, "response",
g_signal_connect(sc_dialog, "response",
G_CALLBACK(sc_on_tools_show_dialog_insert_special_chars_response), NULL);
g_signal_connect((gpointer) sc_dialog, "delete_event",
G_CALLBACK(gtk_widget_hide_on_delete), NULL);
g_signal_connect(sc_dialog, "delete-event", G_CALLBACK(gtk_widget_hide_on_delete), NULL);
sc_fill_store(sc_store);
@ -530,7 +528,7 @@ void plugin_init(GeanyData *data)
demo_item = gtk_menu_item_new_with_mnemonic(menu_text);
gtk_widget_show(demo_item);
gtk_container_add(GTK_CONTAINER(geany->main_widgets->tools_menu), demo_item);
g_signal_connect(G_OBJECT(demo_item), "activate", G_CALLBACK(item_activate), NULL);
g_signal_connect(demo_item, "activate", G_CALLBACK(item_activate), NULL);
/* disable menu_item when there are no documents open */
plugin_fields->menu_item = demo_item;

View File

@ -503,8 +503,7 @@ void plugin_init(GeanyData *data)
menu_vcdiff = gtk_image_menu_item_new_with_mnemonic(_("_Version Diff"));
gtk_container_add(GTK_CONTAINER(geany->main_widgets->tools_menu), menu_vcdiff);
g_signal_connect((gpointer) menu_vcdiff, "activate",
G_CALLBACK(update_menu_items), NULL);
g_signal_connect(menu_vcdiff, "activate", G_CALLBACK(update_menu_items), NULL);
menu_vcdiff_menu = gtk_menu_new ();
gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu_vcdiff), menu_vcdiff_menu);
@ -515,8 +514,7 @@ void plugin_init(GeanyData *data)
gtk_tooltips_set_tip (tooltips, menu_vcdiff_file,
_("Make a diff from the current active file"), NULL);
g_signal_connect((gpointer) menu_vcdiff_file, "activate",
G_CALLBACK(vcfile_activated), NULL);
g_signal_connect(menu_vcdiff_file, "activate", G_CALLBACK(vcfile_activated), NULL);
/* Directory */
menu_vcdiff_dir = gtk_menu_item_new_with_mnemonic(_("From Current _Directory"));
@ -524,8 +522,7 @@ void plugin_init(GeanyData *data)
gtk_tooltips_set_tip (tooltips, menu_vcdiff_dir,
_("Make a diff from the directory of the current active file"), NULL);
g_signal_connect((gpointer) menu_vcdiff_dir, "activate",
G_CALLBACK(vcdirectory_activated), NULL);
g_signal_connect(menu_vcdiff_dir, "activate", G_CALLBACK(vcdirectory_activated), NULL);
/* Project */
menu_vcdiff_project = gtk_menu_item_new_with_mnemonic(_("From Current _Project"));
@ -533,8 +530,7 @@ void plugin_init(GeanyData *data)
gtk_tooltips_set_tip (tooltips, menu_vcdiff_project,
_("Make a diff from the current project's base path"), NULL);
g_signal_connect((gpointer) menu_vcdiff_project, "activate",
G_CALLBACK(vcproject_activated), NULL);
g_signal_connect(menu_vcdiff_project, "activate", G_CALLBACK(vcproject_activated), NULL);
gtk_widget_show_all(menu_vcdiff);

View File

@ -125,7 +125,7 @@ static GtkWidget *create_dialog(void)
button = gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE);
gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_CLOSE);
gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE);
g_signal_connect(G_OBJECT(dialog), "key-press-event", G_CALLBACK(gb_on_key_pressed), NULL);
g_signal_connect(dialog, "key-press-event", G_CALLBACK(gb_on_key_pressed), NULL);
/* create header */
header_eventbox = gtk_event_box_new();
@ -146,8 +146,8 @@ static GtkWidget *create_dialog(void)
gtk_box_pack_start(GTK_BOX(header_hbox), header_label, FALSE,FALSE,0);
header_eventbox_style_set(header_eventbox);
header_label_style_set(header_label);
g_signal_connect_after(G_OBJECT(header_eventbox), "style_set", G_CALLBACK(header_eventbox_style_set), NULL);
g_signal_connect_after(G_OBJECT(header_label), "style_set", G_CALLBACK(header_label_style_set), NULL);
g_signal_connect_after(header_eventbox, "style-set", G_CALLBACK(header_eventbox_style_set), NULL);
g_signal_connect_after(header_label, "style-set", G_CALLBACK(header_label_style_set), NULL);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), header_eventbox, FALSE, FALSE, 0);
/* set image */
@ -202,7 +202,7 @@ static GtkWidget *create_dialog(void)
box = gtk_hbutton_box_new();
url_button = gtk_button_new();
gtk_button_set_relief(GTK_BUTTON(url_button), GTK_RELIEF_NONE);
g_signal_connect(G_OBJECT(url_button), "clicked", G_CALLBACK(homepage_clicked), GEANY_HOMEPAGE);
g_signal_connect(url_button, "clicked", G_CALLBACK(homepage_clicked), GEANY_HOMEPAGE);
label = gtk_label_new(NULL);
gtk_label_set_text(GTK_LABEL(label), GEANY_HOMEPAGE);
gtk_widget_show(label);

View File

@ -1046,7 +1046,7 @@ static void create_build_menu_gen(BuildMenuItems *menu_items)
image = gtk_image_new_from_stock("gtk-convert", GTK_ICON_SIZE_MENU);
gtk_widget_show(image);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image);
g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_build_compile_activate), NULL);
g_signal_connect(item, "activate", G_CALLBACK(on_build_compile_activate), NULL);
menu_items->item_compile = item;
/* build the code */
@ -1056,7 +1056,7 @@ static void create_build_menu_gen(BuildMenuItems *menu_items)
gtk_tooltips_set_tip(tooltips, item,
_("Builds the current file (generate an executable file)"), NULL);
GEANY_ADD_WIDGET_ACCEL(GEANY_KEYS_BUILD_LINK, item);
g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_build_build_activate), NULL);
g_signal_connect(item, "activate", G_CALLBACK(on_build_build_activate), NULL);
menu_items->item_link = item;
item = gtk_separator_menu_item_new();
@ -1070,7 +1070,7 @@ static void create_build_menu_gen(BuildMenuItems *menu_items)
gtk_tooltips_set_tip(tooltips, item, _("Builds the current file with the "
"make tool and the default target"), NULL);
GEANY_ADD_WIDGET_ACCEL(GEANY_KEYS_BUILD_MAKE, item);
g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_build_make_activate),
g_signal_connect(item, "activate", G_CALLBACK(on_build_make_activate),
GINT_TO_POINTER(GBO_MAKE_ALL));
menu_items->item_make_all = item;
@ -1081,7 +1081,7 @@ static void create_build_menu_gen(BuildMenuItems *menu_items)
gtk_container_add(GTK_CONTAINER(menu), item);
gtk_tooltips_set_tip(tooltips, item, _("Builds the current file with the "
"make tool and the specified target"), NULL);
g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_build_make_activate),
g_signal_connect(item, "activate", G_CALLBACK(on_build_make_activate),
GINT_TO_POINTER(GBO_MAKE_CUSTOM));
menu_items->item_make_custom = item;
@ -1092,7 +1092,7 @@ static void create_build_menu_gen(BuildMenuItems *menu_items)
gtk_container_add(GTK_CONTAINER(menu), item);
gtk_tooltips_set_tip(tooltips, item, _("Compiles the current file using the "
"make tool"), NULL);
g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_build_make_activate),
g_signal_connect(item, "activate", G_CALLBACK(on_build_make_activate),
GINT_TO_POINTER(GBO_MAKE_OBJECT));
menu_items->item_make_object = item;
@ -1105,14 +1105,14 @@ static void create_build_menu_gen(BuildMenuItems *menu_items)
gtk_widget_show(item);
GEANY_ADD_WIDGET_ACCEL(GEANY_KEYS_BUILD_NEXTERROR, item);
gtk_container_add(GTK_CONTAINER(menu), item);
g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_build_next_error), NULL);
g_signal_connect(item, "activate", G_CALLBACK(on_build_next_error), NULL);
menu_items->item_next_error = item;
item = gtk_image_menu_item_new_with_mnemonic(_("_Previous Error"));
gtk_widget_show(item);
GEANY_ADD_WIDGET_ACCEL(GEANY_KEYS_BUILD_PREVIOUSERROR, item);
gtk_container_add(GTK_CONTAINER(menu), item);
g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_build_previous_error), NULL);
g_signal_connect(item, "activate", G_CALLBACK(on_build_previous_error), NULL);
menu_items->item_previous_error = item;
item = gtk_separator_menu_item_new();
@ -1125,7 +1125,7 @@ static void create_build_menu_gen(BuildMenuItems *menu_items)
gtk_container_add(GTK_CONTAINER(menu), item);
gtk_tooltips_set_tip(tooltips, item, _("Run or view the current file"), NULL);
GEANY_ADD_WIDGET_ACCEL(GEANY_KEYS_BUILD_RUN, item);
g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_build_execute_activate), NULL);
g_signal_connect(item, "activate", G_CALLBACK(on_build_execute_activate), NULL);
menu_items->item_exec = item;
separator = gtk_separator_menu_item_new();
@ -1144,7 +1144,7 @@ static void create_build_menu_gen(BuildMenuItems *menu_items)
image = gtk_image_new_from_stock("gtk-preferences", GTK_ICON_SIZE_MENU);
gtk_widget_show(image);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image);
g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_build_arguments_activate), NULL);
g_signal_connect(item, "activate", G_CALLBACK(on_build_arguments_activate), NULL);
menu_items->item_set_args = item;
menu_items->menu = menu;
@ -1170,7 +1170,7 @@ static void create_build_menu_tex(BuildMenuItems *menu_items)
image = gtk_image_new_from_stock("gtk-convert", GTK_ICON_SIZE_MENU);
gtk_widget_show(image);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image);
g_signal_connect((gpointer) item, "activate",
g_signal_connect(item, "activate",
G_CALLBACK(on_build_tex_activate), GINT_TO_POINTER(LATEX_CMD_TO_DVI));
menu_items->item_compile = item;
@ -1183,7 +1183,7 @@ static void create_build_menu_tex(BuildMenuItems *menu_items)
image = gtk_image_new_from_stock("gtk-convert", GTK_ICON_SIZE_MENU);
gtk_widget_show(image);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image);
g_signal_connect((gpointer) item, "activate",
g_signal_connect(item, "activate",
G_CALLBACK(on_build_tex_activate), GINT_TO_POINTER(LATEX_CMD_TO_PDF));
menu_items->item_link = item;
@ -1198,7 +1198,7 @@ static void create_build_menu_tex(BuildMenuItems *menu_items)
gtk_tooltips_set_tip(tooltips, item, _("Builds the current file with the "
"make tool and the default target"), NULL);
GEANY_ADD_WIDGET_ACCEL(GEANY_KEYS_BUILD_MAKE, item);
g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_build_make_activate),
g_signal_connect(item, "activate", G_CALLBACK(on_build_make_activate),
GINT_TO_POINTER(GBO_MAKE_ALL));
menu_items->item_make_all = item;
@ -1209,7 +1209,7 @@ static void create_build_menu_tex(BuildMenuItems *menu_items)
gtk_container_add(GTK_CONTAINER(menu), item);
gtk_tooltips_set_tip(tooltips, item, _("Builds the current file with the "
"make tool and the specified target"), NULL);
g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_build_make_activate),
g_signal_connect(item, "activate", G_CALLBACK(on_build_make_activate),
GINT_TO_POINTER(GBO_MAKE_CUSTOM));
menu_items->item_make_custom = item;
@ -1222,14 +1222,14 @@ static void create_build_menu_tex(BuildMenuItems *menu_items)
gtk_widget_show(item);
GEANY_ADD_WIDGET_ACCEL(GEANY_KEYS_BUILD_NEXTERROR, item);
gtk_container_add(GTK_CONTAINER(menu), item);
g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_build_next_error), NULL);
g_signal_connect(item, "activate", G_CALLBACK(on_build_next_error), NULL);
menu_items->item_next_error = item;
item = gtk_image_menu_item_new_with_mnemonic(_("_Previous Error"));
gtk_widget_show(item);
/*GEANY_ADD_WIDGET_ACCEL(GEANY_KEYS_BUILD_, item);*/
gtk_container_add(GTK_CONTAINER(menu), item);
g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_build_previous_error), NULL);
g_signal_connect(item, "activate", G_CALLBACK(on_build_previous_error), NULL);
menu_items->item_previous_error = item;
item = gtk_separator_menu_item_new();
@ -1246,7 +1246,7 @@ static void create_build_menu_tex(BuildMenuItems *menu_items)
image = gtk_image_new_from_stock("gtk-find", GTK_ICON_SIZE_MENU);
gtk_widget_show(image);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image);
g_signal_connect((gpointer) item, "activate",
g_signal_connect(item, "activate",
G_CALLBACK(on_build_execute_activate), GINT_TO_POINTER(LATEX_CMD_VIEW_DVI));
menu_items->item_exec = item;
@ -1259,7 +1259,7 @@ static void create_build_menu_tex(BuildMenuItems *menu_items)
image = gtk_image_new_from_stock("gtk-find", GTK_ICON_SIZE_MENU);
gtk_widget_show(image);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image);
g_signal_connect((gpointer) item, "activate",
g_signal_connect(item, "activate",
G_CALLBACK(on_build_execute_activate), GINT_TO_POINTER(LATEX_CMD_VIEW_PDF));
menu_items->item_exec2 = item;
@ -1279,7 +1279,7 @@ static void create_build_menu_tex(BuildMenuItems *menu_items)
image = gtk_image_new_from_stock("gtk-preferences", GTK_ICON_SIZE_MENU);
gtk_widget_show(image);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image);
g_signal_connect((gpointer) item, "activate",
g_signal_connect(item, "activate",
G_CALLBACK(on_build_arguments_activate), filetypes[GEANY_FILETYPES_LATEX]);
menu_items->item_set_args = item;

View File

@ -231,11 +231,11 @@ static void create_open_file_dialog(void)
gtk_combo_box_append_text(GTK_COMBO_BOX(encoding_combo), _("Detect from file"));
gtk_combo_box_set_active(GTK_COMBO_BOX(encoding_combo), GEANY_ENCODINGS_MAX);
g_signal_connect((gpointer) ui_widgets.open_filesel, "selection-changed",
g_signal_connect(ui_widgets.open_filesel, "selection-changed",
G_CALLBACK(on_file_open_selection_changed), NULL);
g_signal_connect ((gpointer) ui_widgets.open_filesel, "delete_event",
g_signal_connect(ui_widgets.open_filesel, "delete-event",
G_CALLBACK(gtk_widget_hide_on_delete), NULL);
g_signal_connect((gpointer) ui_widgets.open_filesel, "response",
g_signal_connect(ui_widgets.open_filesel, "response",
G_CALLBACK(on_file_open_dialog_response), NULL);
}
#endif
@ -353,9 +353,9 @@ static GtkWidget *add_file_open_extra_widget()
gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 0);
gtk_widget_show_all(vbox);
g_signal_connect((gpointer) file_entry, "activate",
g_signal_connect(file_entry, "activate",
G_CALLBACK(on_file_open_entry_activate), NULL);
g_signal_connect((gpointer) check_hidden, "toggled",
g_signal_connect(check_hidden, "toggled",
G_CALLBACK(on_file_open_check_hidden_toggled), NULL);
g_object_set_data_full(G_OBJECT(ui_widgets.open_filesel), "file_entry",
@ -507,9 +507,9 @@ static void create_save_file_dialog(void)
g_object_set_data_full(G_OBJECT(ui_widgets.save_filesel), "check_open_new_tab",
gtk_widget_ref(check_open_new_tab), (GDestroyNotify) gtk_widget_unref);
g_signal_connect((gpointer) ui_widgets.save_filesel, "delete_event",
g_signal_connect(ui_widgets.save_filesel, "delete-event",
G_CALLBACK(gtk_widget_hide_on_delete), NULL);
g_signal_connect((gpointer) ui_widgets.save_filesel, "response",
g_signal_connect(ui_widgets.save_filesel, "response",
G_CALLBACK(on_file_save_dialog_response), NULL);
gtk_window_set_transient_for(GTK_WINDOW(ui_widgets.save_filesel), GTK_WINDOW(main_widgets.window));
@ -781,13 +781,13 @@ void dialogs_show_open_font()
gtk_widget_show(GTK_FONT_SELECTION_DIALOG(ui_widgets.open_fontsel)->apply_button);
g_signal_connect((gpointer) ui_widgets.open_fontsel,
"delete_event", G_CALLBACK(gtk_widget_hide_on_delete), NULL);
g_signal_connect((gpointer) GTK_FONT_SELECTION_DIALOG(ui_widgets.open_fontsel)->ok_button,
g_signal_connect(ui_widgets.open_fontsel,
"delete-event", G_CALLBACK(gtk_widget_hide_on_delete), NULL);
g_signal_connect(GTK_FONT_SELECTION_DIALOG(ui_widgets.open_fontsel)->ok_button,
"clicked", G_CALLBACK(on_font_ok_button_clicked), NULL);
g_signal_connect((gpointer) GTK_FONT_SELECTION_DIALOG(ui_widgets.open_fontsel)->cancel_button,
g_signal_connect(GTK_FONT_SELECTION_DIALOG(ui_widgets.open_fontsel)->cancel_button,
"clicked", G_CALLBACK(on_font_cancel_button_clicked), NULL);
g_signal_connect((gpointer) GTK_FONT_SELECTION_DIALOG(ui_widgets.open_fontsel)->apply_button,
g_signal_connect(GTK_FONT_SELECTION_DIALOG(ui_widgets.open_fontsel)->apply_button,
"clicked", G_CALLBACK(on_font_apply_button_clicked), NULL);
gtk_font_selection_dialog_set_font_name(
@ -880,12 +880,9 @@ static void add_input_widgets(GtkWidget *dialog, GtkWidget *vbox,
gtk_entry_set_max_length(GTK_ENTRY(entry), 255);
gtk_entry_set_width_chars(GTK_ENTRY(entry), 30);
g_signal_connect((gpointer) entry, "activate",
G_CALLBACK(on_input_entry_activate), dialog);
g_signal_connect((gpointer) dialog, "show",
G_CALLBACK(on_input_dialog_show), entry);
g_signal_connect((gpointer) dialog, "response",
G_CALLBACK(on_input_dialog_response), entry);
g_signal_connect(entry, "activate", G_CALLBACK(on_input_entry_activate), dialog);
g_signal_connect(dialog, "show", G_CALLBACK(on_input_dialog_show), entry);
g_signal_connect(dialog, "response", G_CALLBACK(on_input_dialog_response), entry);
}
@ -913,11 +910,9 @@ dialogs_show_input(const gchar *title, const gchar *label_text, const gchar *def
add_input_widgets(dialog, vbox, label_text, default_text, persistent);
if (persistent)
g_signal_connect((gpointer) dialog, "delete_event",
G_CALLBACK(gtk_widget_hide_on_delete), NULL);
g_signal_connect(dialog, "delete-event", G_CALLBACK(gtk_widget_hide_on_delete), NULL);
else
g_signal_connect((gpointer) dialog, "delete_event",
G_CALLBACK(gtk_widget_destroy), NULL);
g_signal_connect(dialog, "delete-event", G_CALLBACK(gtk_widget_destroy), NULL);
gtk_widget_show_all(dialog);
return dialog;
@ -977,8 +972,8 @@ void dialogs_show_goto_line()
gtk_entry_set_max_length(GTK_ENTRY(entry), 6);
gtk_entry_set_width_chars(GTK_ENTRY(entry), 30);
g_signal_connect((gpointer) entry, "activate", G_CALLBACK(on_goto_line_entry_activate), dialog);
g_signal_connect((gpointer) dialog, "response", G_CALLBACK(on_goto_line_dialog_response), entry);
g_signal_connect(entry, "activate", G_CALLBACK(on_goto_line_entry_activate), dialog);
g_signal_connect(dialog, "response", G_CALLBACK(on_goto_line_dialog_response), entry);
gtk_container_add(GTK_CONTAINER(vbox), label);
gtk_container_add(GTK_CONTAINER(vbox), entry);
@ -1060,7 +1055,7 @@ void dialogs_show_file_properties(GeanyDocument *doc)
vbox = ui_dialog_vbox_new(GTK_DIALOG(dialog));
g_signal_connect(dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL);
g_signal_connect(dialog, "delete_event", G_CALLBACK(gtk_widget_destroy), NULL);
g_signal_connect(dialog, "delete-event", G_CALLBACK(gtk_widget_destroy), NULL);
gtk_window_set_default_size(GTK_WINDOW(dialog), 300, -1);

View File

@ -587,7 +587,7 @@ GeanyDocument *document_new_file(const gchar *filename, GeanyFiletype *ft, const
sci_goto_pos(doc->editor->sci, 0, TRUE);
/* "the" SCI signal (connect after initial setup(i.e. adding text)) */
g_signal_connect((GtkWidget*) doc->editor->sci, "sci-notify", G_CALLBACK(on_editor_notification), doc);
g_signal_connect(doc->editor->sci, "sci-notify", G_CALLBACK(on_editor_notification), doc);
if (geany_object)
{
@ -1035,8 +1035,7 @@ GeanyDocument *document_open_file_full(GeanyDocument *doc, const gchar *filename
doc->real_path = get_real_path_from_utf8(doc->file_name);
/* "the" SCI signal (connect after initial setup(i.e. adding text)) */
g_signal_connect((GtkWidget*) doc->editor->sci, "sci-notify",
G_CALLBACK(on_editor_notification), doc);
g_signal_connect(doc->editor->sci, "sci-notify", G_CALLBACK(on_editor_notification), doc);
use_ft = (ft != NULL) ? ft : filetypes_detect_from_file(doc);
}

View File

@ -3619,16 +3619,13 @@ static ScintillaObject *create_new_sci(GeanyDocument *doc)
SSM(sci, SCI_SETSCROLLWIDTHTRACKING, 1, 0);
/* signal for insert-key(works without too, but to update the right status bar) */
/*g_signal_connect((GtkWidget*) sci, "key-press-event",
/*g_signal_connect(sci, "key-press-event",
G_CALLBACK(keybindings_got_event), GINT_TO_POINTER(new_idx));*/
/* signal for the popup menu */
g_signal_connect(G_OBJECT(sci), "button-press-event",
G_CALLBACK(on_editor_button_press_event), doc);
g_signal_connect(G_OBJECT(sci), "scroll-event",
G_CALLBACK(on_editor_scroll_event), doc);
g_signal_connect(G_OBJECT(sci), "motion-notify-event", G_CALLBACK(on_motion_event), NULL);
g_signal_connect(G_OBJECT(sci), "expose-event",
G_CALLBACK(on_editor_expose_event), doc);
g_signal_connect(sci, "button-press-event", G_CALLBACK(on_editor_button_press_event), doc);
g_signal_connect(sci, "scroll-event", G_CALLBACK(on_editor_scroll_event), doc);
g_signal_connect(sci, "motion-notify-event", G_CALLBACK(on_motion_event), NULL);
g_signal_connect(sci, "expose-event", G_CALLBACK(on_editor_expose_event), doc);
return sci;
}

View File

@ -415,7 +415,7 @@ void encodings_init(void)
item = gtk_menu_item_new_with_label(label);
gtk_widget_show(item);
gtk_container_add(GTK_CONTAINER(submenu), item);
g_signal_connect((gpointer) item, "activate",
g_signal_connect(item, "activate",
cb_func[k], GINT_TO_POINTER(encodings[j].idx));
g_free(label);
break;

View File

@ -743,7 +743,7 @@ static void create_radio_menu_item(GtkWidget *menu, const gchar *label, GeanyFil
fft->menu_item = tmp;
gtk_widget_show(tmp);
gtk_container_add(GTK_CONTAINER(menu), tmp);
g_signal_connect((gpointer) tmp, "activate", G_CALLBACK(on_filetype_change), (gpointer) ftype);
g_signal_connect(tmp, "activate", G_CALLBACK(on_filetype_change), (gpointer) ftype);
}

View File

@ -139,9 +139,9 @@ static void create_window(void)
gtk_box_pack_start(GTK_BOX(hbox2), button5, FALSE, FALSE, 0);
gtk_container_set_border_width(GTK_CONTAINER(button5), 5);
g_signal_connect((gpointer) button1, "clicked", G_CALLBACK(on_button1_clicked), NULL);
g_signal_connect((gpointer) button4, "clicked", G_CALLBACK(on_button4_clicked), NULL);
g_signal_connect((gpointer) button5, "clicked", G_CALLBACK(on_button5_clicked), NULL);
g_signal_connect(button1, "clicked", G_CALLBACK(on_button1_clicked), NULL);
g_signal_connect(button4, "clicked", G_CALLBACK(on_button4_clicked), NULL);
g_signal_connect(button5, "clicked", G_CALLBACK(on_button5_clicked), NULL);
gtk_widget_grab_focus(button4);
}
@ -293,8 +293,8 @@ static void on_button4_clicked(GtkButton *button, gpointer user_data)
GtkWidget *dialog = create_help_dialog();
GtkTextBuffer *buffer;
g_signal_connect(G_OBJECT(dialog), "delete_event", G_CALLBACK(destroydialog), G_OBJECT(dialog));
g_signal_connect(G_OBJECT(okbutton1), "clicked", G_CALLBACK(destroydialog), G_OBJECT(dialog));
g_signal_connect(dialog, "delete-event", G_CALLBACK(destroydialog), G_OBJECT(dialog));
g_signal_connect(okbutton1, "clicked", G_CALLBACK(destroydialog), G_OBJECT(dialog));
buffer = gtk_text_buffer_new(NULL);
gtk_text_buffer_set_text(buffer, help_text, strlen(help_text));
@ -1237,7 +1237,7 @@ void gb_start_easteregg(void)
{
load_images();
create_window();
g_signal_connect(G_OBJECT(gb_window), "delete_event", G_CALLBACK(gb_destroyapp), NULL);
g_signal_connect(gb_window, "delete-event", G_CALLBACK(gb_destroyapp), NULL);
points = 0;
lap = 0;

View File

@ -821,14 +821,14 @@ gint main(gint argc, gchar **argv)
}
/* registering some basic events */
g_signal_connect(G_OBJECT(main_widgets.window), "delete_event", G_CALLBACK(on_exit_clicked), NULL);
g_signal_connect(G_OBJECT(main_widgets.window), "key-press-event", G_CALLBACK(keybindings_got_event), NULL);
g_signal_connect(G_OBJECT(main_widgets.toolbar), "button-press-event", G_CALLBACK(toolbar_popup_menu), NULL);
g_signal_connect(G_OBJECT(lookup_widget(main_widgets.window, "textview_scribble")),
g_signal_connect(main_widgets.window, "delete-event", G_CALLBACK(on_exit_clicked), NULL);
g_signal_connect(main_widgets.window, "key-press-event", G_CALLBACK(keybindings_got_event), NULL);
g_signal_connect(main_widgets.toolbar, "button-press-event", G_CALLBACK(toolbar_popup_menu), NULL);
g_signal_connect(lookup_widget(main_widgets.window, "textview_scribble"),
"motion-notify-event", G_CALLBACK(on_motion_event), NULL);
g_signal_connect(G_OBJECT(lookup_widget(main_widgets.window, "entry1")),
g_signal_connect(lookup_widget(main_widgets.window, "entry1"),
"motion-notify-event", G_CALLBACK(on_motion_event), NULL);
g_signal_connect(G_OBJECT(lookup_widget(main_widgets.window, "entry_goto_line")),
g_signal_connect(lookup_widget(main_widgets.window, "entry_goto_line"),
"motion-notify-event", G_CALLBACK(on_motion_event), NULL);
#ifdef HAVE_VTE

View File

@ -88,7 +88,7 @@ void msgwin_init()
msgwindow.popup_msg_menu = create_message_popup_menu(MSG_MESSAGE);
msgwindow.popup_compiler_menu = create_message_popup_menu(MSG_COMPILER);
g_signal_connect(G_OBJECT(lookup_widget(main_widgets.window, "textview_scribble")),
g_signal_connect(lookup_widget(main_widgets.window, "textview_scribble"),
"populate-popup", G_CALLBACK(on_scribble_populate), NULL);
}
@ -119,7 +119,7 @@ static void prepare_status_tree_view(void)
gtk_widget_modify_font(msgwindow.tree_status, pfd);
pango_font_description_free(pfd);
g_signal_connect(G_OBJECT(msgwindow.tree_status), "button-press-event",
g_signal_connect(msgwindow.tree_status, "button-press-event",
G_CALLBACK(on_msgwin_button_press_event), GINT_TO_POINTER(MSG_STATUS));
}
@ -151,13 +151,13 @@ static void prepare_msg_tree_view(void)
/* use button-release-event so the selection has changed
* (connect_after button-press-event doesn't work) */
g_signal_connect(G_OBJECT(msgwindow.tree_msg), "button-release-event",
g_signal_connect(msgwindow.tree_msg, "button-release-event",
G_CALLBACK(on_msgwin_button_press_event), GINT_TO_POINTER(MSG_MESSAGE));
/* selection handling */
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(msgwindow.tree_msg));
gtk_tree_selection_set_mode(selection, GTK_SELECTION_SINGLE);
/*g_signal_connect(G_OBJECT(selection), "changed",G_CALLBACK(on_msg_tree_selection_changed), NULL);*/
/*g_signal_connect(selection, "changed",G_CALLBACK(on_msg_tree_selection_changed), NULL);*/
}
@ -184,13 +184,13 @@ static void prepare_compiler_tree_view(void)
/* use button-release-event so the selection has changed
* (connect_after button-press-event doesn't work) */
g_signal_connect(G_OBJECT(msgwindow.tree_compiler), "button-release-event",
g_signal_connect(msgwindow.tree_compiler, "button-release-event",
G_CALLBACK(on_msgwin_button_press_event), GINT_TO_POINTER(MSG_COMPILER));
/* selection handling */
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(msgwindow.tree_compiler));
gtk_tree_selection_set_mode(selection, GTK_SELECTION_SINGLE);
/*g_signal_connect(G_OBJECT(selection), "changed", G_CALLBACK(on_msg_tree_selection_changed), NULL);*/
/*g_signal_connect(selection, "changed", G_CALLBACK(on_msg_tree_selection_changed), NULL);*/
}
@ -480,13 +480,13 @@ static GtkWidget *create_message_popup_menu(gint type)
clear = gtk_image_menu_item_new_from_stock("gtk-clear", NULL);
gtk_widget_show(clear);
gtk_container_add(GTK_CONTAINER(message_popup_menu), clear);
g_signal_connect((gpointer)clear, "activate",
g_signal_connect(clear, "activate",
G_CALLBACK(on_message_treeview_clear_activate), GINT_TO_POINTER(type));
copy = gtk_image_menu_item_new_from_stock("gtk-copy", NULL);
gtk_widget_show(copy);
gtk_container_add(GTK_CONTAINER(message_popup_menu), copy);
g_signal_connect((gpointer)copy, "activate",
g_signal_connect(copy, "activate",
G_CALLBACK(on_compiler_treeview_copy_activate), GINT_TO_POINTER(type));
copy = gtk_image_menu_item_new_with_mnemonic(_("Copy _All"));
@ -495,7 +495,7 @@ static GtkWidget *create_message_popup_menu(gint type)
image = gtk_image_new_from_stock("gtk-copy", GTK_ICON_SIZE_MENU);
gtk_widget_show(image);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(copy), image);
g_signal_connect((gpointer)copy, "activate",
g_signal_connect(copy, "activate",
G_CALLBACK(on_compiler_treeview_copy_all_activate), GINT_TO_POINTER(type));
msgwin_menu_add_common_items(GTK_MENU(message_popup_menu));
@ -522,8 +522,7 @@ void msgwin_menu_add_common_items(GtkMenu *menu)
item = gtk_menu_item_new_with_mnemonic(_("_Hide Message Window"));
gtk_widget_show(item);
gtk_container_add(GTK_CONTAINER(menu), item);
g_signal_connect((gpointer)item, "activate",
G_CALLBACK(on_hide_message_window), NULL);
g_signal_connect(item, "activate", G_CALLBACK(on_hide_message_window), NULL);
}

View File

@ -92,10 +92,10 @@ static void focus_sci(GtkWidget *widget, gpointer user_data)
void notebook_init()
{
/* focus the current document after clicking on a tab */
g_signal_connect_after(G_OBJECT(main_widgets.notebook), "button-release-event",
g_signal_connect_after(main_widgets.notebook, "button-release-event",
G_CALLBACK(focus_sci), NULL);
g_signal_connect(G_OBJECT(main_widgets.notebook), "drag-data-received",
g_signal_connect(main_widgets.notebook, "drag-data-received",
G_CALLBACK(on_window_drag_data_received), NULL);
setup_tab_dnd();
@ -114,15 +114,13 @@ static void setup_tab_dnd()
if (gtk_check_version(2, 10, 0) == NULL) /* null means version ok */
{
#if GTK_CHECK_VERSION(2, 10, 0)
g_signal_connect(G_OBJECT(notebook), "page-reordered",
G_CALLBACK(notebook_page_reordered_cb), NULL);
g_signal_connect(notebook, "page-reordered", G_CALLBACK(notebook_page_reordered_cb), NULL);
#endif
return;
}
/* Set up drag movement callback */
g_signal_connect(G_OBJECT(notebook), "drag-motion",
G_CALLBACK(notebook_drag_motion_cb), NULL);
g_signal_connect(notebook, "drag-motion", G_CALLBACK(notebook_drag_motion_cb), NULL);
/* There is a bug on GTK 2.6 with drag reordering of notebook tabs.
* Clicking (not dragging) on a notebook tab, then making a selection in the
@ -137,7 +135,7 @@ static void setup_tab_dnd()
{
/* workaround GTK+2.6 drag start bug when over sci widget: */
gtk_widget_add_events(notebook, GDK_POINTER_MOTION_MASK);
g_signal_connect(G_OBJECT(notebook), "motion-notify-event",
g_signal_connect(notebook, "motion-notify-event",
G_CALLBACK(notebook_motion_notify_event_cb), NULL);
}
#endif
@ -335,8 +333,7 @@ gint notebook_new_tab(GeanyDocument *this)
ebox = gtk_event_box_new();
GTK_WIDGET_SET_FLAGS(ebox, GTK_NO_WINDOW);
g_signal_connect(G_OBJECT(ebox), "button-press-event",
G_CALLBACK(notebook_tab_label_cb), page);
g_signal_connect(ebox, "button-press-event", G_CALLBACK(notebook_tab_label_cb), page);
hbox = gtk_hbox_new(FALSE, 2);
gtk_container_add(GTK_CONTAINER(ebox), fdoc->tab_label);
@ -370,8 +367,7 @@ gint notebook_new_tab(GeanyDocument *this)
gtk_box_pack_start(GTK_BOX(hbox), align, TRUE, TRUE, 0);
g_signal_connect(G_OBJECT(btn), "clicked",
G_CALLBACK(notebook_tab_close_clicked_cb), page);
g_signal_connect(btn, "clicked", G_CALLBACK(notebook_tab_close_clicked_cb), page);
}
gtk_widget_show_all(hbox);

View File

@ -756,7 +756,7 @@ void plugins_init()
widget = gtk_menu_item_new_with_mnemonic(_("_Plugin Manager"));
gtk_container_add(GTK_CONTAINER(main_widgets.tools_menu), widget);
gtk_widget_show(widget);
g_signal_connect((gpointer) widget, "activate", G_CALLBACK(pm_show_dialog), NULL);
g_signal_connect(widget, "activate", G_CALLBACK(pm_show_dialog), NULL);
menu_separator = gtk_separator_menu_item_new();
gtk_container_add(GTK_CONTAINER(main_widgets.tools_menu), menu_separator);
@ -988,7 +988,7 @@ static void pm_prepare_treeview(GtkWidget *tree, GtkListStore *store)
column = gtk_tree_view_column_new_with_attributes(
_("Active"), checkbox_renderer, "active", PLUGIN_COLUMN_CHECK, NULL);
gtk_tree_view_append_column(GTK_TREE_VIEW(tree), column);
g_signal_connect((gpointer) checkbox_renderer, "toggled", G_CALLBACK(pm_plugin_toggled), NULL);
g_signal_connect(checkbox_renderer, "toggled", G_CALLBACK(pm_plugin_toggled), NULL);
text_renderer = gtk_cell_renderer_text_new();
column = gtk_tree_view_column_new_with_attributes(
@ -1009,7 +1009,7 @@ static void pm_prepare_treeview(GtkWidget *tree, GtkListStore *store)
/* selection handling */
sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree));
gtk_tree_selection_set_mode(sel, GTK_SELECTION_SINGLE);
g_signal_connect((gpointer) sel, "changed", G_CALLBACK(pm_selection_changed), NULL);
g_signal_connect(sel, "changed", G_CALLBACK(pm_selection_changed), NULL);
list = g_list_first(plugin_list);
if (list == NULL)
@ -1149,7 +1149,7 @@ static void pm_show_dialog(GtkMenuItem *menuitem, gpointer user_data)
pm_widgets.configure_button = gtk_button_new_from_stock(GTK_STOCK_PREFERENCES);
gtk_widget_set_sensitive(pm_widgets.configure_button, FALSE);
g_signal_connect((gpointer) pm_widgets.configure_button, "clicked",
g_signal_connect(pm_widgets.configure_button, "clicked",
G_CALLBACK(pm_on_configure_button_clicked), NULL);
label2 = gtk_label_new(_("<b>Plugin details:</b>"));
@ -1170,8 +1170,7 @@ static void pm_show_dialog(GtkMenuItem *menuitem, gpointer user_data)
gtk_box_pack_start(GTK_BOX(vbox2), swin, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(vbox2), label_vbox, FALSE, FALSE, 0);
g_signal_connect((gpointer) pm_widgets.dialog, "response",
G_CALLBACK(pm_dialog_response), NULL);
g_signal_connect(pm_widgets.dialog, "response", G_CALLBACK(pm_dialog_response), NULL);
gtk_container_add(GTK_CONTAINER(vbox), vbox2);
gtk_widget_show_all(pm_widgets.dialog);

View File

@ -139,10 +139,9 @@ static void init_kb_tree(void)
GTK_SCROLLED_WINDOW(lookup_widget(ui_widgets.prefs_dialog, "scrolledwindow8")),
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
g_signal_connect(G_OBJECT(renderer), "edited", G_CALLBACK(on_cell_edited), NULL);
g_signal_connect(G_OBJECT(tree), "button-press-event",
G_CALLBACK(on_tree_view_button_press_event), NULL);
g_signal_connect(G_OBJECT(lookup_widget(ui_widgets.prefs_dialog, "button2")), "clicked",
g_signal_connect(renderer, "edited", G_CALLBACK(on_cell_edited), NULL);
g_signal_connect(tree, "button-press-event", G_CALLBACK(on_tree_view_button_press_event), NULL);
g_signal_connect(lookup_widget(ui_widgets.prefs_dialog, "button2"), "clicked",
G_CALLBACK(on_tree_view_button_press_event), NULL);
}
@ -1192,9 +1191,9 @@ static gboolean on_tree_view_button_press_event(
gtk_misc_set_padding(GTK_MISC(dialog_label), 5, 10);
gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), dialog_label);
g_signal_connect(G_OBJECT(dialog), "key-press-event",
g_signal_connect(dialog, "key-press-event",
G_CALLBACK(on_keytype_dialog_response), NULL);
g_signal_connect(G_OBJECT(dialog), "response", G_CALLBACK(on_dialog_response), NULL);
g_signal_connect(dialog, "response", G_CALLBACK(on_dialog_response), NULL);
/* copy name to global variable to hold it, will be freed in on_dialog_response() */
dialog_key_name = g_strdup(name);
@ -1518,52 +1517,52 @@ void prefs_show_dialog(void)
ui_setup_open_button_callback(lookup_widget(ui_widgets.prefs_dialog, "startup_path_button"), NULL,
GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK_ENTRY(lookup_widget(ui_widgets.prefs_dialog, "startup_path_entry")));
g_signal_connect((gpointer) ui_widgets.prefs_dialog, "response",
g_signal_connect(ui_widgets.prefs_dialog, "response",
G_CALLBACK(on_prefs_button_clicked), NULL);
g_signal_connect((gpointer) ui_widgets.prefs_dialog, "delete_event",
g_signal_connect(ui_widgets.prefs_dialog, "delete-event",
G_CALLBACK(gtk_widget_hide_on_delete), NULL);
g_signal_connect((gpointer) lookup_widget(ui_widgets.prefs_dialog, "tagbar_font"),
g_signal_connect(lookup_widget(ui_widgets.prefs_dialog, "tagbar_font"),
"font-set", G_CALLBACK(on_prefs_font_choosed), GINT_TO_POINTER(1));
g_signal_connect((gpointer) lookup_widget(ui_widgets.prefs_dialog, "msgwin_font"),
g_signal_connect(lookup_widget(ui_widgets.prefs_dialog, "msgwin_font"),
"font-set", G_CALLBACK(on_prefs_font_choosed), GINT_TO_POINTER(2));
g_signal_connect((gpointer) lookup_widget(ui_widgets.prefs_dialog, "editor_font"),
g_signal_connect(lookup_widget(ui_widgets.prefs_dialog, "editor_font"),
"font-set", G_CALLBACK(on_prefs_font_choosed), GINT_TO_POINTER(3));
g_signal_connect((gpointer) lookup_widget(ui_widgets.prefs_dialog, "long_line_color"),
g_signal_connect(lookup_widget(ui_widgets.prefs_dialog, "long_line_color"),
"color-set", G_CALLBACK(on_prefs_color_choosed), GINT_TO_POINTER(1));
/* file chooser buttons in the tools tab */
g_signal_connect((gpointer) lookup_widget(ui_widgets.prefs_dialog, "button_make"),
g_signal_connect(lookup_widget(ui_widgets.prefs_dialog, "button_make"),
"clicked", G_CALLBACK(on_prefs_tools_button_clicked), lookup_widget(ui_widgets.prefs_dialog, "entry_com_make"));
g_signal_connect((gpointer) lookup_widget(ui_widgets.prefs_dialog, "button_term"),
g_signal_connect(lookup_widget(ui_widgets.prefs_dialog, "button_term"),
"clicked", G_CALLBACK(on_prefs_tools_button_clicked), lookup_widget(ui_widgets.prefs_dialog, "entry_com_term"));
g_signal_connect((gpointer) lookup_widget(ui_widgets.prefs_dialog, "button_browser"),
g_signal_connect(lookup_widget(ui_widgets.prefs_dialog, "button_browser"),
"clicked", G_CALLBACK(on_prefs_tools_button_clicked), lookup_widget(ui_widgets.prefs_dialog, "entry_browser"));
g_signal_connect((gpointer) lookup_widget(ui_widgets.prefs_dialog, "button_grep"),
g_signal_connect(lookup_widget(ui_widgets.prefs_dialog, "button_grep"),
"clicked", G_CALLBACK(on_prefs_tools_button_clicked), lookup_widget(ui_widgets.prefs_dialog, "entry_grep"));
/* tools commands */
g_signal_connect((gpointer) lookup_widget(ui_widgets.prefs_dialog, "button_contextaction"),
g_signal_connect(lookup_widget(ui_widgets.prefs_dialog, "button_contextaction"),
"clicked", G_CALLBACK(on_prefs_tools_button_clicked), lookup_widget(ui_widgets.prefs_dialog, "entry_contextaction"));
g_signal_connect((gpointer) lookup_widget(ui_widgets.prefs_dialog, "button_contextaction"),
g_signal_connect(lookup_widget(ui_widgets.prefs_dialog, "button_contextaction"),
"clicked", G_CALLBACK(on_prefs_tools_button_clicked), lookup_widget(ui_widgets.prefs_dialog, "entry_contextaction"));
/* printing */
g_signal_connect((gpointer) lookup_widget(ui_widgets.prefs_dialog, "button_print_external_cmd"),
g_signal_connect(lookup_widget(ui_widgets.prefs_dialog, "button_print_external_cmd"),
"clicked", G_CALLBACK(on_prefs_tools_button_clicked), lookup_widget(ui_widgets.prefs_dialog, "entry_print_external_cmd"));
g_signal_connect((gpointer) lookup_widget(ui_widgets.prefs_dialog, "radio_print_gtk"),
g_signal_connect(lookup_widget(ui_widgets.prefs_dialog, "radio_print_gtk"),
"toggled", G_CALLBACK(on_prefs_print_radio_button_toggled), NULL);
g_signal_connect((gpointer) lookup_widget(ui_widgets.prefs_dialog, "check_print_pageheader"),
g_signal_connect(lookup_widget(ui_widgets.prefs_dialog, "check_print_pageheader"),
"toggled", G_CALLBACK(on_prefs_print_page_header_toggled), NULL);
g_signal_connect((gpointer) lookup_widget(ui_widgets.prefs_dialog, "check_toolbar_show"),
g_signal_connect(lookup_widget(ui_widgets.prefs_dialog, "check_toolbar_show"),
"toggled", G_CALLBACK(on_toolbar_show_toggled), NULL);
g_signal_connect((gpointer) lookup_widget(ui_widgets.prefs_dialog, "check_show_notebook_tabs"),
g_signal_connect(lookup_widget(ui_widgets.prefs_dialog, "check_show_notebook_tabs"),
"toggled", G_CALLBACK(on_show_notebook_tabs_toggled), NULL);
g_signal_connect((gpointer) lookup_widget(ui_widgets.prefs_dialog, "check_folding"),
g_signal_connect(lookup_widget(ui_widgets.prefs_dialog, "check_folding"),
"toggled", G_CALLBACK(on_use_folding_toggled), NULL);
g_signal_connect((gpointer) lookup_widget(ui_widgets.prefs_dialog, "check_open_encoding"),
g_signal_connect(lookup_widget(ui_widgets.prefs_dialog, "check_open_encoding"),
"toggled", G_CALLBACK(on_open_encoding_toggled), NULL);
g_signal_connect((gpointer) lookup_widget(ui_widgets.prefs_dialog, "check_list_openfiles"),
g_signal_connect(lookup_widget(ui_widgets.prefs_dialog, "check_list_openfiles"),
"toggled", G_CALLBACK(on_openfiles_visible_toggled), NULL);
}

View File

@ -357,7 +357,7 @@ static GtkWidget *create_custom_widget(GtkPrintOperation *operation, gpointer us
gtk_tooltips_set_tip(tooltips, w->check_print_pageheader, _("Adds a little header to every page containing the page number, the filename and the current date(see below). It takes 3 lines of the page."), NULL);
gtk_button_set_focus_on_click(GTK_BUTTON(w->check_print_pageheader), FALSE);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w->check_print_pageheader), printing_prefs.print_page_header);
g_signal_connect((gpointer) w->check_print_pageheader, "toggled", G_CALLBACK(on_page_header_toggled), w);
g_signal_connect(w->check_print_pageheader, "toggled", G_CALLBACK(on_page_header_toggled), w);
frame33 = gtk_frame_new(NULL);
gtk_box_pack_start(GTK_BOX(page), frame33, FALSE, FALSE, 0);

View File

@ -142,8 +142,7 @@ void project_new()
e->file_name = gtk_entry_new();
gtk_entry_set_width_chars(GTK_ENTRY(e->file_name), 30);
button = gtk_button_new();
g_signal_connect((gpointer) button, "clicked",
G_CALLBACK(on_file_save_button_clicked), e);
g_signal_connect(button, "clicked", G_CALLBACK(on_file_save_button_clicked), e);
image = gtk_image_new_from_stock("gtk-open", GTK_ICON_SIZE_BUTTON);
gtk_container_add(GTK_CONTAINER(button), image);
bbox = gtk_hbox_new(FALSE, 6);
@ -168,12 +167,12 @@ void project_new()
gtk_container_add(GTK_CONTAINER(vbox), table);
/* signals */
g_signal_connect((gpointer) e->name, "changed", G_CALLBACK(on_name_entry_changed), e);
g_signal_connect(e->name, "changed", G_CALLBACK(on_name_entry_changed), e);
/* run the callback manually to initialise the base_path and file_name fields */
on_name_entry_changed(GTK_EDITABLE(e->name), e);
g_signal_connect((gpointer) e->file_name, "changed", G_CALLBACK(on_entries_changed), e);
g_signal_connect((gpointer) e->base_path, "changed", G_CALLBACK(on_entries_changed), e);
g_signal_connect(e->file_name, "changed", G_CALLBACK(on_entries_changed), e);
g_signal_connect(e->base_path, "changed", G_CALLBACK(on_entries_changed), e);
gtk_widget_show_all(e->dialog);
@ -442,8 +441,7 @@ static void create_properties_dialog(PropertyDialogElements *e)
"Options can be appended to the command. "
"Leave blank to use the default run command."), NULL);
button = gtk_button_new();
g_signal_connect((gpointer) button, "clicked",
G_CALLBACK(on_file_open_button_clicked), e->run_cmd);
g_signal_connect(button, "clicked", G_CALLBACK(on_file_open_button_clicked), e->run_cmd);
image = gtk_image_new_from_stock("gtk-open", GTK_ICON_SIZE_BUTTON);
gtk_container_add(GTK_CONTAINER(button), image);
bbox = gtk_hbox_new(FALSE, 6);

View File

@ -142,7 +142,7 @@ static GtkWidget *add_find_checkboxes(GtkDialog *dialog)
gtk_button_set_focus_on_click(GTK_BUTTON(check_regexp), FALSE);
gtk_tooltips_set_tip(tooltips, check_regexp, _("Use POSIX-like regular expressions. "
"For detailed information about using regular expressions, please read the documentation."), NULL);
g_signal_connect(G_OBJECT(check_regexp), "toggled",
g_signal_connect(check_regexp, "toggled",
G_CALLBACK(on_find_replace_checkbutton_toggled), GTK_WIDGET(dialog));
if (dialog != GTK_DIALOG(widgets.find_dialog))
@ -329,11 +329,11 @@ void search_show_find_dialog(void)
g_object_set_data_full(G_OBJECT(widgets.find_dialog), "entry",
gtk_widget_ref(entry), (GDestroyNotify)gtk_widget_unref);
g_signal_connect((gpointer) gtk_bin_get_child(GTK_BIN(entry)), "activate",
g_signal_connect(gtk_bin_get_child(GTK_BIN(entry)), "activate",
G_CALLBACK(on_find_entry_activate), NULL);
g_signal_connect((gpointer) widgets.find_dialog, "response",
g_signal_connect(widgets.find_dialog, "response",
G_CALLBACK(on_find_dialog_response), entry);
g_signal_connect((gpointer) widgets.find_dialog, "delete_event",
g_signal_connect(widgets.find_dialog, "delete-event",
G_CALLBACK(gtk_widget_hide_on_delete), NULL);
sbox = gtk_hbox_new(FALSE, 6);
@ -352,17 +352,17 @@ void search_show_find_dialog(void)
gtk_tooltips_set_tip(tooltips, button,
_("Mark all matches in the current document."), NULL);
gtk_container_add(GTK_CONTAINER(bbox), button);
g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(send_find_dialog_response),
g_signal_connect(button, "clicked", G_CALLBACK(send_find_dialog_response),
GINT_TO_POINTER(GEANY_RESPONSE_MARK));
button = gtk_button_new_with_mnemonic(_("In Sessi_on"));
gtk_container_add(GTK_CONTAINER(bbox), button);
g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(send_find_dialog_response),
g_signal_connect(button, "clicked", G_CALLBACK(send_find_dialog_response),
GINT_TO_POINTER(GEANY_RESPONSE_FIND_IN_SESSION));
button = gtk_button_new_with_mnemonic(_("_In Document"));
gtk_container_add(GTK_CONTAINER(bbox), button);
g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(send_find_dialog_response),
g_signal_connect(button, "clicked", G_CALLBACK(send_find_dialog_response),
GINT_TO_POINTER(GEANY_RESPONSE_FIND_IN_FILE));
/* close window checkbox */
@ -462,14 +462,14 @@ void search_show_replace_dialog(void)
g_object_set_data_full(G_OBJECT(widgets.replace_dialog), "entry_replace",
gtk_widget_ref(entry_replace), (GDestroyNotify)gtk_widget_unref);
g_signal_connect((gpointer) gtk_bin_get_child(GTK_BIN(entry_find)),
g_signal_connect(gtk_bin_get_child(GTK_BIN(entry_find)),
"key-press-event", G_CALLBACK(on_widget_key_pressed_set_focus),
gtk_bin_get_child(GTK_BIN(entry_replace)));
g_signal_connect((gpointer) gtk_bin_get_child(GTK_BIN(entry_replace)), "activate",
g_signal_connect(gtk_bin_get_child(GTK_BIN(entry_replace)), "activate",
G_CALLBACK(on_replace_entry_activate), NULL);
g_signal_connect((gpointer) widgets.replace_dialog, "response",
g_signal_connect(widgets.replace_dialog, "response",
G_CALLBACK(on_replace_dialog_response), entry_replace);
g_signal_connect((gpointer) widgets.replace_dialog, "delete_event",
g_signal_connect(widgets.replace_dialog, "delete-event",
G_CALLBACK(gtk_widget_hide_on_delete), NULL);
fbox = gtk_hbox_new(FALSE, 6);
@ -498,17 +498,17 @@ void search_show_replace_dialog(void)
gtk_tooltips_set_tip(tooltips, button,
_("Replace all matches found in the currently selected text"), NULL);
gtk_container_add(GTK_CONTAINER(bbox), button);
g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(send_replace_dialog_response),
g_signal_connect(button, "clicked", G_CALLBACK(send_replace_dialog_response),
GINT_TO_POINTER(GEANY_RESPONSE_REPLACE_IN_SEL));
button = gtk_button_new_with_mnemonic(_("In Sessi_on"));
gtk_container_add(GTK_CONTAINER(bbox), button);
g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(send_replace_dialog_response),
g_signal_connect(button, "clicked", G_CALLBACK(send_replace_dialog_response),
GINT_TO_POINTER(GEANY_RESPONSE_REPLACE_IN_SESSION));
button = gtk_button_new_with_mnemonic(_("_In Document"));
gtk_container_add(GTK_CONTAINER(bbox), button);
g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(send_replace_dialog_response),
g_signal_connect(button, "clicked", G_CALLBACK(send_replace_dialog_response),
GINT_TO_POINTER(GEANY_RESPONSE_REPLACE_IN_FILE));
/* close window checkbox */
@ -696,7 +696,7 @@ void search_show_find_in_files_dialog(const gchar *dir)
_("Other options to pass to Grep"), NULL);
/* enable entry_extra when check_extra is checked */
g_signal_connect(G_OBJECT(check_extra), "toggled",
g_signal_connect(check_extra, "toggled",
G_CALLBACK(on_extra_options_toggled), entry_extra);
hbox = gtk_hbox_new(FALSE, 6);
@ -704,11 +704,11 @@ void search_show_find_in_files_dialog(const gchar *dir)
gtk_box_pack_start(GTK_BOX(hbox), entry_extra, TRUE, TRUE, 0);
gtk_container_add(GTK_CONTAINER(vbox), hbox);
g_signal_connect((gpointer) dir_combo, "key-press-event",
g_signal_connect(dir_combo, "key-press-event",
G_CALLBACK(on_widget_key_pressed_set_focus), combo);
g_signal_connect((gpointer) widgets.find_in_files_dialog, "response",
g_signal_connect(widgets.find_in_files_dialog, "response",
G_CALLBACK(on_find_in_files_dialog_response), combo);
g_signal_connect((gpointer) widgets.find_in_files_dialog, "delete_event",
g_signal_connect(widgets.find_in_files_dialog, "delete-event",
G_CALLBACK(gtk_widget_hide_on_delete), NULL);
gtk_widget_show_all(widgets.find_in_files_dialog);

View File

@ -351,10 +351,8 @@ static void create_new_menu_items(void)
gtk_widget_show(tmp_button);
gtk_container_add(GTK_CONTAINER(new_with_template_menu), tmp_menu);
gtk_container_add(GTK_CONTAINER(ui_widgets.new_file_menu), tmp_button);
g_signal_connect((gpointer) tmp_menu, "activate",
G_CALLBACK(on_new_with_template), (gpointer) ft);
g_signal_connect((gpointer) tmp_button, "activate",
G_CALLBACK(on_new_with_template), (gpointer) ft);
g_signal_connect(tmp_menu, "activate", G_CALLBACK(on_new_with_template), (gpointer) ft);
g_signal_connect(tmp_button, "activate", G_CALLBACK(on_new_with_template), (gpointer) ft);
}
}
@ -417,10 +415,8 @@ static void add_file_item(gpointer data, gpointer user_data)
gtk_widget_show(tmp_button);
gtk_container_add(GTK_CONTAINER(new_with_template_menu), tmp_menu);
gtk_container_add(GTK_CONTAINER(ui_widgets.new_file_menu), tmp_button);
g_signal_connect((gpointer) tmp_menu, "activate",
G_CALLBACK(on_new_with_file_template), NULL);
g_signal_connect((gpointer) tmp_button, "activate",
G_CALLBACK(on_new_with_file_template), NULL);
g_signal_connect(tmp_menu, "activate", G_CALLBACK(on_new_with_file_template), NULL);
g_signal_connect(tmp_button, "activate", G_CALLBACK(on_new_with_file_template), NULL);
}

View File

@ -332,8 +332,7 @@ static void cc_show_dialog_custom_commands(void)
}
button = gtk_button_new_from_stock("gtk-add");
g_signal_connect((gpointer) button, "clicked",
G_CALLBACK(cc_on_custom_commands_dlg_add_clicked), &cc);
g_signal_connect(button, "clicked", G_CALLBACK(cc_on_custom_commands_dlg_add_clicked), &cc);
gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0);
gtk_widget_show_all(vbox);
@ -466,7 +465,7 @@ static void cc_insert_custom_command_items(GtkMenu *me, GtkMenu *mp, gchar *labe
kb->key, kb->mods, GTK_ACCEL_VISIBLE);
gtk_container_add(GTK_CONTAINER(me), item);
gtk_widget_show(item);
g_signal_connect((gpointer) item, "activate", G_CALLBACK(cc_on_custom_command_activate),
g_signal_connect(item, "activate", G_CALLBACK(cc_on_custom_command_activate),
GINT_TO_POINTER(idx));
item = gtk_menu_item_new_with_label(label);
@ -475,7 +474,7 @@ static void cc_insert_custom_command_items(GtkMenu *me, GtkMenu *mp, gchar *labe
kb->key, kb->mods, GTK_ACCEL_VISIBLE);
gtk_container_add(GTK_CONTAINER(mp), item);
gtk_widget_show(item);
g_signal_connect((gpointer) item, "activate", G_CALLBACK(cc_on_custom_command_activate),
g_signal_connect(item, "activate", G_CALLBACK(cc_on_custom_command_activate),
GINT_TO_POINTER(idx));
}
@ -539,9 +538,9 @@ void tools_create_insert_custom_command_menu_items(void)
if (! signal_set)
{
g_signal_connect((gpointer) lookup_widget(main_widgets.editor_menu, "send_selection_to1"),
g_signal_connect(lookup_widget(main_widgets.editor_menu, "send_selection_to1"),
"activate", G_CALLBACK(cc_on_custom_command_menu_activate), menu_popup);
g_signal_connect((gpointer) lookup_widget(main_widgets.window, "send_selection_to2"),
g_signal_connect(lookup_widget(main_widgets.window, "send_selection_to2"),
"activate", G_CALLBACK(cc_on_custom_command_menu_activate), menu_edit);
signal_set = TRUE;
}
@ -751,7 +750,7 @@ void tools_color_chooser(gchar *color)
G_CALLBACK(on_color_cancel_button_clicked), NULL);
g_signal_connect(GTK_COLOR_SELECTION_DIALOG(ui_widgets.open_colorsel)->ok_button, "clicked",
G_CALLBACK(on_color_ok_button_clicked), NULL);
g_signal_connect(ui_widgets.open_colorsel, "delete_event",
g_signal_connect(ui_widgets.open_colorsel, "delete-event",
G_CALLBACK(gtk_widget_hide_on_delete), NULL);
}
/* if color is non-NULL set it in the dialog as preselected color */

View File

@ -119,9 +119,9 @@ static void prepare_taglist(GtkWidget *tree, GtkTreeStore *store)
pango_font_description_free(pfd);
gtk_tree_view_set_model(GTK_TREE_VIEW(tree), GTK_TREE_MODEL(store));
g_signal_connect(G_OBJECT(tree), "button-press-event",
g_signal_connect(tree, "button-press-event",
G_CALLBACK(on_treeviews_button_press_event), GINT_TO_POINTER(TREEVIEW_SYMBOL));
g_signal_connect(G_OBJECT(tree), "key-press-event",
g_signal_connect(tree, "key-press-event",
G_CALLBACK(on_treeviews_key_press_event), GINT_TO_POINTER(TREEVIEW_SYMBOL));
gtk_tree_view_set_enable_search(GTK_TREE_VIEW(tree), FALSE);
@ -172,7 +172,7 @@ void treeviews_update_tag_list(GeanyDocument *doc, gboolean update)
gtk_misc_set_alignment(GTK_MISC(label), 0.1, 0.01);
gtk_container_add(GTK_CONTAINER(tv.default_tag_tree), label);
gtk_widget_show_all(tv.default_tag_tree);
g_signal_connect(G_OBJECT(tv.default_tag_tree), "button-press-event",
g_signal_connect(tv.default_tag_tree, "button-press-event",
G_CALLBACK(on_default_tag_tree_button_press_event), NULL);
g_object_ref((gpointer)tv.default_tag_tree); /* to hold it after removing */
}
@ -284,17 +284,17 @@ static void prepare_openfiles(void)
#if GTK_CHECK_VERSION(2, 12, 0)
/* GTK 2.12 tooltips */
gtk_widget_set_has_tooltip(tv.tree_openfiles, TRUE);
g_signal_connect(G_OBJECT(tv.tree_openfiles), "query-tooltip",
g_signal_connect(tv.tree_openfiles, "query-tooltip",
G_CALLBACK(on_treeviews_tooltip_queried), NULL);
#endif
g_signal_connect(G_OBJECT(tv.tree_openfiles), "button-press-event",
g_signal_connect(tv.tree_openfiles, "button-press-event",
G_CALLBACK(on_treeviews_button_press_event), GINT_TO_POINTER(TREEVIEW_OPENFILES));
/* selection handling */
select = gtk_tree_view_get_selection(GTK_TREE_VIEW(tv.tree_openfiles));
gtk_tree_selection_set_mode(select, GTK_SELECTION_SINGLE);
g_signal_connect(G_OBJECT(select), "changed", G_CALLBACK(on_openfiles_tree_selection_changed), NULL);
g_signal_connect(select, "changed", G_CALLBACK(on_openfiles_tree_selection_changed), NULL);
}
@ -377,15 +377,13 @@ static void create_taglist_popup_menu(void)
item = gtk_menu_item_new_with_mnemonic(_("Sort by _Name"));
gtk_widget_show(item);
gtk_container_add(GTK_CONTAINER(tv.popup_taglist), item);
g_signal_connect((gpointer) item, "activate",
G_CALLBACK(on_taglist_tree_popup_clicked),
g_signal_connect(item, "activate", G_CALLBACK(on_taglist_tree_popup_clicked),
GINT_TO_POINTER(SYMBOL_ACTION_SORT_BY_NAME));
item = gtk_menu_item_new_with_mnemonic(_("Sort by _Appearance"));
gtk_widget_show(item);
gtk_container_add(GTK_CONTAINER(tv.popup_taglist), item);
g_signal_connect((gpointer) item, "activate",
G_CALLBACK(on_taglist_tree_popup_clicked),
g_signal_connect(item, "activate", G_CALLBACK(on_taglist_tree_popup_clicked),
GINT_TO_POINTER(SYMBOL_ACTION_SORT_BY_APPEARANCE));
item = gtk_separator_menu_item_new();
@ -395,13 +393,13 @@ static void create_taglist_popup_menu(void)
mi.symbols_show_symbols = gtk_check_menu_item_new_with_mnemonic(_("Show S_ymbol List"));
gtk_widget_show(mi.symbols_show_symbols);
gtk_container_add(GTK_CONTAINER(tv.popup_taglist), mi.symbols_show_symbols);
g_signal_connect((gpointer) mi.symbols_show_symbols, "activate",
g_signal_connect(mi.symbols_show_symbols, "activate",
G_CALLBACK(on_list_symbol_activate), NULL);
mi.symbols_show_documents = gtk_check_menu_item_new_with_mnemonic(_("Show _Document List"));
gtk_widget_show(mi.symbols_show_documents);
gtk_container_add(GTK_CONTAINER(tv.popup_taglist), mi.symbols_show_documents);
g_signal_connect((gpointer) mi.symbols_show_documents, "activate",
g_signal_connect(mi.symbols_show_documents, "activate",
G_CALLBACK(on_list_document_activate), NULL);
item = gtk_image_menu_item_new_with_mnemonic(_("H_ide Sidebar"));
@ -409,8 +407,8 @@ static void create_taglist_popup_menu(void)
gtk_image_new_from_stock("gtk-close", GTK_ICON_SIZE_MENU));
gtk_widget_show(item);
gtk_container_add(GTK_CONTAINER(tv.popup_taglist), item);
g_signal_connect((gpointer) item, "activate",
G_CALLBACK(on_taglist_tree_popup_clicked), GINT_TO_POINTER(SYMBOL_ACTION_HIDE_ALL));
g_signal_connect(item, "activate", G_CALLBACK(on_taglist_tree_popup_clicked),
GINT_TO_POINTER(SYMBOL_ACTION_HIDE_ALL));
}
@ -444,7 +442,7 @@ static void create_openfiles_popup_menu(void)
item = gtk_image_menu_item_new_from_stock("gtk-close", NULL);
gtk_widget_show(item);
gtk_container_add(GTK_CONTAINER(tv.popup_openfiles), item);
g_signal_connect((gpointer) item, "activate",
g_signal_connect(item, "activate",
G_CALLBACK(on_openfiles_document_action), GINT_TO_POINTER(OPENFILES_ACTION_REMOVE));
item = gtk_separator_menu_item_new();
@ -454,7 +452,7 @@ static void create_openfiles_popup_menu(void)
item = gtk_image_menu_item_new_from_stock("gtk-save", NULL);
gtk_widget_show(item);
gtk_container_add(GTK_CONTAINER(tv.popup_openfiles), item);
g_signal_connect((gpointer) item, "activate",
g_signal_connect(item, "activate",
G_CALLBACK(on_openfiles_document_action), GINT_TO_POINTER(OPENFILES_ACTION_SAVE));
item = gtk_image_menu_item_new_with_mnemonic(_("_Reload"));
@ -462,7 +460,7 @@ static void create_openfiles_popup_menu(void)
gtk_image_new_from_stock("gtk-revert-to-saved", GTK_ICON_SIZE_MENU));
gtk_widget_show(item);
gtk_container_add(GTK_CONTAINER(tv.popup_openfiles), item);
g_signal_connect((gpointer) item, "activate",
g_signal_connect(item, "activate",
G_CALLBACK(on_openfiles_document_action), GINT_TO_POINTER(OPENFILES_ACTION_RELOAD));
item = gtk_separator_menu_item_new();
@ -472,7 +470,7 @@ static void create_openfiles_popup_menu(void)
mi.documents_fullpath = gtk_check_menu_item_new_with_mnemonic(_("Show _Full Path Name"));
gtk_widget_show(mi.documents_fullpath);
gtk_container_add(GTK_CONTAINER(tv.popup_openfiles), mi.documents_fullpath);
g_signal_connect((gpointer) mi.documents_fullpath, "activate",
g_signal_connect(mi.documents_fullpath, "activate",
G_CALLBACK(on_openfiles_fullpath_activate), NULL);
item = gtk_separator_menu_item_new();
@ -482,13 +480,13 @@ static void create_openfiles_popup_menu(void)
mi.documents_show_symbols = gtk_check_menu_item_new_with_mnemonic(_("Show S_ymbol List"));
gtk_widget_show(mi.documents_show_symbols);
gtk_container_add(GTK_CONTAINER(tv.popup_openfiles), mi.documents_show_symbols);
g_signal_connect((gpointer) mi.documents_show_symbols, "activate",
g_signal_connect(mi.documents_show_symbols, "activate",
G_CALLBACK(on_list_symbol_activate), NULL);
mi.documents_show_documents = gtk_check_menu_item_new_with_mnemonic(_("Show _Document List"));
gtk_widget_show(mi.documents_show_documents);
gtk_container_add(GTK_CONTAINER(tv.popup_openfiles), mi.documents_show_documents);
g_signal_connect((gpointer) mi.documents_show_documents, "activate",
g_signal_connect(mi.documents_show_documents, "activate",
G_CALLBACK(on_list_document_activate), NULL);
item = gtk_image_menu_item_new_with_mnemonic(_("H_ide Sidebar"));
@ -496,8 +494,7 @@ static void create_openfiles_popup_menu(void)
gtk_image_new_from_stock("gtk-close", GTK_ICON_SIZE_MENU));
gtk_widget_show(item);
gtk_container_add(GTK_CONTAINER(tv.popup_openfiles), item);
g_signal_connect((gpointer) item, "activate",
G_CALLBACK(on_openfiles_hide_item_clicked), NULL);
g_signal_connect(item, "activate", G_CALLBACK(on_openfiles_hide_item_clicked), NULL);
}

View File

@ -409,9 +409,9 @@ static void insert_include_items(GtkMenu *me, GtkMenu *mp, gchar **includes, gch
tmp_popup = gtk_menu_item_new_with_label(includes[i]);
gtk_container_add(GTK_CONTAINER(edit_menu), tmp_menu);
gtk_container_add(GTK_CONTAINER(popup_menu), tmp_popup);
g_signal_connect((gpointer) tmp_menu, "activate",
g_signal_connect(tmp_menu, "activate",
G_CALLBACK(on_menu_insert_include_activate), (gpointer) includes[i]);
g_signal_connect((gpointer) tmp_popup, "activate",
g_signal_connect(tmp_popup, "activate",
G_CALLBACK(on_insert_include_activate), (gpointer) includes[i]);
i++;
}
@ -450,7 +450,7 @@ void ui_create_insert_menu_items(void)
blank = gtk_menu_item_new_with_label("#include \"...\"");
gtk_container_add(GTK_CONTAINER(menu_edit), blank);
gtk_widget_show(blank);
g_signal_connect((gpointer) blank, "activate", G_CALLBACK(on_menu_insert_include_activate),
g_signal_connect(blank, "activate", G_CALLBACK(on_menu_insert_include_activate),
(gpointer) "blank");
blank = gtk_separator_menu_item_new ();
gtk_container_add(GTK_CONTAINER(menu_edit), blank);
@ -459,7 +459,7 @@ void ui_create_insert_menu_items(void)
blank = gtk_menu_item_new_with_label("#include \"...\"");
gtk_container_add(GTK_CONTAINER(menu_popup), blank);
gtk_widget_show(blank);
g_signal_connect((gpointer) blank, "activate", G_CALLBACK(on_insert_include_activate),
g_signal_connect(blank, "activate", G_CALLBACK(on_insert_include_activate),
(gpointer) "blank");
blank = gtk_separator_menu_item_new();
gtk_container_add(GTK_CONTAINER(menu_popup), blank);
@ -480,12 +480,12 @@ static void insert_date_items(GtkMenu *me, GtkMenu *mp, gchar *label)
item = gtk_menu_item_new_with_mnemonic(label);
gtk_container_add(GTK_CONTAINER(me), item);
gtk_widget_show(item);
g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_menu_insert_date_activate), label);
g_signal_connect(item, "activate", G_CALLBACK(on_menu_insert_date_activate), label);
item = gtk_menu_item_new_with_mnemonic(label);
gtk_container_add(GTK_CONTAINER(mp), item);
gtk_widget_show(item);
g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_insert_date_activate), label);
g_signal_connect(item, "activate", G_CALLBACK(on_insert_date_activate), label);
}
@ -522,18 +522,16 @@ void ui_create_insert_date_menu_items(void)
item = gtk_menu_item_new_with_mnemonic(str);
gtk_container_add(GTK_CONTAINER(menu_edit), item);
gtk_widget_show(item);
g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_menu_insert_date_activate),
str);
g_object_set_data_full(G_OBJECT(main_widgets.window), "insert_date_custom1", gtk_widget_ref(item),
(GDestroyNotify)gtk_widget_unref);
g_signal_connect(item, "activate", G_CALLBACK(on_menu_insert_date_activate), str);
g_object_set_data_full(G_OBJECT(main_widgets.window),
"insert_date_custom1", gtk_widget_ref(item), (GDestroyNotify)gtk_widget_unref);
item = gtk_menu_item_new_with_mnemonic(str);
gtk_container_add(GTK_CONTAINER(menu_popup), item);
gtk_widget_show(item);
g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_insert_date_activate),
str);
g_object_set_data_full(G_OBJECT(main_widgets.editor_menu), "insert_date_custom2", gtk_widget_ref(item),
(GDestroyNotify)gtk_widget_unref);
g_signal_connect(item, "activate", G_CALLBACK(on_insert_date_activate), str);
g_object_set_data_full(G_OBJECT(main_widgets.editor_menu),
"insert_date_custom2", gtk_widget_ref(item), (GDestroyNotify)gtk_widget_unref);
insert_date_items(menu_edit, menu_popup, _("_Set Custom Date Format"));
}
@ -884,14 +882,12 @@ void ui_create_recent_menu(void)
tmp = gtk_menu_item_new_with_label(filename);
gtk_widget_show(tmp);
gtk_menu_shell_append(GTK_MENU_SHELL(ui_widgets.recent_files_menubar), tmp);
g_signal_connect((gpointer) tmp, "activate",
G_CALLBACK(recent_file_activate_cb), NULL);
g_signal_connect(tmp, "activate", G_CALLBACK(recent_file_activate_cb), NULL);
/* create menu item for the recent files menu in the toolbar bar */
tmp = gtk_menu_item_new_with_label(filename);
gtk_widget_show(tmp);
gtk_menu_shell_append(GTK_MENU_SHELL(ui_widgets.recent_files_toolbar), tmp);
g_signal_connect((gpointer) tmp, "activate",
G_CALLBACK(recent_file_activate_cb), NULL);
g_signal_connect(tmp, "activate", G_CALLBACK(recent_file_activate_cb), NULL);
}
}
@ -995,14 +991,12 @@ static void recent_file_loaded(const gchar *utf8_filename)
tmp = gtk_menu_item_new_with_label(utf8_filename);
gtk_widget_show(tmp);
gtk_menu_shell_prepend(GTK_MENU_SHELL(ui_widgets.recent_files_menubar), tmp);
g_signal_connect((gpointer) tmp, "activate",
G_CALLBACK(recent_file_activate_cb), NULL);
g_signal_connect(tmp, "activate", G_CALLBACK(recent_file_activate_cb), NULL);
/* then for the recent files menu in the tool bar */
tmp = gtk_menu_item_new_with_label(utf8_filename);
gtk_widget_show(tmp);
gtk_menu_shell_prepend(GTK_MENU_SHELL(ui_widgets.recent_files_toolbar), tmp);
g_signal_connect((gpointer) tmp, "activate",
G_CALLBACK(recent_file_activate_cb), NULL);
g_signal_connect(tmp, "activate", G_CALLBACK(recent_file_activate_cb), NULL);
}
@ -1050,14 +1044,12 @@ static void update_recent_menu(void)
tmp = gtk_menu_item_new_with_label(filename);
gtk_widget_show(tmp);
gtk_menu_shell_prepend(GTK_MENU_SHELL(ui_widgets.recent_files_menubar), tmp);
g_signal_connect((gpointer) tmp, "activate",
G_CALLBACK(recent_file_activate_cb), NULL);
g_signal_connect(tmp, "activate", G_CALLBACK(recent_file_activate_cb), NULL);
/* create item for the tool bar menu */
tmp = gtk_menu_item_new_with_label(filename);
gtk_widget_show(tmp);
gtk_menu_shell_prepend(GTK_MENU_SHELL(ui_widgets.recent_files_toolbar), tmp);
g_signal_connect((gpointer) tmp, "activate",
G_CALLBACK(recent_file_activate_cb), NULL);
g_signal_connect(tmp, "activate", G_CALLBACK(recent_file_activate_cb), NULL);
}
@ -1354,13 +1346,12 @@ void ui_setup_open_button_callback(GtkWidget *open_btn, const gchar *title,
GtkWidget *path_entry = GTK_WIDGET(entry);
if (title)
g_object_set_data_full(G_OBJECT(open_btn), "title",
g_strdup(title), (GDestroyNotify) g_free);
g_object_set_data_full(G_OBJECT(open_btn), "title", g_strdup(title),
(GDestroyNotify) g_free);
g_object_set_data(G_OBJECT(open_btn), "action", (gpointer) action);
g_object_set_data_full(G_OBJECT(open_btn), "entry",
gtk_widget_ref(path_entry), (GDestroyNotify) gtk_widget_unref);
g_signal_connect(G_OBJECT(open_btn), "clicked",
G_CALLBACK(ui_path_box_open_clicked), open_btn);
g_signal_connect(open_btn, "clicked", G_CALLBACK(ui_path_box_open_clicked), open_btn);
}

View File

@ -281,13 +281,13 @@ static void create_vte(void)
gtk_drag_dest_set(vte, GTK_DEST_DEFAULT_ALL,
dnd_targets, G_N_ELEMENTS(dnd_targets), GDK_ACTION_COPY);
g_signal_connect(G_OBJECT(vte), "child-exited", G_CALLBACK(vte_start), NULL);
g_signal_connect(G_OBJECT(vte), "button-press-event", G_CALLBACK(vte_button_pressed), NULL);
g_signal_connect(G_OBJECT(vte), "event", G_CALLBACK(vte_keypress), NULL);
g_signal_connect(G_OBJECT(vte), "key-release-event", G_CALLBACK(vte_keyrelease), NULL);
g_signal_connect(G_OBJECT(vte), "commit", G_CALLBACK(vte_commit), NULL);
g_signal_connect(G_OBJECT(vte), "motion-notify-event", G_CALLBACK(on_motion_event), NULL);
g_signal_connect(G_OBJECT(vte), "drag-data-received", G_CALLBACK(vte_drag_data_received), NULL);
g_signal_connect(vte, "child-exited", G_CALLBACK(vte_start), NULL);
g_signal_connect(vte, "button-press-event", G_CALLBACK(vte_button_pressed), NULL);
g_signal_connect(vte, "event", G_CALLBACK(vte_keypress), NULL);
g_signal_connect(vte, "key-release-event", G_CALLBACK(vte_keyrelease), NULL);
g_signal_connect(vte, "commit", G_CALLBACK(vte_commit), NULL);
g_signal_connect(vte, "motion-notify-event", G_CALLBACK(on_motion_event), NULL);
g_signal_connect(vte, "drag-data-received", G_CALLBACK(vte_drag_data_received), NULL);
vte_start(vte);
@ -295,7 +295,7 @@ static void create_vte(void)
gtk_notebook_insert_page(GTK_NOTEBOOK(msgwindow.notebook), frame, gtk_label_new(_("Terminal")), MSG_VTE);
/* the vte widget has to be realised before color changes take effect */
g_signal_connect(G_OBJECT(vte), "realize", G_CALLBACK(vte_apply_user_settings), NULL);
g_signal_connect(vte, "realize", G_CALLBACK(vte_apply_user_settings), NULL);
}
@ -507,12 +507,12 @@ static GtkWidget *vte_create_popup_menu(void)
item = gtk_image_menu_item_new_from_stock("gtk-copy", NULL);
gtk_widget_show(item);
gtk_container_add(GTK_CONTAINER(menu), item);
g_signal_connect((gpointer)item, "activate", G_CALLBACK(vte_popup_menu_clicked), GINT_TO_POINTER(POPUP_COPY));
g_signal_connect(item, "activate", G_CALLBACK(vte_popup_menu_clicked), GINT_TO_POINTER(POPUP_COPY));
item = gtk_image_menu_item_new_from_stock("gtk-paste", NULL);
gtk_widget_show(item);
gtk_container_add(GTK_CONTAINER(menu), item);
g_signal_connect((gpointer)item, "activate", G_CALLBACK(vte_popup_menu_clicked), GINT_TO_POINTER(POPUP_PASTE));
g_signal_connect(item, "activate", G_CALLBACK(vte_popup_menu_clicked), GINT_TO_POINTER(POPUP_PASTE));
item = gtk_separator_menu_item_new();
gtk_widget_show(item);
@ -521,12 +521,12 @@ static GtkWidget *vte_create_popup_menu(void)
item = gtk_image_menu_item_new_with_mnemonic(_("_Set Path From Document"));
gtk_widget_show(item);
gtk_container_add(GTK_CONTAINER(menu), item);
g_signal_connect((gpointer)item, "activate", G_CALLBACK(vte_popup_menu_clicked), GINT_TO_POINTER(POPUP_CHANGEPATH));
g_signal_connect(item, "activate", G_CALLBACK(vte_popup_menu_clicked), GINT_TO_POINTER(POPUP_CHANGEPATH));
item = gtk_image_menu_item_new_with_mnemonic(_("_Restart Terminal"));
gtk_widget_show(item);
gtk_container_add(GTK_CONTAINER(menu), item);
g_signal_connect((gpointer)item, "activate", G_CALLBACK(vte_popup_menu_clicked), GINT_TO_POINTER(POPUP_RESTARTTERMINAL));
g_signal_connect(item, "activate", G_CALLBACK(vte_popup_menu_clicked), GINT_TO_POINTER(POPUP_RESTARTTERMINAL));
item = gtk_separator_menu_item_new();
gtk_widget_show(item);
@ -547,7 +547,7 @@ static GtkWidget *vte_create_popup_menu(void)
item = gtk_image_menu_item_new_from_stock("gtk-preferences", NULL);
gtk_widget_show(item);
gtk_container_add(GTK_CONTAINER(menu), item);
g_signal_connect((gpointer)item, "activate", G_CALLBACK(vte_popup_menu_clicked), GINT_TO_POINTER(POPUP_PREFERENCES));
g_signal_connect(item, "activate", G_CALLBACK(vte_popup_menu_clicked), GINT_TO_POINTER(POPUP_PREFERENCES));
msgwin_menu_add_common_items(GTK_MENU(menu));
@ -830,7 +830,7 @@ void vte_append_preferences_tab(void)
gtk_tooltips_set_tip(tooltips, check_run_in_vte, _("Run programs in VTE instead of opening a terminal emulation window. Please note, programs executed in VTE cannot be stopped."), NULL);
gtk_button_set_focus_on_click(GTK_BUTTON(check_run_in_vte), FALSE);
gtk_container_add(GTK_CONTAINER(box), check_run_in_vte);
g_signal_connect((gpointer) check_run_in_vte, "toggled",
g_signal_connect(check_run_in_vte, "toggled",
G_CALLBACK(check_run_in_vte_toggled), check_skip_script);
/* now add the check_skip_script checkbox after the check_run_in_vte checkbox */
@ -867,13 +867,13 @@ void vte_append_preferences_tab(void)
gtk_widget_show_all(frame);
g_signal_connect((gpointer) font_term, "font-set", G_CALLBACK(on_prefs_font_choosed),
g_signal_connect(font_term, "font-set", G_CALLBACK(on_prefs_font_choosed),
GINT_TO_POINTER(4));
g_signal_connect((gpointer) color_fore, "color-set", G_CALLBACK(on_prefs_color_choosed),
g_signal_connect(color_fore, "color-set", G_CALLBACK(on_prefs_color_choosed),
GINT_TO_POINTER(2));
g_signal_connect((gpointer) color_back, "color-set", G_CALLBACK(on_prefs_color_choosed),
g_signal_connect(color_back, "color-set", G_CALLBACK(on_prefs_color_choosed),
GINT_TO_POINTER(3));
g_signal_connect((gpointer) button_shell, "clicked",
g_signal_connect(button_shell, "clicked",
G_CALLBACK(on_prefs_tools_button_clicked), entry_shell);
}
}