1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-23 03:05:48 +03:00
aports/community/evince/toolbar-Allow-to-toggle-the-sidebar-button.patch

45 lines
1.4 KiB
Diff

From: Adrien Plazas <kekun.plazas@laposte.net>
Date: Wed, 11 Dec 2019 16:24:31 +0100
Subject: toolbar: Allow to toggle the sidebar button
This will allow updating the button's state when gestures will allow
closing the sidebar in the next commit.
---
shell/ev-toolbar.c | 14 ++++++++++++++
shell/ev-toolbar.h | 3 +++
2 files changed, 17 insertions(+)
diff --git a/shell/ev-toolbar.c b/shell/ev-toolbar.c
index 75306a7..633102d 100644
--- a/shell/ev-toolbar.c
+++ b/shell/ev-toolbar.c
@@ -370,3 +370,17 @@ ev_toolbar_get_mode (EvToolbar *ev_toolbar)
return priv->toolbar_mode;
}
+
+void
+ev_toolbar_set_sidebar_visible (EvToolbar *ev_toolbar,
+ gboolean visible)
+{
+ EvToolbarPrivate *priv;
+
+ g_return_if_fail (EV_IS_TOOLBAR (ev_toolbar));
+
+ priv = GET_PRIVATE (ev_toolbar);
+ visible = !!visible;
+
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->sidebar_button), visible);
+}
diff --git a/shell/ev-toolbar.h b/shell/ev-toolbar.h
index 9ad76fc..e1be165 100644
--- a/shell/ev-toolbar.h
+++ b/shell/ev-toolbar.h
@@ -57,4 +57,7 @@ void ev_toolbar_set_mode (EvToolbar *ev_toolbar,
EvToolbarMode mode);
EvToolbarMode ev_toolbar_get_mode (EvToolbar *ev_toolbar);
+void ev_toolbar_set_sidebar_visible (EvToolbar *ev_toolbar,
+ gboolean visible);
+
G_END_DECLS