Revision: 4611 http://geany.svn.sourceforge.net/geany/?rev=4611&view=rev Author: eht16 Date: 2010-01-31 16:26:44 +0000 (Sun, 31 Jan 2010)
Log Message: ----------- Backport from trunk: Rename "select" variables into "selection" to avoid shadowed names.
Modified Paths: -------------- branches/geany-0.18.1/ChangeLog branches/geany-0.18.1/src/treeviews.c
Modified: branches/geany-0.18.1/ChangeLog =================================================================== --- branches/geany-0.18.1/ChangeLog 2010-01-31 16:26:13 UTC (rev 4610) +++ branches/geany-0.18.1/ChangeLog 2010-01-31 16:26:44 UTC (rev 4611) @@ -51,6 +51,8 @@ Before looking for line and column numbers specified as part of a filename, ensure the file doesn't exist on disk. This allows opening of files like "test:0". + * src/treeviews.c: + Rename "select" variables into "selection" to avoid shadowed names.
2009-10-19 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
Modified: branches/geany-0.18.1/src/treeviews.c =================================================================== --- branches/geany-0.18.1/src/treeviews.c 2010-01-31 16:26:13 UTC (rev 4610) +++ branches/geany-0.18.1/src/treeviews.c 2010-01-31 16:26:44 UTC (rev 4611) @@ -103,7 +103,7 @@ { GtkCellRenderer *text_renderer, *icon_renderer; GtkTreeViewColumn *column; - GtkTreeSelection *select; + GtkTreeSelection *selection;
text_renderer = gtk_cell_renderer_text_new(); icon_renderer = gtk_cell_renderer_pixbuf_new(); @@ -145,8 +145,8 @@ }
/* selection handling */ - select = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree)); - gtk_tree_selection_set_mode(select, GTK_SELECTION_SINGLE); + selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree)); + gtk_tree_selection_set_mode(selection, GTK_SELECTION_SINGLE); /* callback for changed selection not necessary, will be handled by button-press-event */ }
@@ -232,7 +232,7 @@ GtkCellRenderer *icon_renderer; GtkCellRenderer *text_renderer; GtkTreeViewColumn *column; - GtkTreeSelection *select; + GtkTreeSelection *selection; GtkTreeSortable *sortable;
tv.tree_openfiles = ui_lookup_widget(main_widgets.window, "treeview6"); @@ -278,9 +278,9 @@ G_CALLBACK(on_documents_button_release_event), NULL);
/* selection handling */ - select = gtk_tree_view_get_selection(GTK_TREE_VIEW(tv.tree_openfiles)); - gtk_tree_selection_set_mode(select, GTK_SELECTION_SINGLE); - g_signal_connect(select, "changed", G_CALLBACK(on_openfiles_tree_selection_changed), NULL); + selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tv.tree_openfiles)); + gtk_tree_selection_set_mode(selection, GTK_SELECTION_SINGLE); + g_signal_connect(selection, "changed", G_CALLBACK(on_openfiles_tree_selection_changed), NULL); }
@@ -783,10 +783,10 @@ event->keyval == GDK_KP_Enter || event->keyval == GDK_space) { - GtkTreeSelection *select = gtk_tree_view_get_selection(GTK_TREE_VIEW(widget)); + GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(widget)); /* delay the query of selection state because this callback is executed before GTK * changes the selection (g_signal_connect_after would be better but it doesn't work) */ - g_idle_add((GSourceFunc) on_taglist_tree_selection_changed, select); + g_idle_add((GSourceFunc) on_taglist_tree_selection_changed, selection); } return FALSE; }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.