1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-11 02:50:24 +00:00
freebsd-ports/x11/gtkchtheme/files/patch-theme_sel.c
2004-06-23 10:50:57 +00:00

53 lines
1.7 KiB
C

--- theme_sel.c.orig Wed Jun 23 11:32:31 2004
+++ theme_sel.c Wed Jun 23 11:34:15 2004
@@ -53,6 +53,9 @@
GtkWidget *create_theme_sel(void)
{
+ GtkTreeSelection *selection;
+ GtkTreeViewColumn *column;
+ GtkWidget *sw;
GtkListStore *store = gtk_list_store_new(1, G_TYPE_STRING);
gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(store), 0,
@@ -65,7 +68,7 @@
gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(theme_list), TRUE);
gtk_tree_view_set_search_column(GTK_TREE_VIEW(theme_list), 0);
- GtkTreeSelection *selection =
+ selection =
gtk_tree_view_get_selection(GTK_TREE_VIEW(theme_list));
gtk_tree_selection_set_mode(selection, GTK_SELECTION_BROWSE);
@@ -81,11 +84,12 @@
do
{
+ GtkTreePath *p;
gtk_tree_model_get(GTK_TREE_MODEL(store), &iter, 0, &newtheme, -1);
if (strcmp(newtheme, get_theme()) != 0)
continue;
- GtkTreePath *p = gtk_tree_model_get_path(GTK_TREE_MODEL(store), &iter);
+ p = gtk_tree_model_get_path(GTK_TREE_MODEL(store), &iter);
gtk_tree_view_set_cursor(GTK_TREE_VIEW(theme_list), p, NULL, FALSE);
gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(theme_list), p, NULL, TRUE, 0.5, 0);
@@ -97,14 +101,14 @@
g_object_unref(G_OBJECT(store));
- GtkTreeViewColumn *column =
+ column =
gtk_tree_view_column_new_with_attributes("Theme",
gtk_cell_renderer_text_new(), "text", 0, NULL);
gtk_tree_view_column_set_sort_column_id(column, 0);
gtk_tree_view_append_column(GTK_TREE_VIEW(theme_list), column);
- GtkWidget *sw = gtk_scrolled_window_new(NULL, NULL);
+ sw = gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);