[gnome-todo] sidebar: Adapt to new GtkWidget.activate_action() API
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo] sidebar: Adapt to new GtkWidget.activate_action() API
- Date: Tue, 25 Jun 2019 23:19:29 +0000 (UTC)
commit 50d9fa0042e240e317fdeef2605d675e9de56b31
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue Jun 25 20:18:12 2019 -0300
sidebar: Adapt to new GtkWidget.activate_action() API
It receives the values directly, instead of a GVariant.
src/sidebar/gtd-sidebar.c | 21 ++++++++-------------
1 file changed, 8 insertions(+), 13 deletions(-)
---
diff --git a/src/sidebar/gtd-sidebar.c b/src/sidebar/gtd-sidebar.c
index 4d65af4..48a725a 100644
--- a/src/sidebar/gtd-sidebar.c
+++ b/src/sidebar/gtd-sidebar.c
@@ -246,9 +246,7 @@ activate_appropriate_row (GtdSidebar *self,
if (activate_row_below (self, GTD_SIDEBAR_LIST_ROW (row)))
return;
- gtk_widget_activate_action (GTK_WIDGET (self),
- "win.toggle-archive",
- g_variant_new_boolean (FALSE));
+ gtk_widget_activate_action (GTK_WIDGET (self), "win.toggle-archive", "b", FALSE);
to_be_activated = gtk_list_box_get_row_at_index (self->listbox, 0);
g_signal_emit_by_name (to_be_activated, "activate");
@@ -350,9 +348,9 @@ on_listbox_row_activated_cb (GtkListBox *panels_listbox,
gtk_widget_activate_action (GTK_WIDGET (self),
"win.activate-panel",
- g_variant_new ("(sv)",
- gtd_panel_get_panel_name (panel),
- g_variant_new_maybe (G_VARIANT_TYPE_VARIANT, NULL)));
+ "(sv)",
+ gtd_panel_get_panel_name (panel),
+ g_variant_new_maybe (G_VARIANT_TYPE_VARIANT, NULL));
}
else if (GTD_IS_SIDEBAR_PROVIDER_ROW (row))
{
@@ -360,7 +358,6 @@ on_listbox_row_activated_cb (GtkListBox *panels_listbox,
}
else if (GTD_IS_SIDEBAR_LIST_ROW (row))
{
- g_autoptr (GVariant) panel_params = NULL;
GVariantBuilder builder;
GtdProvider *provider;
GtdTaskList *list;
@@ -376,17 +373,15 @@ on_listbox_row_activated_cb (GtkListBox *panels_listbox,
"task-list-id",
g_variant_new_string (gtd_object_get_uid (GTD_OBJECT (list))));
- panel_params = g_variant_new ("(sv)",
- "task-list-panel",
- g_variant_builder_end (&builder));
-
gtk_widget_activate_action (GTK_WIDGET (self),
"win.activate-panel",
- g_steal_pointer (&panel_params));
+ "(sv)",
+ "task-list-panel",
+ g_variant_builder_end (&builder));
}
else if (row == self->archive_row)
{
- gtk_widget_activate_action (GTK_WIDGET (self), "win.toggle-archive", g_variant_new_boolean (TRUE));
+ gtk_widget_activate_action (GTK_WIDGET (self), "win.toggle-archive", "b", TRUE);
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]