Revision: 3402 http://geany.svn.sourceforge.net/geany/?rev=3402&view=rev Author: eht16 Date: 2008-12-18 21:21:53 +0000 (Thu, 18 Dec 2008)
Log Message: ----------- Move implementation of lookup_widget() into ui_lookup_widget(). Change uses of lookup_widget() to ui_lookup_widget(). Remove now unneeded support.c. Use GLib gettext macros in support.h instead of own ones.
Modified Paths: -------------- trunk/ChangeLog trunk/src/Makefile.am trunk/src/build.c trunk/src/callbacks.c trunk/src/dialogs.c trunk/src/document.c trunk/src/encodings.c trunk/src/filetypes.c trunk/src/keybindings.c trunk/src/keyfile.c trunk/src/main.c trunk/src/makefile.win32 trunk/src/msgwindow.c trunk/src/plugindata.h trunk/src/plugins.c trunk/src/prefs.c trunk/src/project.c trunk/src/search.c trunk/src/support.h trunk/src/templates.c trunk/src/toolbar.c trunk/src/tools.c trunk/src/treeviews.c trunk/src/ui_utils.c trunk/src/vte.c trunk/wscript
Removed Paths: ------------- trunk/src/support.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-12-18 19:23:32 UTC (rev 3401) +++ trunk/ChangeLog 2008-12-18 21:21:53 UTC (rev 3402) @@ -8,6 +8,17 @@ Remove dead code. * src/editor.c, src/document.c: Remove remaining uses of doc->editor and use GeanyEditor directly. + * wcript, src/build.c, src/callbacks.c, src/dialogs.c, src/document.c, + src/encodings.c, src/filetypes.c, src/keybindings.c, src/keyfile.c, + src/main.c, src/Makefile.am, src/makefile.win32, src/msgwindow.c, + src/plugindata.c, src/plugins.c, src/prefs.c, src/project.c, + src/search.c, src/support.c, src/support.h, src/templates.c, + src/toolbar.c, src/tools.c, src/treeviews.c, src/ui_utils.c, + src/vte.c: + Move implementation of lookup_widget() into ui_lookup_widget(). + Change uses of lookup_widget() to ui_lookup_widget(). + Remove now unneeded support.c. + Use GLib gettext macros in support.h instead of own ones.
2008-12-18 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2008-12-18 19:23:32 UTC (rev 3401) +++ trunk/src/Makefile.am 2008-12-18 21:21:53 UTC (rev 3402) @@ -38,7 +38,7 @@ search.c search.h \ socket.c socket.h \ stash.c stash.h \ - support.c support.h \ + support.h \ symbols.c symbols.h \ templates.c templates.h \ toolbar.c toolbar.h \
Modified: trunk/src/build.c =================================================================== --- trunk/src/build.c 2008-12-18 19:23:32 UTC (rev 3401) +++ trunk/src/build.c 2008-12-18 21:21:53 UTC (rev 3402) @@ -962,7 +962,7 @@ { GtkWidget *menu, *item = NULL, *image, *separator; GtkAccelGroup *accel_group = gtk_accel_group_new(); - GtkTooltips *tooltips = GTK_TOOLTIPS(lookup_widget(main_widgets.window, "tooltips")); + GtkTooltips *tooltips = GTK_TOOLTIPS(ui_lookup_widget(main_widgets.window, "tooltips")); GeanyKeyGroup *group = g_ptr_array_index(keybinding_groups, GEANY_KEY_GROUP_BUILD);
menu = gtk_menu_new(); @@ -1086,7 +1086,7 @@ { GtkWidget *menu, *item, *image, *separator; GtkAccelGroup *accel_group = gtk_accel_group_new(); - GtkTooltips *tooltips = GTK_TOOLTIPS(lookup_widget(main_widgets.window, "tooltips")); + GtkTooltips *tooltips = GTK_TOOLTIPS(ui_lookup_widget(main_widgets.window, "tooltips")); GeanyKeyGroup *group = g_ptr_array_index(keybinding_groups, GEANY_KEY_GROUP_BUILD);
menu = gtk_menu_new(); @@ -1234,7 +1234,7 @@ struct build_programs *programs = ft->programs;
newstr = gtk_entry_get_text( - GTK_ENTRY(lookup_widget(GTK_WIDGET(dialog), "tex_entry1"))); + GTK_ENTRY(ui_lookup_widget(GTK_WIDGET(dialog), "tex_entry1"))); if (! utils_str_equal(newstr, programs->compiler)) { if (programs->compiler) g_free(programs->compiler); @@ -1242,7 +1242,7 @@ programs->modified = TRUE; } newstr = gtk_entry_get_text( - GTK_ENTRY(lookup_widget(GTK_WIDGET(dialog), "tex_entry2"))); + GTK_ENTRY(ui_lookup_widget(GTK_WIDGET(dialog), "tex_entry2"))); if (! utils_str_equal(newstr, programs->linker)) { if (programs->linker) g_free(programs->linker); @@ -1250,7 +1250,7 @@ programs->modified = TRUE; } newstr = gtk_entry_get_text( - GTK_ENTRY(lookup_widget(GTK_WIDGET(dialog), "tex_entry3"))); + GTK_ENTRY(ui_lookup_widget(GTK_WIDGET(dialog), "tex_entry3"))); if (! utils_str_equal(newstr, programs->run_cmd)) { if (programs->run_cmd) g_free(programs->run_cmd); @@ -1258,7 +1258,7 @@ programs->modified = TRUE; } newstr = gtk_entry_get_text( - GTK_ENTRY(lookup_widget(GTK_WIDGET(dialog), "tex_entry4"))); + GTK_ENTRY(ui_lookup_widget(GTK_WIDGET(dialog), "tex_entry4"))); if (! utils_str_equal(newstr, programs->run_cmd2)) { if (programs->run_cmd2) g_free(programs->run_cmd2); @@ -1403,7 +1403,7 @@ if (ft->actions->can_compile) { newstr = gtk_entry_get_text( - GTK_ENTRY(lookup_widget(GTK_WIDGET(dialog), "includes_entry1"))); + GTK_ENTRY(ui_lookup_widget(GTK_WIDGET(dialog), "includes_entry1"))); if (! utils_str_equal(newstr, programs->compiler)) { if (programs->compiler) g_free(programs->compiler); @@ -1414,7 +1414,7 @@ if (ft->actions->can_link) { newstr = gtk_entry_get_text( - GTK_ENTRY(lookup_widget(GTK_WIDGET(dialog), "includes_entry2"))); + GTK_ENTRY(ui_lookup_widget(GTK_WIDGET(dialog), "includes_entry2"))); if (! utils_str_equal(newstr, programs->linker)) { if (programs->linker) g_free(programs->linker); @@ -1425,7 +1425,7 @@ if (ft->actions->can_exec) { newstr = gtk_entry_get_text( - GTK_ENTRY(lookup_widget(GTK_WIDGET(dialog), "includes_entry3"))); + GTK_ENTRY(ui_lookup_widget(GTK_WIDGET(dialog), "includes_entry3"))); if (! utils_str_equal(newstr, programs->run_cmd)) { if (programs->run_cmd) g_free(programs->run_cmd); @@ -1595,14 +1595,14 @@ if (doc == NULL || (FILETYPE_ID(doc->file_type) == GEANY_FILETYPES_NONE && doc->file_name == NULL)) { - gtk_widget_set_sensitive(lookup_widget(main_widgets.window, "menu_build1"), FALSE); - gtk_menu_item_remove_submenu(GTK_MENU_ITEM(lookup_widget(main_widgets.window, "menu_build1"))); + gtk_widget_set_sensitive(ui_lookup_widget(main_widgets.window, "menu_build1"), FALSE); + gtk_menu_item_remove_submenu(GTK_MENU_ITEM(ui_lookup_widget(main_widgets.window, "menu_build1"))); ui_widget_set_sensitive(widgets.compile_button, FALSE); ui_widget_set_sensitive(widgets.run_button, FALSE); return; } else - gtk_widget_set_sensitive(lookup_widget(main_widgets.window, "menu_build1"), TRUE); + gtk_widget_set_sensitive(ui_lookup_widget(main_widgets.window, "menu_build1"), TRUE);
ft = doc->file_type; g_return_if_fail(ft != NULL); @@ -1610,7 +1610,7 @@ menu_items = build_get_menu_items(ft->id); /* Note: don't remove the submenu first because it can now cause an X hang if * the menu is already open when called from build_exit_cb(). */ - gtk_menu_item_set_submenu(GTK_MENU_ITEM(lookup_widget(main_widgets.window, "menu_build1")), + gtk_menu_item_set_submenu(GTK_MENU_ITEM(ui_lookup_widget(main_widgets.window, "menu_build1")), menu_items->menu);
have_path = (doc->file_name != NULL);
Modified: trunk/src/callbacks.c =================================================================== --- trunk/src/callbacks.c 2008-12-18 19:23:32 UTC (rev 3401) +++ trunk/src/callbacks.c 2008-12-18 21:21:53 UTC (rev 3402) @@ -629,7 +629,7 @@ on_hide_toolbar1_activate (GtkMenuItem *menuitem, gpointer user_data) { - GtkWidget *tool_item = lookup_widget(GTK_WIDGET(main_widgets.window), "menu_show_toolbar1"); + GtkWidget *tool_item = ui_lookup_widget(GTK_WIDGET(main_widgets.window), "menu_show_toolbar1"); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(tool_item), FALSE); }
@@ -829,17 +829,17 @@
switch (toolbar_prefs.icon_style) { - case 0: w = lookup_widget(ui_widgets.toolbar_menu, "images_only2"); break; - case 1: w = lookup_widget(ui_widgets.toolbar_menu, "text_only2"); break; - default: w = lookup_widget(ui_widgets.toolbar_menu, "images_and_text2"); break; + case 0: w = ui_lookup_widget(ui_widgets.toolbar_menu, "images_only2"); break; + case 1: w = ui_lookup_widget(ui_widgets.toolbar_menu, "text_only2"); break; + default: w = ui_lookup_widget(ui_widgets.toolbar_menu, "images_and_text2"); break; } gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(w), TRUE);
switch (toolbar_prefs.icon_size) { case GTK_ICON_SIZE_LARGE_TOOLBAR: - w = lookup_widget(ui_widgets.toolbar_menu, "large_icons1"); break; - default: w = lookup_widget(ui_widgets.toolbar_menu, "small_icons1"); break; + w = ui_lookup_widget(ui_widgets.toolbar_menu, "large_icons1"); break; + default: w = ui_lookup_widget(ui_widgets.toolbar_menu, "small_icons1"); break; } gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(w), TRUE);
@@ -939,7 +939,7 @@ if (ignore_callback) return;
ui_prefs.msgwindow_visible = (ui_prefs.msgwindow_visible) ? FALSE : TRUE; - ui_widget_show_hide(lookup_widget(main_widgets.window, "scrolledwindow1"), ui_prefs.msgwindow_visible); + ui_widget_show_hide(ui_lookup_widget(main_widgets.window, "scrolledwindow1"), ui_prefs.msgwindow_visible); }
@@ -1093,7 +1093,7 @@ gpointer user_data) { gboolean definition = (menuitem == - GTK_MENU_ITEM(lookup_widget(main_widgets.editor_menu, "goto_tag_definition1"))); + GTK_MENU_ITEM(ui_lookup_widget(main_widgets.editor_menu, "goto_tag_definition1"))); GeanyDocument *doc = document_get_current();
g_return_if_fail(doc != NULL); @@ -1868,8 +1868,8 @@
if (item_close == NULL) { - item_close = lookup_widget(main_widgets.window, "project_close1"); - item_properties = lookup_widget(main_widgets.window, "project_properties1"); + item_close = ui_lookup_widget(main_widgets.window, "project_close1"); + item_properties = ui_lookup_widget(main_widgets.window, "project_properties1"); }
gtk_widget_set_sensitive(item_close, (app->project != NULL)); @@ -2000,9 +2000,9 @@ { static gint hide_all = -1; GtkCheckMenuItem *msgw = GTK_CHECK_MENU_ITEM( - lookup_widget(main_widgets.window, "menu_show_messages_window1")); + ui_lookup_widget(main_widgets.window, "menu_show_messages_window1")); GtkCheckMenuItem *toolbari = GTK_CHECK_MENU_ITEM( - lookup_widget(main_widgets.window, "menu_show_toolbar1")); + ui_lookup_widget(main_widgets.window, "menu_show_toolbar1"));
/* get the initial state (necessary if Geany was closed with hide_all = TRUE) */ if (hide_all == -1) @@ -2183,8 +2183,8 @@ on_search1_activate (GtkMenuItem *menuitem, gpointer user_data) { - GtkWidget *next_message = lookup_widget(main_widgets.window, "next_message1"); - GtkWidget *previous_message = lookup_widget(main_widgets.window, "previous_message1"); + GtkWidget *next_message = ui_lookup_widget(main_widgets.window, "next_message1"); + GtkWidget *previous_message = ui_lookup_widget(main_widgets.window, "previous_message1"); gboolean have_messages;
/* enable commands if the messages window has any items */
Modified: trunk/src/dialogs.c =================================================================== --- trunk/src/dialogs.c 2008-12-18 19:23:32 UTC (rev 3401) +++ trunk/src/dialogs.c 2008-12-18 21:21:53 UTC (rev 3402) @@ -81,9 +81,9 @@ { GSList *filelist; gint filetype_idx = gtk_combo_box_get_active(GTK_COMBO_BOX( - lookup_widget(GTK_WIDGET(dialog), "filetype_combo"))); + ui_lookup_widget(GTK_WIDGET(dialog), "filetype_combo"))); gint encoding_idx = gtk_combo_box_get_active(GTK_COMBO_BOX( - lookup_widget(GTK_WIDGET(dialog), "encoding_combo"))); + ui_lookup_widget(GTK_WIDGET(dialog), "encoding_combo"))); GeanyFiletype *ft = NULL; gchar *charset = NULL; gboolean ro = (response == GEANY_RESPONSE_VIEW); /* View clicked */ @@ -142,14 +142,14 @@ /* try to get the UTF-8 equivalent for the filename, fallback to filename if error */ gchar *utf8_filename = utils_get_utf8_from_locale(filename);
- gtk_entry_set_text(GTK_ENTRY(lookup_widget( + gtk_entry_set_text(GTK_ENTRY(ui_lookup_widget( GTK_WIDGET(filechooser), "file_entry")), utf8_filename); g_free(utf8_filename); g_free(filename); }
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON( - lookup_widget(GTK_WIDGET(filechooser), "check_hidden")), is_on); + ui_lookup_widget(GTK_WIDGET(filechooser), "check_hidden")), is_on); } #endif
@@ -202,7 +202,7 @@ /* add checkboxes and filename entry */ gtk_file_chooser_set_extra_widget(GTK_FILE_CHOOSER(ui_widgets.open_filesel), add_file_open_extra_widget()); - filetype_combo = lookup_widget(ui_widgets.open_filesel, "filetype_combo"); + filetype_combo = ui_lookup_widget(ui_widgets.open_filesel, "filetype_combo");
/* add FileFilters(start with "All Files") */ gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(ui_widgets.open_filesel), @@ -223,7 +223,7 @@ gtk_combo_box_set_active(GTK_COMBO_BOX(filetype_combo), filetypes_array->len - 1);
/* fill encoding combo box */ - encoding_combo = lookup_widget(ui_widgets.open_filesel, "encoding_combo"); + encoding_combo = ui_lookup_widget(ui_widgets.open_filesel, "encoding_combo"); for (i = 0; i < GEANY_ENCODINGS_MAX; i++) { encoding_string = encodings_to_string(&encodings[i]); @@ -435,7 +435,7 @@ { gchar *new_filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(ui_widgets.save_filesel)); gboolean open_new_tab = gtk_toggle_button_get_active( - GTK_TOGGLE_BUTTON(lookup_widget(ui_widgets.save_filesel, "check_open_new_tab"))); + GTK_TOGGLE_BUTTON(ui_lookup_widget(ui_widgets.save_filesel, "check_open_new_tab"))); gchar *utf8_filename;
if (! NZV(new_filename)) /* rename doesn't check for empty filename */
Modified: trunk/src/document.c =================================================================== --- trunk/src/document.c 2008-12-18 19:23:32 UTC (rev 3401) +++ trunk/src/document.c 2008-12-18 21:21:53 UTC (rev 3402) @@ -2209,7 +2209,7 @@ doc->encoding = g_strdup(new_encoding);
ui_update_statusbar(doc, -1); - gtk_widget_set_sensitive(lookup_widget(main_widgets.window, "menu_write_unicode_bom1"), + gtk_widget_set_sensitive(ui_lookup_widget(main_widgets.window, "menu_write_unicode_bom1"), encodings_is_unicode_charset(doc->encoding)); }
Modified: trunk/src/encodings.c =================================================================== --- trunk/src/encodings.c 2008-12-18 19:23:32 UTC (rev 3401) +++ trunk/src/encodings.c 2008-12-18 21:21:53 UTC (rev 3402) @@ -340,8 +340,8 @@ #endif
/* create encodings submenu in document menu */ - menu[0] = lookup_widget(main_widgets.window, "set_encoding1_menu"); - menu[1] = lookup_widget(main_widgets.window, "menu_reload_as1_menu"); + menu[0] = ui_lookup_widget(main_widgets.window, "set_encoding1_menu"); + menu[1] = ui_lookup_widget(main_widgets.window, "menu_reload_as1_menu"); cb_func[0] = G_CALLBACK(on_encoding_change); cb_func[1] = G_CALLBACK(on_reload_as_activate);
Modified: trunk/src/filetypes.c =================================================================== --- trunk/src/filetypes.c 2008-12-18 19:23:32 UTC (rev 3401) +++ trunk/src/filetypes.c 2008-12-18 21:21:53 UTC (rev 3402) @@ -625,7 +625,7 @@ static void create_set_filetype_menu() { filetype_id ft_id; - GtkWidget *filetype_menu = lookup_widget(main_widgets.window, "set_filetype1_menu"); + GtkWidget *filetype_menu = ui_lookup_widget(main_widgets.window, "set_filetype1_menu"); GtkWidget *sub_menu = filetype_menu; GtkWidget *sub_menu_programming, *sub_menu_scripts, *sub_menu_markup, *sub_menu_misc; GtkWidget *sub_item_programming, *sub_item_scripts, *sub_item_markup, *sub_item_misc;
Modified: trunk/src/keybindings.c =================================================================== --- trunk/src/keybindings.c 2008-12-18 19:23:32 UTC (rev 3401) +++ trunk/src/keybindings.c 2008-12-18 21:21:53 UTC (rev 3402) @@ -141,7 +141,7 @@
/* Lookup a widget in the main window */ #define LW(widget_name) \ - lookup_widget(main_widgets.window, G_STRINGIFY(widget_name)) + ui_lookup_widget(main_widgets.window, G_STRINGIFY(widget_name))
/* Expansion for group_id = FILE: * static GeanyKeyBinding FILE_keys[GEANY_KEYS_FILE_COUNT]; */ @@ -575,7 +575,7 @@
#define GEANY_ADD_POPUP_ACCEL(kb_id, wid) \ - add_menu_accel(group, kb_id, accel_group, lookup_widget(main_widgets.editor_menu, G_STRINGIFY(wid))) + add_menu_accel(group, kb_id, accel_group, ui_lookup_widget(main_widgets.editor_menu, G_STRINGIFY(wid)))
/* set the menu item accelerator shortcuts (just for visibility, they are handled anyway) */ static void add_popup_menu_accels(void) @@ -766,10 +766,10 @@
prefs_show_dialog(); /* select the KB page */ - wid = lookup_widget(ui_widgets.prefs_dialog, "frame22"); + wid = ui_lookup_widget(ui_widgets.prefs_dialog, "frame22"); if (wid != NULL) { - GtkNotebook *nb = GTK_NOTEBOOK(lookup_widget(ui_widgets.prefs_dialog, "notebook2")); + GtkNotebook *nb = GTK_NOTEBOOK(ui_lookup_widget(ui_widgets.prefs_dialog, "notebook2"));
if (nb != NULL) gtk_notebook_set_current_page(nb, gtk_notebook_page_num(nb, wid)); @@ -896,7 +896,7 @@ /* Temporarily disable the menus to prevent conflicting menu accelerators * from overriding the VTE bash shortcuts. * Note: maybe there's a better way of doing this ;-) */ - widget = lookup_widget(main_widgets.window, "menubar1"); + widget = ui_lookup_widget(main_widgets.window, "menubar1"); gtk_widget_set_sensitive(widget, FALSE); { /* make the menubar sensitive before it is redrawn */ @@ -1115,14 +1115,14 @@
static void cb_func_menu_fullscreen(G_GNUC_UNUSED guint key_id) { - GtkCheckMenuItem *c = GTK_CHECK_MENU_ITEM(lookup_widget(main_widgets.window, "menu_fullscreen1")); + GtkCheckMenuItem *c = GTK_CHECK_MENU_ITEM(ui_lookup_widget(main_widgets.window, "menu_fullscreen1"));
gtk_check_menu_item_set_active(c, ! gtk_check_menu_item_get_active(c)); }
static void cb_func_menu_messagewindow(G_GNUC_UNUSED guint key_id) { - GtkCheckMenuItem *c = GTK_CHECK_MENU_ITEM(lookup_widget(main_widgets.window, "menu_show_messages_window1")); + GtkCheckMenuItem *c = GTK_CHECK_MENU_ITEM(ui_lookup_widget(main_widgets.window, "menu_show_messages_window1"));
gtk_check_menu_item_set_active(c, ! gtk_check_menu_item_get_active(c)); } @@ -1556,7 +1556,7 @@ break; case GEANY_KEYS_EDITOR_CONTEXTACTION: if (check_current_word()) - on_context_action1_activate(GTK_MENU_ITEM(lookup_widget(main_widgets.editor_menu, + on_context_action1_activate(GTK_MENU_ITEM(ui_lookup_widget(main_widgets.editor_menu, "context_action1")), NULL); break; case GEANY_KEYS_EDITOR_SUPPRESSSNIPPETCOMPLETION: @@ -1645,7 +1645,7 @@
/* special case for Select All in the scribble widget */ if (scribble_widget == NULL) /* lookup the scribble widget only once */ - scribble_widget = lookup_widget(main_widgets.window, "textview_scribble"); + scribble_widget = ui_lookup_widget(main_widgets.window, "textview_scribble"); if (key_id == GEANY_KEYS_SELECT_ALL && focusw == scribble_widget) { g_signal_emit_by_name(scribble_widget, "select-all", TRUE); @@ -1731,7 +1731,7 @@ editor_insert_alternative_whitespace(doc->editor); break; case GEANY_KEYS_INSERT_DATE: - gtk_menu_item_activate(GTK_MENU_ITEM(lookup_widget(main_widgets.window, "insert_date_custom1"))); + gtk_menu_item_activate(GTK_MENU_ITEM(ui_lookup_widget(main_widgets.window, "insert_date_custom1"))); break; } }
Modified: trunk/src/keyfile.c =================================================================== --- trunk/src/keyfile.c 2008-12-18 19:23:32 UTC (rev 3401) +++ trunk/src/keyfile.c 2008-12-18 21:21:53 UTC (rev 3402) @@ -445,7 +445,7 @@ GtkTextBuffer *buffer; GtkTextIter start, end;
- buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(lookup_widget(main_widgets.window, "textview_scribble"))); + buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ui_lookup_widget(main_widgets.window, "textview_scribble"))); gtk_text_buffer_get_bounds(buffer, &start, &end); scribble_text = gtk_text_buffer_get_text(buffer, &start, &end, FALSE); g_key_file_set_string(config, PACKAGE, "scribble_text", scribble_text); @@ -455,9 +455,9 @@ if (prefs.save_winpos) { g_key_file_set_integer(config, PACKAGE, "treeview_position", - gtk_paned_get_position(GTK_PANED(lookup_widget(main_widgets.window, "hpaned1")))); + gtk_paned_get_position(GTK_PANED(ui_lookup_widget(main_widgets.window, "hpaned1")))); g_key_file_set_integer(config, PACKAGE, "msgwindow_position", - gtk_paned_get_position(GTK_PANED(lookup_widget(main_widgets.window, "vpaned1")))); + gtk_paned_get_position(GTK_PANED(ui_lookup_widget(main_widgets.window, "vpaned1")))); }
if (prefs.save_winpos) @@ -1002,7 +1002,7 @@ if (scribble_text) { /* update the scribble widget, because now it's realized */ gtk_text_buffer_set_text( - gtk_text_view_get_buffer(GTK_TEXT_VIEW(lookup_widget(main_widgets.window, "textview_scribble"))), + gtk_text_view_get_buffer(GTK_TEXT_VIEW(ui_lookup_widget(main_widgets.window, "textview_scribble"))), scribble_text, -1); } g_free(scribble_text); @@ -1010,15 +1010,15 @@ /* set the position of the hpaned and vpaned */ if (prefs.save_winpos) { - gtk_paned_set_position(GTK_PANED(lookup_widget(main_widgets.window, "hpaned1")), hpan_position); - gtk_paned_set_position(GTK_PANED(lookup_widget(main_widgets.window, "vpaned1")), vpan_position); + gtk_paned_set_position(GTK_PANED(ui_lookup_widget(main_widgets.window, "hpaned1")), hpan_position); + gtk_paned_set_position(GTK_PANED(ui_lookup_widget(main_widgets.window, "vpaned1")), vpan_position); }
/* set fullscreen after initial draw so that returning to normal view is the right size. * fullscreen mode is disabled by default, so act only if it is true */ if (ui_prefs.fullscreen) { - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(lookup_widget(main_widgets.window, "menu_fullscreen1")), TRUE); + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(ui_lookup_widget(main_widgets.window, "menu_fullscreen1")), TRUE); ui_prefs.fullscreen = TRUE; ui_set_fullscreen(); }
Modified: trunk/src/main.c =================================================================== --- trunk/src/main.c 2008-12-18 19:23:32 UTC (rev 3401) +++ trunk/src/main.c 2008-12-18 21:21:53 UTC (rev 3402) @@ -160,21 +160,21 @@ if (! toolbar_prefs.visible) { ignore_callback = TRUE; - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(lookup_widget(main_widgets.window, "menu_show_toolbar1")), FALSE); + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(ui_lookup_widget(main_widgets.window, "menu_show_toolbar1")), FALSE); gtk_widget_hide(main_widgets.toolbar); ignore_callback = FALSE; } if (! ui_prefs.msgwindow_visible) { ignore_callback = TRUE; - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(lookup_widget(main_widgets.window, "menu_show_messages_window1")), FALSE); - gtk_widget_hide(lookup_widget(main_widgets.window, "scrolledwindow1")); + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(ui_lookup_widget(main_widgets.window, "menu_show_messages_window1")), FALSE); + gtk_widget_hide(ui_lookup_widget(main_widgets.window, "scrolledwindow1")); ignore_callback = FALSE; } if (! ui_prefs.sidebar_visible) { ignore_callback = TRUE; - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(lookup_widget(main_widgets.window, "menu_show_sidebar1")), FALSE); + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(ui_lookup_widget(main_widgets.window, "menu_show_sidebar1")), FALSE); ignore_callback = FALSE; } ui_sidebar_show_hide(); @@ -183,20 +183,20 @@ { case GTK_TOOLBAR_BOTH: { - /*gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(lookup_widget(main_widgets.window, "images_and_text1")), TRUE);*/ - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(lookup_widget(ui_widgets.toolbar_menu, "images_and_text2")), TRUE); + /*gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(ui_lookup_widget(main_widgets.window, "images_and_text1")), TRUE);*/ + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(ui_lookup_widget(ui_widgets.toolbar_menu, "images_and_text2")), TRUE); break; } case GTK_TOOLBAR_ICONS: { - /*gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(lookup_widget(main_widgets.window, "images_only1")), TRUE);*/ - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(lookup_widget(ui_widgets.toolbar_menu, "images_only2")), TRUE); + /*gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(ui_lookup_widget(main_widgets.window, "images_only1")), TRUE);*/ + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(ui_lookup_widget(ui_widgets.toolbar_menu, "images_only2")), TRUE); break; } case GTK_TOOLBAR_TEXT: { - /*gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(lookup_widget(main_widgets.window, "text_only1")), TRUE);*/ - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(lookup_widget(ui_widgets.toolbar_menu, "text_only2")), TRUE); + /*gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(ui_lookup_widget(main_widgets.window, "text_only1")), TRUE);*/ + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(ui_lookup_widget(ui_widgets.toolbar_menu, "text_only2")), TRUE); break; } } @@ -257,17 +257,17 @@ main_status.opening_session_files = FALSE;
main_widgets.window = create_window1(); - ui_widgets.recent_files_menuitem = lookup_widget(main_widgets.window, "recent_files1"); + ui_widgets.recent_files_menuitem = ui_lookup_widget(main_widgets.window, "recent_files1"); ui_widgets.recent_files_menu_menubar = gtk_menu_new(); gtk_menu_item_set_submenu(GTK_MENU_ITEM(ui_widgets.recent_files_menuitem), ui_widgets.recent_files_menu_menubar);
/* store important pointers for later reference */ main_widgets.toolbar = toolbar_init(); - main_widgets.sidebar_notebook = lookup_widget(main_widgets.window, "notebook3"); - main_widgets.notebook = lookup_widget(main_widgets.window, "notebook1"); + main_widgets.sidebar_notebook = ui_lookup_widget(main_widgets.window, "notebook3"); + main_widgets.notebook = ui_lookup_widget(main_widgets.window, "notebook1"); main_widgets.editor_menu = create_edit_menu1(); - main_widgets.tools_menu = lookup_widget(main_widgets.window, "tools1_menu"); + main_widgets.tools_menu = ui_lookup_widget(main_widgets.window, "tools1_menu");
ui_widgets.toolbar_menu = create_toolbar_popup_menu1(); ui_init(); @@ -957,7 +957,7 @@ 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"), + g_signal_connect(ui_lookup_widget(main_widgets.window, "textview_scribble"), "motion-notify-event", G_CALLBACK(on_motion_event), NULL); entry = toolbar_get_widget_child_by_name("SearchEntry"); if (entry != NULL)
Modified: trunk/src/makefile.win32 =================================================================== --- trunk/src/makefile.win32 2008-12-18 19:23:32 UTC (rev 3401) +++ trunk/src/makefile.win32 2008-12-18 21:21:53 UTC (rev 3402) @@ -65,7 +65,7 @@ interface.o keybindings.o keyfile.o \ log.o main.o msgwindow.o navqueue.o notebook.o plugins.o prefs.o printing.o project.o \ sciwrappers.o search.o socket.o stash.o \ - support.o symbols.o templates.o toolbar.o tools.o treeviews.o \ + symbols.o templates.o toolbar.o tools.o treeviews.o \ ui_utils.o utils.o win32.o
.c.o:
Modified: trunk/src/msgwindow.c =================================================================== --- trunk/src/msgwindow.c 2008-12-18 19:23:32 UTC (rev 3401) +++ trunk/src/msgwindow.c 2008-12-18 21:21:53 UTC (rev 3402) @@ -75,10 +75,10 @@
void msgwin_init() { - msgwindow.notebook = lookup_widget(main_widgets.window, "notebook_info"); - msgwindow.tree_status = lookup_widget(main_widgets.window, "treeview3"); - msgwindow.tree_msg = lookup_widget(main_widgets.window, "treeview4"); - msgwindow.tree_compiler = lookup_widget(main_widgets.window, "treeview5"); + msgwindow.notebook = ui_lookup_widget(main_widgets.window, "notebook_info"); + msgwindow.tree_status = ui_lookup_widget(main_widgets.window, "treeview3"); + msgwindow.tree_msg = ui_lookup_widget(main_widgets.window, "treeview4"); + msgwindow.tree_compiler = ui_lookup_widget(main_widgets.window, "treeview5"); msgwindow.find_in_files_dir = NULL;
prepare_status_tree_view(); @@ -89,9 +89,9 @@ msgwindow.popup_compiler_menu = create_message_popup_menu(MSG_COMPILER);
ui_widget_modify_font_from_string( - lookup_widget(main_widgets.window, "textview_scribble"), interface_prefs.msgwin_font); + ui_lookup_widget(main_widgets.window, "textview_scribble"), interface_prefs.msgwin_font);
- g_signal_connect(lookup_widget(main_widgets.window, "textview_scribble"), + g_signal_connect(ui_lookup_widget(main_widgets.window, "textview_scribble"), "populate-popup", G_CALLBACK(on_scribble_populate), NULL); }
@@ -256,10 +256,10 @@ ui_prefs.msgwindow_visible = show; ignore_callback = TRUE; gtk_check_menu_item_set_active( - GTK_CHECK_MENU_ITEM(lookup_widget(main_widgets.window, "menu_show_messages_window1")), + GTK_CHECK_MENU_ITEM(ui_lookup_widget(main_widgets.window, "menu_show_messages_window1")), show); ignore_callback = FALSE; - ui_widget_show_hide(lookup_widget(main_widgets.window, "scrolledwindow1"), show); + ui_widget_show_hide(ui_lookup_widget(main_widgets.window, "scrolledwindow1"), show); }
@@ -1006,7 +1006,7 @@
switch (tabnum) { - case MSG_SCRATCH: widget = lookup_widget(main_widgets.window, "textview_scribble"); break; + case MSG_SCRATCH: widget = ui_lookup_widget(main_widgets.window, "textview_scribble"); break; #ifdef HAVE_VTE case MSG_VTE: widget = (vte_info.have_vte) ? vc->vte : NULL; break; #endif
Modified: trunk/src/plugindata.h =================================================================== --- trunk/src/plugindata.h 2008-12-18 19:23:32 UTC (rev 3401) +++ trunk/src/plugindata.h 2008-12-18 21:21:53 UTC (rev 3402) @@ -45,13 +45,13 @@ enum { /** The Application Programming Interface (API) version, incremented * whenever any plugin data types are modified or appended to. */ - GEANY_API_VERSION = 119, + GEANY_API_VERSION = 120,
/** The Application Binary Interface (ABI) version, incremented whenever * existing fields in the plugin data types have to be changed or reordered. */ /* This should usually stay the same if fields are only appended, assuming only pointers to * structs and not structs themselves are declared by plugins. */ - GEANY_ABI_VERSION = 52 + GEANY_ABI_VERSION = 53 };
/** Check the plugin can be loaded by Geany.
Modified: trunk/src/plugins.c =================================================================== --- trunk/src/plugins.c 2008-12-18 19:23:32 UTC (rev 3401) +++ trunk/src/plugins.c 2008-12-18 21:21:53 UTC (rev 3402) @@ -230,7 +230,7 @@ };
/* Macro to prevent confusing macro being generated in geanyfunctions.h */ -#define _lookup_widget_macro lookup_widget +#define _lookup_widget_macro ui_lookup_widget
/* deprecated */ static SupportFuncs support_funcs = {
Modified: trunk/src/prefs.c =================================================================== --- trunk/src/prefs.c 2008-12-18 19:23:32 UTC (rev 3401) +++ trunk/src/prefs.c 2008-12-18 21:21:53 UTC (rev 3402) @@ -121,7 +121,7 @@ for (i = 0; i < G_N_ELEMENTS(items); i++) { PrefEntry *pe = &items[i]; - GtkWidget *widget = lookup_widget(ui_widgets.prefs_dialog, pe->widget_name); + GtkWidget *widget = ui_lookup_widget(ui_widgets.prefs_dialog, pe->widget_name); gint *setting = pe->setting;
switch (action) @@ -148,7 +148,7 @@ for (i = 0; i < G_N_ELEMENTS(items); i++) { PrefEntry *pe = &items[i]; - GtkWidget *widget = lookup_widget(ui_widgets.prefs_dialog, pe->widget_name); + GtkWidget *widget = ui_lookup_widget(ui_widgets.prefs_dialog, pe->widget_name); gint *setting = pe->setting;
switch (action) @@ -210,7 +210,7 @@ GtkCellRenderer *renderer; GtkTreeViewColumn *column;
- tree = GTK_TREE_VIEW(lookup_widget(ui_widgets.prefs_dialog, "treeview7")); + tree = GTK_TREE_VIEW(ui_lookup_widget(ui_widgets.prefs_dialog, "treeview7")); /*g_object_set(tree, "vertical-separator", 6, NULL);*/
store = gtk_tree_store_new(3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT); @@ -229,12 +229,12 @@ /* set policy settings for the scollwedwindow around the treeview again, because glade * doesn't keep the settings */ gtk_scrolled_window_set_policy( - GTK_SCROLLED_WINDOW(lookup_widget(ui_widgets.prefs_dialog, "scrolledwindow8")), + GTK_SCROLLED_WINDOW(ui_lookup_widget(ui_widgets.prefs_dialog, "scrolledwindow8")), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
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_signal_connect(ui_lookup_widget(ui_widgets.prefs_dialog, "button2"), "clicked", G_CALLBACK(on_tree_view_button_press_event), NULL); }
@@ -280,114 +280,114 @@
/* General settings */ /* startup */ - widget = lookup_widget(ui_widgets.prefs_dialog, "check_load_session"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_load_session"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), prefs.load_session);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_project_session"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_project_session"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), project_prefs.project_session);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_project_file_in_basedir"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_project_file_in_basedir"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), project_prefs.project_file_in_basedir);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_save_win_pos"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_save_win_pos"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), prefs.save_winpos);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_plugins"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_plugins"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), prefs.load_plugins);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_ask_for_quit"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_ask_for_quit"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), prefs.confirm_exit);
/* behaviour */ - widget = lookup_widget(ui_widgets.prefs_dialog, "check_beep"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_beep"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), prefs.beep_on_errors);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_switch_pages"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_switch_pages"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), prefs.switch_to_status);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_suppress_status_msgs"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_suppress_status_msgs"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), prefs.suppress_status_messages);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_auto_focus"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_auto_focus"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), prefs.auto_focus);
- widget = lookup_widget(ui_widgets.prefs_dialog, "entry_contextaction"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "entry_contextaction"); gtk_entry_set_text(GTK_ENTRY(widget), tool_prefs.context_action_cmd);
- widget = lookup_widget(ui_widgets.prefs_dialog, "startup_path_entry"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "startup_path_entry"); gtk_entry_set_text(GTK_ENTRY(widget), prefs.default_open_path);
project_setup_prefs(); /* project files path */
/* Interface settings */ - widget = lookup_widget(ui_widgets.prefs_dialog, "check_list_symbol"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_list_symbol"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), interface_prefs.sidebar_symbol_visible);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_list_openfiles"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_list_openfiles"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), interface_prefs.sidebar_openfiles_visible); on_openfiles_visible_toggled(GTK_TOGGLE_BUTTON(widget), NULL);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_list_openfiles_fullpath"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_list_openfiles_fullpath"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), interface_prefs.sidebar_openfiles_fullpath);
- widget = lookup_widget(ui_widgets.prefs_dialog, "tagbar_font"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "tagbar_font"); gtk_font_button_set_font_name(GTK_FONT_BUTTON(widget), interface_prefs.tagbar_font);
- widget = lookup_widget(ui_widgets.prefs_dialog, "msgwin_font"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "msgwin_font"); gtk_font_button_set_font_name(GTK_FONT_BUTTON(widget), interface_prefs.msgwin_font);
- widget = lookup_widget(ui_widgets.prefs_dialog, "editor_font"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "editor_font"); gtk_font_button_set_font_name(GTK_FONT_BUTTON(widget), interface_prefs.editor_font);
- widget = lookup_widget(ui_widgets.prefs_dialog, "spin_long_line"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "spin_long_line"); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), editor_prefs.long_line_column);
switch (editor_prefs.long_line_type) { - case 0: widget = lookup_widget(ui_widgets.prefs_dialog, "radio_long_line_line"); break; - case 1: widget = lookup_widget(ui_widgets.prefs_dialog, "radio_long_line_background"); break; - default: widget = lookup_widget(ui_widgets.prefs_dialog, "radio_long_line_disabled"); break; + case 0: widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_long_line_line"); break; + case 1: widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_long_line_background"); break; + default: widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_long_line_disabled"); break; } gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), TRUE);
color = g_new0(GdkColor, 1); gdk_color_parse(editor_prefs.long_line_color, color); - widget = lookup_widget(ui_widgets.prefs_dialog, "long_line_color"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "long_line_color"); gtk_color_button_set_color(GTK_COLOR_BUTTON(widget), color); g_free(color);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_show_notebook_tabs"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_show_notebook_tabs"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), interface_prefs.show_notebook_tabs); /* disable following setting if notebook tabs are hidden */ on_show_notebook_tabs_toggled(GTK_TOGGLE_BUTTON( - lookup_widget(ui_widgets.prefs_dialog, "check_show_notebook_tabs")), NULL); + ui_lookup_widget(ui_widgets.prefs_dialog, "check_show_notebook_tabs")), NULL);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_show_tab_cross"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_show_tab_cross"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), file_prefs.show_tab_cross);
- widget = lookup_widget(ui_widgets.prefs_dialog, "combo_tab_editor"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "combo_tab_editor"); gtk_combo_box_set_active(GTK_COMBO_BOX(widget), interface_prefs.tab_pos_editor);
- widget = lookup_widget(ui_widgets.prefs_dialog, "combo_tab_msgwin"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "combo_tab_msgwin"); gtk_combo_box_set_active(GTK_COMBO_BOX(widget), interface_prefs.tab_pos_msgwin);
- widget = lookup_widget(ui_widgets.prefs_dialog, "combo_tab_sidebar"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "combo_tab_sidebar"); gtk_combo_box_set_active(GTK_COMBO_BOX(widget), interface_prefs.tab_pos_sidebar);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_statusbar_visible"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_statusbar_visible"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), interface_prefs.statusbar_visible);
/* Toolbar settings */ - widget = lookup_widget(ui_widgets.prefs_dialog, "check_toolbar_show"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_toolbar_show"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), toolbar_prefs.visible);
switch (toolbar_prefs.icon_style) { - case 0: widget = lookup_widget(ui_widgets.prefs_dialog, "radio_toolbar_image"); break; - case 1: widget = lookup_widget(ui_widgets.prefs_dialog, "radio_toolbar_text"); break; - default: widget = lookup_widget(ui_widgets.prefs_dialog, "radio_toolbar_imagetext"); break; + case 0: widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_toolbar_image"); break; + case 1: widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_toolbar_text"); break; + default: widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_toolbar_imagetext"); break; } gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), TRUE);
@@ -395,39 +395,39 @@ switch (toolbar_prefs.icon_size) { case GTK_ICON_SIZE_LARGE_TOOLBAR: - widget = lookup_widget(ui_widgets.prefs_dialog, "radio_toolbar_large"); break; - default: widget = lookup_widget(ui_widgets.prefs_dialog, "radio_toolbar_small"); break; + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_toolbar_large"); break; + default: widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_toolbar_small"); break; } gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), TRUE); /* disable elements if toolbar is hidden */ on_toolbar_show_toggled(GTK_TOGGLE_BUTTON( - lookup_widget(ui_widgets.prefs_dialog, "check_toolbar_show")), NULL); + ui_lookup_widget(ui_widgets.prefs_dialog, "check_toolbar_show")), NULL);
/* Files settings */ if (file_prefs.tab_order_ltr) - widget = lookup_widget(ui_widgets.prefs_dialog, "radio_tab_right"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_tab_right"); else - widget = lookup_widget(ui_widgets.prefs_dialog, "radio_tab_left"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_tab_left"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), TRUE);
- widget = lookup_widget(ui_widgets.prefs_dialog, "spin_mru"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "spin_mru"); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), file_prefs.mru_length);
- widget = lookup_widget(ui_widgets.prefs_dialog, "spin_disk_check"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "spin_disk_check"); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), file_prefs.disk_check_timeout);
- widget = lookup_widget(ui_widgets.prefs_dialog, "combo_new_encoding"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "combo_new_encoding"); /* luckily the index of the combo box items match the index of the encodings array */ gtk_combo_box_set_active(GTK_COMBO_BOX(widget), file_prefs.default_new_encoding);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_open_encoding"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_open_encoding"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), (file_prefs.default_open_encoding >= 0) ? TRUE : FALSE); on_open_encoding_toggled(GTK_TOGGLE_BUTTON(widget), NULL);
- widget = lookup_widget(ui_widgets.prefs_dialog, "combo_open_encoding"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "combo_open_encoding"); if (file_prefs.default_open_encoding >= 0) { gtk_combo_box_set_active(GTK_COMBO_BOX(widget), file_prefs.default_open_encoding); @@ -435,7 +435,7 @@ else gtk_combo_box_set_active(GTK_COMBO_BOX(widget), GEANY_ENCODING_UTF_8);
- widget = lookup_widget(ui_widgets.prefs_dialog, "combo_eol"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "combo_eol"); if (file_prefs.default_eol_character >= 0 && file_prefs.default_eol_character < 3) { gtk_combo_box_set_active(GTK_COMBO_BOX(widget), file_prefs.default_eol_character); @@ -443,138 +443,138 @@ else gtk_combo_box_set_active(GTK_COMBO_BOX(widget), GEANY_DEFAULT_EOL_CHARACTER);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_trailing_spaces"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_trailing_spaces"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), file_prefs.strip_trailing_spaces);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_new_line"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_new_line"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), file_prefs.final_new_line);
/* Editor settings */ - widget = lookup_widget(ui_widgets.prefs_dialog, "entry_toggle_mark"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "entry_toggle_mark"); gtk_entry_set_text(GTK_ENTRY(widget), editor_prefs.comment_toggle_mark);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_replace_tabs"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_replace_tabs"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), file_prefs.replace_tabs);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_indent"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_indent"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), editor_prefs.show_indent_guide);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_white_space"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_white_space"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), editor_prefs.show_white_space);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_line_end"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_line_end"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), editor_prefs.show_line_endings);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_line_numbers"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_line_numbers"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), editor_prefs.show_linenumber_margin);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_markers_margin"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_markers_margin"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), editor_prefs.show_markers_margin);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_scroll_stop_at_last_line"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_scroll_stop_at_last_line"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), editor_prefs.scroll_stop_at_last_line);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_line_wrapping"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_line_wrapping"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), editor_prefs.line_wrapping);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_complete_snippets"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_complete_snippets"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), editor_prefs.complete_snippets);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_xmltag"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_xmltag"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), editor_prefs.auto_close_xml_tags);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_folding"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_folding"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), editor_prefs.folding);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_unfold_children"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_unfold_children"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), editor_prefs.unfold_all_children); on_use_folding_toggled(GTK_TOGGLE_BUTTON( - lookup_widget(ui_widgets.prefs_dialog, "check_folding")), NULL); + ui_lookup_widget(ui_widgets.prefs_dialog, "check_folding")), NULL);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_disable_dnd"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_disable_dnd"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), editor_prefs.disable_dnd);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_smart_home"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_smart_home"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), editor_prefs.smart_home_key);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_newline_strip"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_newline_strip"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), editor_prefs.newline_strip);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_indicators"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_indicators"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), editor_prefs.use_indicators);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_auto_multiline"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_auto_multiline"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), editor_prefs.auto_continue_multiline);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_symbol_auto_completion"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_symbol_auto_completion"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), editor_prefs.auto_complete_symbols);
- widget = lookup_widget(ui_widgets.prefs_dialog, "spin_symbollistheight"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "spin_symbollistheight"); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), editor_prefs.symbolcompletion_max_height);
- widget = lookup_widget(ui_widgets.prefs_dialog, "spin_symbol_complete_chars"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "spin_symbol_complete_chars"); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), editor_prefs.symbolcompletion_min_chars);
- widget = lookup_widget(ui_widgets.prefs_dialog, "spin_line_break"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "spin_line_break"); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), editor_prefs.line_break_column);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_autoclose_parenthesis"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_autoclose_parenthesis"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), (editor_prefs.autoclose_chars & GEANY_AC_PARENTHESIS));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_autoclose_cbracket"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_autoclose_cbracket"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), (editor_prefs.autoclose_chars & GEANY_AC_CBRACKET));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_autoclose_sbracket"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_autoclose_sbracket"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), (editor_prefs.autoclose_chars & GEANY_AC_SBRACKET));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_autoclose_squote"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_autoclose_squote"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), (editor_prefs.autoclose_chars & GEANY_AC_SQUOTE));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_autoclose_dquote"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_autoclose_dquote"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), (editor_prefs.autoclose_chars & GEANY_AC_DQUOTE));
/* Tools Settings */ if (tool_prefs.make_cmd) - gtk_entry_set_text(GTK_ENTRY(lookup_widget(ui_widgets.prefs_dialog, "entry_com_make")), tool_prefs.make_cmd); + gtk_entry_set_text(GTK_ENTRY(ui_lookup_widget(ui_widgets.prefs_dialog, "entry_com_make")), tool_prefs.make_cmd);
if (tool_prefs.term_cmd) - gtk_entry_set_text(GTK_ENTRY(lookup_widget(ui_widgets.prefs_dialog, "entry_com_term")), tool_prefs.term_cmd); + gtk_entry_set_text(GTK_ENTRY(ui_lookup_widget(ui_widgets.prefs_dialog, "entry_com_term")), tool_prefs.term_cmd);
if (tool_prefs.browser_cmd) - gtk_entry_set_text(GTK_ENTRY(lookup_widget(ui_widgets.prefs_dialog, "entry_browser")), tool_prefs.browser_cmd); + gtk_entry_set_text(GTK_ENTRY(ui_lookup_widget(ui_widgets.prefs_dialog, "entry_browser")), tool_prefs.browser_cmd);
if (tool_prefs.grep_cmd) - gtk_entry_set_text(GTK_ENTRY(lookup_widget(ui_widgets.prefs_dialog, "entry_grep")), tool_prefs.grep_cmd); + gtk_entry_set_text(GTK_ENTRY(ui_lookup_widget(ui_widgets.prefs_dialog, "entry_grep")), tool_prefs.grep_cmd);
/* Template settings */ - widget = lookup_widget(ui_widgets.prefs_dialog, "entry_template_developer"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "entry_template_developer"); gtk_entry_set_text(GTK_ENTRY(widget), template_prefs.developer);
- widget = lookup_widget(ui_widgets.prefs_dialog, "entry_template_company"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "entry_template_company"); gtk_entry_set_text(GTK_ENTRY(widget), template_prefs.company);
- widget = lookup_widget(ui_widgets.prefs_dialog, "entry_template_mail"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "entry_template_mail"); gtk_entry_set_text(GTK_ENTRY(widget), template_prefs.mail);
- widget = lookup_widget(ui_widgets.prefs_dialog, "entry_template_initial"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "entry_template_initial"); gtk_entry_set_text(GTK_ENTRY(widget), template_prefs.initials);
- widget = lookup_widget(ui_widgets.prefs_dialog, "entry_template_version"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "entry_template_version"); gtk_entry_set_text(GTK_ENTRY(widget), template_prefs.version);
- widget = lookup_widget(ui_widgets.prefs_dialog, "entry_template_year"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "entry_template_year"); gtk_entry_set_text(GTK_ENTRY(widget), template_prefs.year_format);
- widget = lookup_widget(ui_widgets.prefs_dialog, "entry_template_date"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "entry_template_date"); gtk_entry_set_text(GTK_ENTRY(widget), template_prefs.date_format);
- widget = lookup_widget(ui_widgets.prefs_dialog, "entry_template_datetime"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "entry_template_datetime"); gtk_entry_set_text(GTK_ENTRY(widget), template_prefs.datetime_format);
@@ -583,18 +583,18 @@
/* Printing */ { - GtkWidget *widget_gtk = lookup_widget(ui_widgets.prefs_dialog, "radio_print_gtk"); + GtkWidget *widget_gtk = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_print_gtk"); if (printing_prefs.use_gtk_printing) widget = widget_gtk; else - widget = lookup_widget(ui_widgets.prefs_dialog, "radio_print_external"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_print_external");
#if GTK_CHECK_VERSION(2, 10, 0) if (gtk_check_version(2, 10, 0) != NULL) #endif { gtk_widget_set_sensitive(widget_gtk, FALSE); /* disable the whole option block */ - widget = lookup_widget(ui_widgets.prefs_dialog, "radio_print_external"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_print_external"); } gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), TRUE);
@@ -602,78 +602,78 @@ } if (printing_prefs.external_print_cmd) gtk_entry_set_text( - GTK_ENTRY(lookup_widget(ui_widgets.prefs_dialog, "entry_print_external_cmd")), + GTK_ENTRY(ui_lookup_widget(ui_widgets.prefs_dialog, "entry_print_external_cmd")), printing_prefs.external_print_cmd);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_print_linenumbers"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_print_linenumbers"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), printing_prefs.print_line_numbers);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_print_pagenumbers"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_print_pagenumbers"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), printing_prefs.print_page_numbers);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_print_pageheader"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_print_pageheader"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), printing_prefs.print_page_header); on_prefs_print_page_header_toggled(GTK_TOGGLE_BUTTON(widget), NULL);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_print_basename"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_print_basename"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), printing_prefs.page_header_basename);
if (printing_prefs.page_header_datefmt) gtk_entry_set_text( - GTK_ENTRY(lookup_widget(ui_widgets.prefs_dialog, "entry_print_dateformat")), + GTK_ENTRY(ui_lookup_widget(ui_widgets.prefs_dialog, "entry_print_dateformat")), printing_prefs.page_header_datefmt);
#ifndef HAVE_PLUGINS - gtk_widget_set_sensitive(lookup_widget(ui_widgets.prefs_dialog, "check_plugins"), FALSE); + gtk_widget_set_sensitive(ui_lookup_widget(ui_widgets.prefs_dialog, "check_plugins"), FALSE); #endif
#ifdef HAVE_VTE /* make VTE switch visible only when VTE is compiled in, it is hidden by default */ - widget = lookup_widget(ui_widgets.prefs_dialog, "check_vte"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_vte"); gtk_widget_show(widget); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), vte_info.load_vte);
/* VTE settings */ if (vte_info.have_vte) { - widget = lookup_widget(ui_widgets.prefs_dialog, "font_term"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "font_term"); gtk_font_button_set_font_name(GTK_FONT_BUTTON(widget), vc->font);
- widget = lookup_widget(ui_widgets.prefs_dialog, "color_fore"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "color_fore"); gtk_color_button_set_color(GTK_COLOR_BUTTON(widget), vc->colour_fore);
- widget = lookup_widget(ui_widgets.prefs_dialog, "color_back"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "color_back"); gtk_color_button_set_color(GTK_COLOR_BUTTON(widget), vc->colour_back);
- widget = lookup_widget(ui_widgets.prefs_dialog, "spin_scrollback"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "spin_scrollback"); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), vc->scrollback_lines);
- widget = lookup_widget(ui_widgets.prefs_dialog, "entry_shell"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "entry_shell"); gtk_entry_set_text(GTK_ENTRY(widget), vc->shell);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_scroll_key"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_scroll_key"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), vc->scroll_on_key);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_scroll_out"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_scroll_out"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), vc->scroll_on_out);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_enable_bash_keys"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_enable_bash_keys"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), vc->enable_bash_keys);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_ignore_menu_key"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_ignore_menu_key"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), vc->ignore_menu_bar_accel);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_follow_path"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_follow_path"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), vc->follow_path);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_run_in_vte"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_run_in_vte"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), vc->run_in_vte);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_skip_script"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_skip_script"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), vc->skip_run_script);
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_cursor_blinks"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_cursor_blinks"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), vc->cursor_blinks); } #endif @@ -696,42 +696,42 @@
/* General settings */ /* startup */ - widget = lookup_widget(ui_widgets.prefs_dialog, "check_load_session"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_load_session"); prefs.load_session = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_project_session"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_project_session"); project_prefs.project_session = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_project_file_in_basedir"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_project_file_in_basedir"); project_prefs.project_file_in_basedir = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_save_win_pos"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_save_win_pos"); prefs.save_winpos = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_plugins"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_plugins"); prefs.load_plugins = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_ask_for_quit"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_ask_for_quit"); prefs.confirm_exit = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
/* behaviour */ - widget = lookup_widget(ui_widgets.prefs_dialog, "check_beep"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_beep"); prefs.beep_on_errors = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_switch_pages"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_switch_pages"); prefs.switch_to_status = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_suppress_status_msgs"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_suppress_status_msgs"); prefs.suppress_status_messages = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_auto_focus"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_auto_focus"); prefs.auto_focus = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "entry_contextaction"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "entry_contextaction"); g_free(tool_prefs.context_action_cmd); tool_prefs.context_action_cmd = g_strdup(gtk_entry_get_text(GTK_ENTRY(widget)));
- widget = lookup_widget(ui_widgets.prefs_dialog, "startup_path_entry"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "startup_path_entry"); g_free(prefs.default_open_path); prefs.default_open_path = g_strdup(gtk_entry_get_text(GTK_ENTRY(widget)));
@@ -739,20 +739,20 @@
/* Interface settings */ - widget = lookup_widget(ui_widgets.prefs_dialog, "check_list_symbol"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_list_symbol"); interface_prefs.sidebar_symbol_visible = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_list_openfiles"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_list_openfiles"); interface_prefs.sidebar_openfiles_visible = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_list_openfiles_fullpath"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_list_openfiles_fullpath"); interface_prefs.sidebar_openfiles_fullpath = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "radio_long_line_line"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_long_line_line"); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) editor_prefs.long_line_type = 0; else { - widget = lookup_widget(ui_widgets.prefs_dialog, "radio_long_line_background"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_long_line_background"); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) editor_prefs.long_line_type = 1; else { /* now only the disabled radio remains, so disable it */ @@ -761,34 +761,34 @@ } if (editor_prefs.long_line_column == 0) editor_prefs.long_line_type = 2;
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_show_notebook_tabs"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_show_notebook_tabs"); interface_prefs.show_notebook_tabs = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_show_tab_cross"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_show_tab_cross"); file_prefs.show_tab_cross = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "combo_tab_editor"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "combo_tab_editor"); interface_prefs.tab_pos_editor = gtk_combo_box_get_active(GTK_COMBO_BOX(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "combo_tab_msgwin"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "combo_tab_msgwin"); interface_prefs.tab_pos_msgwin = gtk_combo_box_get_active(GTK_COMBO_BOX(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "combo_tab_sidebar"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "combo_tab_sidebar"); interface_prefs.tab_pos_sidebar = gtk_combo_box_get_active(GTK_COMBO_BOX(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_statusbar_visible"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_statusbar_visible"); interface_prefs.statusbar_visible = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
/* Toolbar settings */ - widget = lookup_widget(ui_widgets.prefs_dialog, "check_toolbar_show"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_toolbar_show"); toolbar_prefs.visible = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "radio_toolbar_imagetext"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_toolbar_imagetext"); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) toolbar_prefs.icon_style = 2; else { - widget = lookup_widget(ui_widgets.prefs_dialog, "radio_toolbar_image"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_toolbar_image"); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) toolbar_prefs.icon_style = 0; else @@ -797,7 +797,7 @@ }
- widget = lookup_widget(ui_widgets.prefs_dialog, "radio_toolbar_large"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_toolbar_large"); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) toolbar_prefs.icon_size = GTK_ICON_SIZE_LARGE_TOOLBAR; else @@ -805,122 +805,122 @@
/* Files settings */ - widget = lookup_widget(ui_widgets.prefs_dialog, "radio_tab_right"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_tab_right"); file_prefs.tab_order_ltr = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "spin_mru"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "spin_mru"); file_prefs.mru_length = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "spin_disk_check"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "spin_disk_check"); file_prefs.disk_check_timeout = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "combo_new_encoding"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "combo_new_encoding"); file_prefs.default_new_encoding = gtk_combo_box_get_active(GTK_COMBO_BOX(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_open_encoding"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_open_encoding"); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) { - widget = lookup_widget(ui_widgets.prefs_dialog, "combo_open_encoding"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "combo_open_encoding"); file_prefs.default_open_encoding = gtk_combo_box_get_active(GTK_COMBO_BOX(widget)); } else file_prefs.default_open_encoding = -1;
- widget = lookup_widget(ui_widgets.prefs_dialog, "combo_eol"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "combo_eol"); file_prefs.default_eol_character = gtk_combo_box_get_active(GTK_COMBO_BOX(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_trailing_spaces"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_trailing_spaces"); file_prefs.strip_trailing_spaces = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_new_line"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_new_line"); file_prefs.final_new_line = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_replace_tabs"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_replace_tabs"); file_prefs.replace_tabs = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
/* Editor settings */ - widget = lookup_widget(ui_widgets.prefs_dialog, "entry_toggle_mark"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "entry_toggle_mark"); setptr(editor_prefs.comment_toggle_mark, gtk_editable_get_chars(GTK_EDITABLE(widget), 0, -1));
- widget = lookup_widget(ui_widgets.prefs_dialog, "spin_long_line"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "spin_long_line"); editor_prefs.long_line_column = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_folding"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_folding"); editor_prefs.folding = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); ui_update_fold_items();
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_unfold_children"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_unfold_children"); editor_prefs.unfold_all_children = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_indent"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_indent"); editor_prefs.show_indent_guide = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_white_space"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_white_space"); editor_prefs.show_white_space = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_line_end"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_line_end"); editor_prefs.show_line_endings = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_line_numbers"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_line_numbers"); editor_prefs.show_linenumber_margin = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_markers_margin"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_markers_margin"); editor_prefs.show_markers_margin = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_scroll_stop_at_last_line"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_scroll_stop_at_last_line"); editor_prefs.scroll_stop_at_last_line = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_line_wrapping"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_line_wrapping"); editor_prefs.line_wrapping = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_complete_snippets"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_complete_snippets"); editor_prefs.complete_snippets = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_xmltag"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_xmltag"); editor_prefs.auto_close_xml_tags = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_indicators"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_indicators"); editor_prefs.use_indicators = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_disable_dnd"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_disable_dnd"); editor_prefs.disable_dnd = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_smart_home"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_smart_home"); editor_prefs.smart_home_key = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_newline_strip"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_newline_strip"); editor_prefs.newline_strip = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_auto_multiline"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_auto_multiline"); editor_prefs.auto_continue_multiline = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_symbol_auto_completion"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_symbol_auto_completion"); editor_prefs.auto_complete_symbols = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "spin_symbol_complete_chars"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "spin_symbol_complete_chars"); editor_prefs.symbolcompletion_min_chars = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "spin_symbollistheight"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "spin_symbollistheight"); editor_prefs.symbolcompletion_max_height = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "spin_line_break"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "spin_line_break"); editor_prefs.line_break_column = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_autoclose_parenthesis"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_autoclose_parenthesis"); autoclose_brackets[0] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_autoclose_cbracket"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_autoclose_cbracket"); autoclose_brackets[1] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_autoclose_sbracket"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_autoclose_sbracket"); autoclose_brackets[2] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_autoclose_squote"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_autoclose_squote"); autoclose_brackets[3] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_autoclose_dquote"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_autoclose_dquote"); autoclose_brackets[4] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
editor_prefs.autoclose_chars = @@ -931,53 +931,53 @@ | (autoclose_brackets[4] ? GEANY_AC_DQUOTE : 0);
/* Tools Settings */ - widget = lookup_widget(ui_widgets.prefs_dialog, "entry_com_make"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "entry_com_make"); g_free(tool_prefs.make_cmd); tool_prefs.make_cmd = g_strdup(gtk_entry_get_text(GTK_ENTRY(widget)));
- widget = lookup_widget(ui_widgets.prefs_dialog, "entry_com_term"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "entry_com_term"); g_free(tool_prefs.term_cmd); tool_prefs.term_cmd = g_strdup(gtk_entry_get_text(GTK_ENTRY(widget)));
- widget = lookup_widget(ui_widgets.prefs_dialog, "entry_browser"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "entry_browser"); g_free(tool_prefs.browser_cmd); tool_prefs.browser_cmd = g_strdup(gtk_entry_get_text(GTK_ENTRY(widget)));
- widget = lookup_widget(ui_widgets.prefs_dialog, "entry_grep"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "entry_grep"); g_free(tool_prefs.grep_cmd); tool_prefs.grep_cmd = g_strdup(gtk_entry_get_text(GTK_ENTRY(widget)));
/* Template settings */ - widget = lookup_widget(ui_widgets.prefs_dialog, "entry_template_developer"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "entry_template_developer"); g_free(template_prefs.developer); template_prefs.developer = g_strdup(gtk_entry_get_text(GTK_ENTRY(widget)));
- widget = lookup_widget(ui_widgets.prefs_dialog, "entry_template_company"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "entry_template_company"); g_free(template_prefs.company); template_prefs.company = g_strdup(gtk_entry_get_text(GTK_ENTRY(widget)));
- widget = lookup_widget(ui_widgets.prefs_dialog, "entry_template_mail"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "entry_template_mail"); g_free(template_prefs.mail); template_prefs.mail = g_strdup(gtk_entry_get_text(GTK_ENTRY(widget)));
- widget = lookup_widget(ui_widgets.prefs_dialog, "entry_template_initial"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "entry_template_initial"); g_free(template_prefs.initials); template_prefs.initials = g_strdup(gtk_entry_get_text(GTK_ENTRY(widget)));
- widget = lookup_widget(ui_widgets.prefs_dialog, "entry_template_version"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "entry_template_version"); g_free(template_prefs.version); template_prefs.version = g_strdup(gtk_entry_get_text(GTK_ENTRY(widget)));
- widget = lookup_widget(ui_widgets.prefs_dialog, "entry_template_year"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "entry_template_year"); g_free(template_prefs.year_format); template_prefs.year_format = g_strdup(gtk_entry_get_text(GTK_ENTRY(widget)));
- widget = lookup_widget(ui_widgets.prefs_dialog, "entry_template_date"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "entry_template_date"); g_free(template_prefs.date_format); template_prefs.date_format = g_strdup(gtk_entry_get_text(GTK_ENTRY(widget)));
- widget = lookup_widget(ui_widgets.prefs_dialog, "entry_template_datetime"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "entry_template_datetime"); g_free(template_prefs.datetime_format); template_prefs.datetime_format = g_strdup(gtk_entry_get_text(GTK_ENTRY(widget)));
@@ -987,66 +987,66 @@
/* Printing */ - widget = lookup_widget(ui_widgets.prefs_dialog, "radio_print_gtk"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_print_gtk"); printing_prefs.use_gtk_printing = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "entry_print_external_cmd"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "entry_print_external_cmd"); g_free(printing_prefs.external_print_cmd); printing_prefs.external_print_cmd = g_strdup(gtk_entry_get_text(GTK_ENTRY(widget)));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_print_linenumbers"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_print_linenumbers"); printing_prefs.print_line_numbers = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_print_pagenumbers"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_print_pagenumbers"); printing_prefs.print_page_numbers = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_print_pageheader"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_print_pageheader"); printing_prefs.print_page_header = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_print_basename"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_print_basename"); printing_prefs.page_header_basename = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "entry_print_dateformat"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "entry_print_dateformat"); g_free(printing_prefs.page_header_datefmt); printing_prefs.page_header_datefmt = g_strdup(gtk_entry_get_text(GTK_ENTRY(widget)));
#ifdef HAVE_VTE - widget = lookup_widget(ui_widgets.prefs_dialog, "check_vte"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_vte"); vte_info.load_vte = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
/* VTE settings */ if (vte_info.have_vte) { - widget = lookup_widget(ui_widgets.prefs_dialog, "spin_scrollback"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "spin_scrollback"); vc->scrollback_lines = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "entry_shell"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "entry_shell"); g_free(vc->shell); vc->shell = g_strdup(gtk_entry_get_text(GTK_ENTRY(widget)));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_scroll_key"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_scroll_key"); vc->scroll_on_key = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_scroll_out"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_scroll_out"); vc->scroll_on_out = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_enable_bash_keys"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_enable_bash_keys"); vc->enable_bash_keys = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_ignore_menu_key"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_ignore_menu_key"); vc->ignore_menu_bar_accel = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_follow_path"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_follow_path"); vc->follow_path = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_run_in_vte"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_run_in_vte"); vc->run_in_vte = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_skip_script"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_skip_script"); vc->skip_run_script = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = lookup_widget(ui_widgets.prefs_dialog, "check_cursor_blinks"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_cursor_blinks"); vc->cursor_blinks = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
vte_apply_user_settings(); @@ -1157,7 +1157,7 @@ ui_widget_modify_font_from_string(msgwindow.tree_msg, interface_prefs.msgwin_font); ui_widget_modify_font_from_string(msgwindow.tree_status, interface_prefs.msgwin_font); ui_widget_modify_font_from_string( - lookup_widget(main_widgets.window, "textview_scribble"), + ui_lookup_widget(main_widgets.window, "textview_scribble"), interface_prefs.msgwin_font); break; } @@ -1430,7 +1430,7 @@ { gboolean sens = gtk_toggle_button_get_active(togglebutton);
- gtk_widget_set_sensitive(lookup_widget(ui_widgets.prefs_dialog, "frame13"), sens); + gtk_widget_set_sensitive(ui_lookup_widget(ui_widgets.prefs_dialog, "frame13"), sens); }
@@ -1439,8 +1439,8 @@ gboolean sens = gtk_toggle_button_get_active(togglebutton);
/* tab placement only enabled when tabs are visible */ - gtk_widget_set_sensitive(lookup_widget(ui_widgets.prefs_dialog, "combo_tab_editor"), sens); - gtk_widget_set_sensitive(lookup_widget(ui_widgets.prefs_dialog, "check_show_tab_cross"), sens); + gtk_widget_set_sensitive(ui_lookup_widget(ui_widgets.prefs_dialog, "combo_tab_editor"), sens); + gtk_widget_set_sensitive(ui_lookup_widget(ui_widgets.prefs_dialog, "check_show_tab_cross"), sens); }
@@ -1448,7 +1448,7 @@ { gboolean sens = gtk_toggle_button_get_active(togglebutton);
- gtk_widget_set_sensitive(lookup_widget(ui_widgets.prefs_dialog, "check_unfold_children"), sens); + gtk_widget_set_sensitive(ui_lookup_widget(ui_widgets.prefs_dialog, "check_unfold_children"), sens); }
@@ -1456,8 +1456,8 @@ { gboolean sens = gtk_toggle_button_get_active(togglebutton);
- gtk_widget_set_sensitive(lookup_widget(ui_widgets.prefs_dialog, "eventbox3"), sens); - gtk_widget_set_sensitive(lookup_widget(ui_widgets.prefs_dialog, "label_open_encoding"), sens); + gtk_widget_set_sensitive(ui_lookup_widget(ui_widgets.prefs_dialog, "eventbox3"), sens); + gtk_widget_set_sensitive(ui_lookup_widget(ui_widgets.prefs_dialog, "label_open_encoding"), sens); }
@@ -1465,7 +1465,7 @@ { gboolean sens = gtk_toggle_button_get_active(togglebutton);
- gtk_widget_set_sensitive(lookup_widget(ui_widgets.prefs_dialog, "check_list_openfiles_fullpath"), sens); + gtk_widget_set_sensitive(ui_lookup_widget(ui_widgets.prefs_dialog, "check_list_openfiles_fullpath"), sens); }
@@ -1473,8 +1473,8 @@ { gboolean sens = gtk_toggle_button_get_active(togglebutton);
- gtk_widget_set_sensitive(lookup_widget(ui_widgets.prefs_dialog, "vbox29"), sens); - gtk_widget_set_sensitive(lookup_widget(ui_widgets.prefs_dialog, "hbox9"), ! sens); + gtk_widget_set_sensitive(ui_lookup_widget(ui_widgets.prefs_dialog, "vbox29"), sens); + gtk_widget_set_sensitive(ui_lookup_widget(ui_widgets.prefs_dialog, "hbox9"), ! sens); }
@@ -1482,8 +1482,8 @@ { gboolean sens = gtk_toggle_button_get_active(togglebutton);
- gtk_widget_set_sensitive(lookup_widget(ui_widgets.prefs_dialog, "check_print_basename"), sens); - gtk_widget_set_sensitive(lookup_widget(ui_widgets.prefs_dialog, "entry_print_dateformat"), sens); + gtk_widget_set_sensitive(ui_lookup_widget(ui_widgets.prefs_dialog, "check_print_basename"), sens); + gtk_widget_set_sensitive(ui_lookup_widget(ui_widgets.prefs_dialog, "entry_print_dateformat"), sens); }
@@ -1501,8 +1501,8 @@ gtk_window_set_transient_for(GTK_WINDOW(ui_widgets.prefs_dialog), GTK_WINDOW(main_widgets.window));
/* init the default file encoding combo box */ - combo_new = lookup_widget(ui_widgets.prefs_dialog, "combo_new_encoding"); - combo_open = lookup_widget(ui_widgets.prefs_dialog, "combo_open_encoding"); + combo_new = ui_lookup_widget(ui_widgets.prefs_dialog, "combo_new_encoding"); + combo_open = ui_lookup_widget(ui_widgets.prefs_dialog, "combo_open_encoding"); gtk_combo_box_set_wrap_width(GTK_COMBO_BOX(combo_new), 3); gtk_combo_box_set_wrap_width(GTK_COMBO_BOX(combo_open), 3); for (i = 0; i < GEANY_ENCODINGS_MAX; i++) @@ -1514,7 +1514,7 @@ }
/* init the eol character combo box */ - combo_eol = lookup_widget(ui_widgets.prefs_dialog, "combo_eol"); + combo_eol = ui_lookup_widget(ui_widgets.prefs_dialog, "combo_eol"); gtk_combo_box_append_text(GTK_COMBO_BOX(combo_eol), utils_get_eol_name(SC_EOL_CRLF)); gtk_combo_box_append_text(GTK_COMBO_BOX(combo_eol), utils_get_eol_name(SC_EOL_CR)); gtk_combo_box_append_text(GTK_COMBO_BOX(combo_eol), utils_get_eol_name(SC_EOL_LF)); @@ -1523,34 +1523,34 @@ /* page Tools */ label = geany_wrap_label_new(_("Enter tool paths below. Tools you do not need can be left blank.")); gtk_widget_show(label); - gtk_box_pack_start(GTK_BOX(lookup_widget(ui_widgets.prefs_dialog, "vbox33")), + gtk_box_pack_start(GTK_BOX(ui_lookup_widget(ui_widgets.prefs_dialog, "vbox33")), label, FALSE, TRUE, 5); /* page Templates */ label = geany_wrap_label_new(_("Set the information to be used in templates. See the documentation for details.")); gtk_widget_show(label); - gtk_box_pack_start(GTK_BOX(lookup_widget(ui_widgets.prefs_dialog, "vbox31")), + gtk_box_pack_start(GTK_BOX(ui_lookup_widget(ui_widgets.prefs_dialog, "vbox31")), label, FALSE, TRUE, 5); label = geany_wrap_label_new(_("<i>Notice: For all changes you make here to take effect, you need to restart Geany or force the reload of the settings using Tools->Reload Configuration.</i>")); gtk_widget_show(label); gtk_label_set_use_markup(GTK_LABEL(label), TRUE); - gtk_box_pack_start(GTK_BOX(lookup_widget(ui_widgets.prefs_dialog, "vbox9")), + gtk_box_pack_start(GTK_BOX(ui_lookup_widget(ui_widgets.prefs_dialog, "vbox9")), label, FALSE, TRUE, 5); /* page Keybindings */ label = geany_wrap_label_new(_("Here you can change keyboard shortcuts for various actions. Select one and press the Change button to enter a new shortcut, or double click on an action to edit the string representation of the shortcut directly.")); gtk_widget_show(label); - gtk_box_pack_start(GTK_BOX(lookup_widget(ui_widgets.prefs_dialog, "vbox32")), + gtk_box_pack_start(GTK_BOX(ui_lookup_widget(ui_widgets.prefs_dialog, "vbox32")), label, FALSE, TRUE, 5); /* page Printing */ label = geany_wrap_label_new(_("<i>Notice: Native GTK printing is only available if Geany was built against GTK 2.10 (or above) <b>and</b> Geany is running with GTK 2.10 (or above).</i>")); gtk_widget_show(label); gtk_label_set_use_markup(GTK_LABEL(label), TRUE); - gtk_box_pack_start(GTK_BOX(lookup_widget(ui_widgets.prefs_dialog, "vbox27")), + gtk_box_pack_start(GTK_BOX(ui_lookup_widget(ui_widgets.prefs_dialog, "vbox27")), label, FALSE, TRUE, 5); /* page Toolbar */ label = geany_wrap_label_new(_("<i>Notice: To customize the toolbar elements, edit the file 'ui_toolbar.xml'. Please see the documentation for details.</i>")); gtk_widget_show(label); gtk_label_set_use_markup(GTK_LABEL(label), TRUE); - gtk_box_pack_start(GTK_BOX(lookup_widget(ui_widgets.prefs_dialog, "vbox15")), + gtk_box_pack_start(GTK_BOX(ui_lookup_widget(ui_widgets.prefs_dialog, "vbox15")), label, FALSE, TRUE, 5);
@@ -1558,53 +1558,53 @@ vte_append_preferences_tab(); #endif
- 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"))); + ui_setup_open_button_callback(ui_lookup_widget(ui_widgets.prefs_dialog, "startup_path_button"), NULL, + GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK_ENTRY(ui_lookup_widget(ui_widgets.prefs_dialog, "startup_path_entry")));
g_signal_connect(ui_widgets.prefs_dialog, "response", G_CALLBACK(on_prefs_button_clicked), NULL); g_signal_connect(ui_widgets.prefs_dialog, "delete-event", G_CALLBACK(gtk_widget_hide_on_delete), NULL);
- g_signal_connect(lookup_widget(ui_widgets.prefs_dialog, "tagbar_font"), + g_signal_connect(ui_lookup_widget(ui_widgets.prefs_dialog, "tagbar_font"), "font-set", G_CALLBACK(on_prefs_font_choosed), GINT_TO_POINTER(1)); - g_signal_connect(lookup_widget(ui_widgets.prefs_dialog, "msgwin_font"), + g_signal_connect(ui_lookup_widget(ui_widgets.prefs_dialog, "msgwin_font"), "font-set", G_CALLBACK(on_prefs_font_choosed), GINT_TO_POINTER(2)); - g_signal_connect(lookup_widget(ui_widgets.prefs_dialog, "editor_font"), + g_signal_connect(ui_lookup_widget(ui_widgets.prefs_dialog, "editor_font"), "font-set", G_CALLBACK(on_prefs_font_choosed), GINT_TO_POINTER(3)); - g_signal_connect(lookup_widget(ui_widgets.prefs_dialog, "long_line_color"), + g_signal_connect(ui_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(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(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(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(lookup_widget(ui_widgets.prefs_dialog, "button_grep"), - "clicked", G_CALLBACK(on_prefs_tools_button_clicked), lookup_widget(ui_widgets.prefs_dialog, "entry_grep")); + g_signal_connect(ui_lookup_widget(ui_widgets.prefs_dialog, "button_make"), + "clicked", G_CALLBACK(on_prefs_tools_button_clicked), ui_lookup_widget(ui_widgets.prefs_dialog, "entry_com_make")); + g_signal_connect(ui_lookup_widget(ui_widgets.prefs_dialog, "button_term"), + "clicked", G_CALLBACK(on_prefs_tools_button_clicked), ui_lookup_widget(ui_widgets.prefs_dialog, "entry_com_term")); + g_signal_connect(ui_lookup_widget(ui_widgets.prefs_dialog, "button_browser"), + "clicked", G_CALLBACK(on_prefs_tools_button_clicked), ui_lookup_widget(ui_widgets.prefs_dialog, "entry_browser")); + g_signal_connect(ui_lookup_widget(ui_widgets.prefs_dialog, "button_grep"), + "clicked", G_CALLBACK(on_prefs_tools_button_clicked), ui_lookup_widget(ui_widgets.prefs_dialog, "entry_grep"));
/* tools commands */ - 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(ui_lookup_widget(ui_widgets.prefs_dialog, "button_contextaction"), + "clicked", G_CALLBACK(on_prefs_tools_button_clicked), ui_lookup_widget(ui_widgets.prefs_dialog, "entry_contextaction"));
/* printing */ - 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(lookup_widget(ui_widgets.prefs_dialog, "radio_print_gtk"), + g_signal_connect(ui_lookup_widget(ui_widgets.prefs_dialog, "button_print_external_cmd"), + "clicked", G_CALLBACK(on_prefs_tools_button_clicked), ui_lookup_widget(ui_widgets.prefs_dialog, "entry_print_external_cmd")); + g_signal_connect(ui_lookup_widget(ui_widgets.prefs_dialog, "radio_print_gtk"), "toggled", G_CALLBACK(on_prefs_print_radio_button_toggled), NULL); - g_signal_connect(lookup_widget(ui_widgets.prefs_dialog, "check_print_pageheader"), + g_signal_connect(ui_lookup_widget(ui_widgets.prefs_dialog, "check_print_pageheader"), "toggled", G_CALLBACK(on_prefs_print_page_header_toggled), NULL);
- g_signal_connect(lookup_widget(ui_widgets.prefs_dialog, "check_toolbar_show"), + g_signal_connect(ui_lookup_widget(ui_widgets.prefs_dialog, "check_toolbar_show"), "toggled", G_CALLBACK(on_toolbar_show_toggled), NULL); - g_signal_connect(lookup_widget(ui_widgets.prefs_dialog, "check_show_notebook_tabs"), + g_signal_connect(ui_lookup_widget(ui_widgets.prefs_dialog, "check_show_notebook_tabs"), "toggled", G_CALLBACK(on_show_notebook_tabs_toggled), NULL); - g_signal_connect(lookup_widget(ui_widgets.prefs_dialog, "check_folding"), + g_signal_connect(ui_lookup_widget(ui_widgets.prefs_dialog, "check_folding"), "toggled", G_CALLBACK(on_use_folding_toggled), NULL); - g_signal_connect(lookup_widget(ui_widgets.prefs_dialog, "check_open_encoding"), + g_signal_connect(ui_lookup_widget(ui_widgets.prefs_dialog, "check_open_encoding"), "toggled", G_CALLBACK(on_open_encoding_toggled), NULL); - g_signal_connect(lookup_widget(ui_widgets.prefs_dialog, "check_list_openfiles"), + g_signal_connect(ui_lookup_widget(ui_widgets.prefs_dialog, "check_list_openfiles"), "toggled", G_CALLBACK(on_openfiles_visible_toggled), NULL); }
Modified: trunk/src/project.c =================================================================== --- trunk/src/project.c 2008-12-18 19:23:32 UTC (rev 3401) +++ trunk/src/project.c 2008-12-18 21:21:53 UTC (rev 3402) @@ -1045,8 +1045,8 @@ /* Initialize project-related preferences in the Preferences dialog. */ void project_setup_prefs() { - GtkWidget *path_entry = lookup_widget(ui_widgets.prefs_dialog, "project_file_path_entry"); - GtkWidget *path_btn = lookup_widget(ui_widgets.prefs_dialog, "project_file_path_button"); + GtkWidget *path_entry = ui_lookup_widget(ui_widgets.prefs_dialog, "project_file_path_entry"); + GtkWidget *path_btn = ui_lookup_widget(ui_widgets.prefs_dialog, "project_file_path_button");
g_return_if_fail(local_prefs.project_file_path != NULL); gtk_entry_set_text(GTK_ENTRY(path_entry), local_prefs.project_file_path); @@ -1058,7 +1058,7 @@ /* Update project-related preferences after using the Preferences dialog. */ void project_apply_prefs() { - GtkWidget *path_entry = lookup_widget(ui_widgets.prefs_dialog, "project_file_path_entry"); + GtkWidget *path_entry = ui_lookup_widget(ui_widgets.prefs_dialog, "project_file_path_entry"); const gchar *str;
str = gtk_entry_get_text(GTK_ENTRY(path_entry));
Modified: trunk/src/search.c =================================================================== --- trunk/src/search.c 2008-12-18 19:23:32 UTC (rev 3401) +++ trunk/src/search.c 2008-12-18 21:21:53 UTC (rev 3402) @@ -436,8 +436,8 @@ /* only set selection if the dialog is not already visible */ if (! GTK_WIDGET_VISIBLE(widgets.find_dialog) && sel) gtk_entry_set_text(GTK_ENTRY(GTK_BIN( - lookup_widget(widgets.find_dialog, "entry"))->child), sel); - gtk_widget_grab_focus(GTK_WIDGET(GTK_BIN(lookup_widget(widgets.find_dialog, "entry"))->child)); + ui_lookup_widget(widgets.find_dialog, "entry"))->child), sel); + gtk_widget_grab_focus(GTK_WIDGET(GTK_BIN(ui_lookup_widget(widgets.find_dialog, "entry"))->child)); gtk_widget_show(widgets.find_dialog); /* bring the dialog back in the foreground in case it is already open but the focus is away */ gtk_window_present(GTK_WINDOW(widgets.find_dialog)); @@ -581,8 +581,8 @@ /* only set selection if the dialog is not already visible */ if (! GTK_WIDGET_VISIBLE(widgets.replace_dialog) && sel) gtk_entry_set_text(GTK_ENTRY(GTK_BIN( - lookup_widget(widgets.replace_dialog, "entry_find"))->child), sel); - gtk_widget_grab_focus(GTK_WIDGET(GTK_BIN(lookup_widget(widgets.replace_dialog, "entry_find"))->child)); + ui_lookup_widget(widgets.replace_dialog, "entry_find"))->child), sel); + gtk_widget_grab_focus(GTK_WIDGET(GTK_BIN(ui_lookup_widget(widgets.replace_dialog, "entry_find"))->child)); gtk_widget_show(widgets.replace_dialog); /* bring the dialog back in the foreground in case it is already open but the focus is away */ gtk_window_present(GTK_WINDOW(widgets.replace_dialog)); @@ -852,22 +852,22 @@ { GtkWidget *dialog = GTK_WIDGET(user_data); GtkToggleButton *chk_regexp = GTK_TOGGLE_BUTTON( - lookup_widget(dialog, "check_regexp")); + ui_lookup_widget(dialog, "check_regexp"));
if (togglebutton == chk_regexp) { gboolean regex_set = gtk_toggle_button_get_active(chk_regexp); - GtkWidget *check_word = lookup_widget(dialog, "check_word"); - GtkWidget *check_wordstart = lookup_widget(dialog, "check_wordstart"); + GtkWidget *check_word = ui_lookup_widget(dialog, "check_word"); + GtkWidget *check_wordstart = ui_lookup_widget(dialog, "check_wordstart"); GtkToggleButton *check_case = GTK_TOGGLE_BUTTON( - lookup_widget(dialog, "check_case")); + ui_lookup_widget(dialog, "check_case")); static gboolean case_state = FALSE; /* state before regex enabled */
/* hide options that don't apply to regex searches */ if (dialog == widgets.find_dialog) - gtk_widget_set_sensitive(lookup_widget(dialog, "btn_previous"), ! regex_set); + gtk_widget_set_sensitive(ui_lookup_widget(dialog, "btn_previous"), ! regex_set); else - gtk_widget_set_sensitive(lookup_widget(dialog, "check_back"), ! regex_set); + gtk_widget_set_sensitive(ui_lookup_widget(dialog, "check_back"), ! regex_set);
gtk_widget_set_sensitive(check_word, ! regex_set); gtk_widget_set_sensitive(check_wordstart, ! regex_set); @@ -922,7 +922,7 @@ on_find_entry_activate(GtkEntry *entry, gpointer user_data) {
@@ Diff output truncated at 100000 characters. @@
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.