[epiphany] CookiesDialog: Use tree_selection.
- From: Arnaud Bonatti <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] CookiesDialog: Use tree_selection.
- Date: Sun, 1 Nov 2015 15:51:57 +0000 (UTC)
commit a2c072f22ded65b0f7ac6b21c6b3f7d5f31ababe
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Sat Oct 31 05:28:04 2015 +0100
CookiesDialog: Use tree_selection.
https://bugzilla.gnome.org/show_bug.cgi?id=757401
src/cookies-dialog.c | 6 +++---
src/resources/cookies-dialog.ui | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/cookies-dialog.c b/src/cookies-dialog.c
index af53b76..4a16dbe 100644
--- a/src/cookies-dialog.c
+++ b/src/cookies-dialog.c
@@ -42,6 +42,7 @@ enum
struct CookiesDialogPrivate
{
GtkWidget *cookies_treeview;
+ GtkTreeSelection *tree_selection;
GtkWidget *liststore;
GtkWidget *treemodelfilter;
GtkWidget *treemodelsort;
@@ -113,13 +114,11 @@ delete_selection (CookiesDialog *dialog)
{
GList *llist, *rlist = NULL, *l, *r;
GtkTreeModel *model;
- GtkTreeSelection *selection;
GtkTreePath *path;
GtkTreeIter iter, iter2;
GtkTreeRowReference *row_ref = NULL;
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (dialog->priv->cookies_treeview));
- llist = gtk_tree_selection_get_selected_rows (selection, &model);
+ llist = gtk_tree_selection_get_selected_rows (dialog->priv->tree_selection, &model);
if (llist == NULL)
{
@@ -266,6 +265,7 @@ cookies_dialog_class_init (CookiesDialogClass *klass)
gtk_widget_class_bind_template_child_private (widget_class, CookiesDialog, treemodelfilter);
gtk_widget_class_bind_template_child_private (widget_class, CookiesDialog, treemodelsort);
gtk_widget_class_bind_template_child_private (widget_class, CookiesDialog, cookies_treeview);
+ gtk_widget_class_bind_template_child_private (widget_class, CookiesDialog, tree_selection);
gtk_widget_class_bind_template_child_private (widget_class, CookiesDialog, remove_toolbutton);
gtk_widget_class_bind_template_callback (widget_class, on_cookies_treeview_key_press_event);
diff --git a/src/resources/cookies-dialog.ui b/src/resources/cookies-dialog.ui
index d97ee94..6519d35 100644
--- a/src/resources/cookies-dialog.ui
+++ b/src/resources/cookies-dialog.ui
@@ -87,7 +87,7 @@
<property name="search_column">0</property>
<signal name="key-press-event" handler="on_cookies_treeview_key_press_event"/>
<child internal-child="selection">
- <object class="GtkTreeSelection" id="tree_selection"> <!-- TODO use this -->
+ <object class="GtkTreeSelection" id="tree_selection">
<property name="mode">multiple</property>
<signal name="changed" handler="on_treeview_selection_changed"/>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]