[geany/geany] 521778: Color scheme dialog: scroll to the initially selected item
Colomban Wendling
git-noreply at xxxxx
Tue Aug 12 18:40:21 UTC 2014
Branch: refs/heads/master
Author: Colomban Wendling <ban at herbesfolles.org>
Committer: Colomban Wendling <ban at herbesfolles.org>
Date: Tue, 12 Aug 2014 18:40:21 UTC
Commit: 521778ad311d076d1d423c4d9e4421fd66c57bf3
https://github.com/geany/geany/commit/521778ad311d076d1d423c4d9e4421fd66c57bf3
Log Message:
-----------
Color scheme dialog: scroll to the initially selected item
Modified Paths:
--------------
src/highlighting.c
Modified: src/highlighting.c
4 lines changed, 4 insertions(+), 0 deletions(-)
===================================================================
@@ -1329,6 +1329,7 @@ void highlighting_show_color_scheme_dialog(void)
GtkTreeViewColumn *column;
GtkTreeSelection *treesel;
GtkTreeIter current_iter;
+ GtkTreePath *path;
GtkWidget *vbox, *swin, *tree;
GeanyDocument *doc;
@@ -1353,6 +1354,9 @@ void highlighting_show_color_scheme_dialog(void)
treesel = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree));
gtk_tree_selection_select_iter(treesel, ¤t_iter);
+ path = gtk_tree_model_get_path(GTK_TREE_MODEL(store), ¤t_iter);
+ gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(tree), path, NULL, FALSE, 0, 0);
+ gtk_tree_path_free(path);
g_signal_connect(treesel, "changed", G_CALLBACK(on_color_scheme_changed), NULL);
/* old dialog may still be showing */
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list