[eog] EogWindow: Disable zoom button if no image is loaded
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] EogWindow: Disable zoom button if no image is loaded
- Date: Wed, 28 Jan 2015 20:04:57 +0000 (UTC)
commit 366b3b1a62a1022116430b6ac17ecf2e3c77048e
Author: Felix Riemann <friemann gnome org>
Date: Wed Jan 28 20:49:03 2015 +0100
EogWindow: Disable zoom button if no image is loaded
src/eog-window.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/eog-window.c b/src/eog-window.c
index 7e1ed47..13eddbc 100644
--- a/src/eog-window.c
+++ b/src/eog-window.c
@@ -4315,6 +4315,11 @@ eog_window_construct_ui (EogWindow *window)
G_CALLBACK (eog_window_zoom_button_toggled_cb),
window);
gtk_header_bar_pack_start (GTK_HEADER_BAR (headerbar), zoom_button);
+ /* disable zoom button if no image is loaded */
+ g_object_bind_property (g_action_map_lookup_action (G_ACTION_MAP(window),
+ "zoom-normal"),
+ "enabled", zoom_button, "sensitive",
+ G_BINDING_DEFAULT);
gtk_widget_show (zoom_button);
priv->zoom_revealer = gtk_revealer_new ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]