[gedit] Fix critical on exit in the documents panel
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Fix critical on exit in the documents panel
- Date: Mon, 26 Dec 2011 13:51:59 +0000 (UTC)
commit 86b7e11309db927edae3a9c3efdc1e3af5add1cb
Author: Paolo Borelli <pborelli gnome org>
Date: Mon Dec 26 14:53:40 2011 +0100
Fix critical on exit in the documents panel
Track the selection with selection::changed instead of the cursor.
gedit/gedit-documents-panel.c | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)
---
diff --git a/gedit/gedit-documents-panel.c b/gedit/gedit-documents-panel.c
index a2f0420..a03af3d 100644
--- a/gedit/gedit-documents-panel.c
+++ b/gedit/gedit-documents-panel.c
@@ -587,16 +587,13 @@ set_window (GeditDocumentsPanel *panel,
}
static void
-treeview_cursor_changed (GtkTreeView *view,
- GeditDocumentsPanel *panel)
+treeview_selection_changed (GtkTreeSelection *selection,
+ GeditDocumentsPanel *panel)
{
GtkTreeIter iter;
- GtkTreeSelection *selection;
gedit_debug (DEBUG_PANEL);
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (panel->priv->treeview));
-
if (gtk_tree_selection_get_selected (selection, NULL, &iter))
{
GeditNotebook *notebook;
@@ -1164,13 +1161,12 @@ gedit_documents_panel_init (GeditDocumentsPanel *panel)
panel);
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (panel->priv->treeview));
-
gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
-
- g_signal_connect (panel->priv->treeview,
- "cursor-changed",
- G_CALLBACK (treeview_cursor_changed),
+ g_signal_connect (selection,
+ "changed",
+ G_CALLBACK (treeview_selection_changed),
panel);
+
g_signal_connect (panel->priv->treeview,
"button-press-event",
G_CALLBACK (panel_button_press_event),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]