Revision: 5848 http://geany.svn.sourceforge.net/geany/?rev=5848&view=rev Author: colombanw Date: 2011-06-13 23:03:19 +0000 (Mon, 13 Jun 2011)
Log Message: ----------- Remove treeview-related pre GTK 2.12 support
Modified Paths: -------------- trunk/plugins/filebrowser.c trunk/src/sidebar.c trunk/src/symbols.c
Modified: trunk/plugins/filebrowser.c =================================================================== --- trunk/plugins/filebrowser.c 2011-06-13 21:02:16 UTC (rev 5847) +++ trunk/plugins/filebrowser.c 2011-06-13 23:03:19 UTC (rev 5848) @@ -841,9 +841,8 @@
ui_widget_modify_font_from_string(file_view, geany->interface_prefs->tagbar_font);
- /* GTK 2.12 tooltips */ - if (gtk_check_version(2, 12, 0) == NULL) - g_object_set(file_view, "has-tooltip", TRUE, "tooltip-column", FILEVIEW_COLUMN_FILENAME, NULL); + /* tooltips */ + gtk_tree_view_set_tooltip_column(file_view, FILEVIEW_COLUMN_FILENAME);
/* selection handling */ selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(file_view));
Modified: trunk/src/sidebar.c =================================================================== --- trunk/src/sidebar.c 2011-06-13 21:02:16 UTC (rev 5847) +++ trunk/src/sidebar.c 2011-06-13 23:03:19 UTC (rev 5848) @@ -306,9 +306,8 @@
ui_widget_modify_font_from_string(tv.tree_openfiles, interface_prefs.tagbar_font);
- /* GTK 2.12 tooltips */ - if (gtk_check_version(2, 12, 0) == NULL) - g_object_set(tv.tree_openfiles, "has-tooltip", TRUE, "tooltip-column", DOCUMENTS_FILENAME, NULL); + /* tooltips */ + gtk_tree_view_set_tooltip_column(tv.tree_openfiles, DOCUMENTS_FILENAME);
/* selection handling */ selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tv.tree_openfiles)); @@ -1044,19 +1043,14 @@ g_signal_connect(geany_object, "load-settings", on_load_settings, NULL); g_signal_connect(geany_object, "save-settings", on_save_settings, NULL);
+ g_signal_connect(main_widgets.sidebar_notebook, "page-added", + G_CALLBACK(sidebar_tabs_show_hide), NULL); + g_signal_connect(main_widgets.sidebar_notebook, "page-removed", + G_CALLBACK(sidebar_tabs_show_hide), NULL); + /* tabs may have changed when sidebar is reshown */ + g_signal_connect(main_widgets.sidebar_notebook, "show", + G_CALLBACK(sidebar_tabs_show_hide), NULL);
- if (gtk_check_version(2, 10, 0) == NULL) - { - g_signal_connect(main_widgets.sidebar_notebook, "page-added", - G_CALLBACK(sidebar_tabs_show_hide), NULL); - - g_signal_connect(main_widgets.sidebar_notebook, "page-removed", - G_CALLBACK(sidebar_tabs_show_hide), NULL); - - /* tabs may have changed when sidebar is reshown */ - g_signal_connect(main_widgets.sidebar_notebook, "show", - G_CALLBACK(sidebar_tabs_show_hide), NULL); - } sidebar_tabs_show_hide(GTK_NOTEBOOK(main_widgets.sidebar_notebook), NULL, 0, NULL); }
@@ -1107,15 +1101,12 @@ static void sidebar_tabs_show_hide(GtkNotebook *notebook, GtkWidget *child, guint page_num, gpointer data) { - if (gtk_check_version(2, 10, 0) == NULL) - { - gint tabs = gtk_notebook_get_n_pages(notebook); + gint tabs = gtk_notebook_get_n_pages(notebook);
- if (interface_prefs.sidebar_symbol_visible == FALSE) - tabs--; - if (interface_prefs.sidebar_openfiles_visible == FALSE) - tabs--; + if (interface_prefs.sidebar_symbol_visible == FALSE) + tabs--; + if (interface_prefs.sidebar_openfiles_visible == FALSE) + tabs--;
- gtk_notebook_set_show_tabs(notebook, (tabs > 1)); - } + gtk_notebook_set_show_tabs(notebook, (tabs > 1)); }
Modified: trunk/src/symbols.c =================================================================== --- trunk/src/symbols.c 2011-06-13 21:02:16 UTC (rev 5847) +++ trunk/src/symbols.c 2011-06-13 23:03:19 UTC (rev 5848) @@ -1282,6 +1282,7 @@ GtkTreeIter iter; GtkTreeIter *child = NULL; GdkPixbuf *icon = NULL; + gchar *tooltip;
child = &iter; icon = get_child_icon(tree_store, parent); @@ -1328,20 +1329,16 @@ }
name = get_symbol_name(doc, tag, (parent_name != NULL)); + tooltip = get_symbol_tooltip(doc, tag); gtk_tree_store_set(tree_store, child, SYMBOLS_COLUMN_ICON, icon, SYMBOLS_COLUMN_NAME, name, SYMBOLS_COLUMN_TAG, tag, SYMBOLS_COLUMN_VALID, TRUE, + SYMBOLS_COLUMN_TOOLTIP, tooltip, -1);
- if (gtk_check_version(2, 12, 0) == NULL) - { - gchar *tooltip = get_symbol_tooltip(doc, tag); - gtk_tree_store_set(tree_store, child, SYMBOLS_COLUMN_TOOLTIP, tooltip, -1); - g_free(tooltip); - } - + g_free(tooltip); if (G_LIKELY(G_IS_OBJECT(icon))) g_object_unref(icon); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.