[epiphany/wip/exalm/gtk4: 12/14] header-bar: Don't manually activate action for restore button
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/exalm/gtk4: 12/14] header-bar: Don't manually activate action for restore button
- Date: Mon, 21 Feb 2022 12:16:39 +0000 (UTC)
commit 43b478cf40628d7dbc8c8e92dc6744f59a65c847
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Mon Feb 21 14:12:08 2022 +0500
header-bar: Don't manually activate action for restore button
src/ephy-header-bar.c | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
---
diff --git a/src/ephy-header-bar.c b/src/ephy-header-bar.c
index 285288189..0850f2411 100644
--- a/src/ephy-header-bar.c
+++ b/src/ephy-header-bar.c
@@ -164,19 +164,6 @@ add_bookmark_button_clicked_cb (EphyLocationEntry *entry,
g_action_activate (action, NULL);
}
-static void
-restore_button_clicked_cb (GtkButton *button,
- EphyHeaderBar *header_bar)
-{
- GActionGroup *action_group;
- GAction *action;
-
- action_group = gtk_widget_get_action_group (GTK_WIDGET (header_bar->window), "win");
- action = g_action_map_lookup_action (G_ACTION_MAP (action_group), "fullscreen");
-
- g_action_activate (action, NULL);
-}
-
static void
update_revealer_visibility (GtkRevealer *revealer)
{
@@ -278,9 +265,8 @@ ephy_header_bar_constructed (GObject *object)
/* Fullscreen restore button */
header_bar->restore_button = gtk_button_new_from_icon_name ("view-restore-symbolic",
GTK_ICON_SIZE_BUTTON);
- g_signal_connect_object (header_bar->restore_button, "clicked",
- G_CALLBACK (restore_button_clicked_cb),
- header_bar, 0);
+ gtk_actionable_set_action_name (GTK_ACTIONABLE (header_bar->restore_button),
+ "win.fullscreen");
gtk_header_bar_pack_end (GTK_HEADER_BAR (header_bar->header_bar),
GTK_WIDGET (header_bar->restore_button));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]