summaryrefslogtreecommitdiff
path: root/src/eom-window.c
diff options
context:
space:
mode:
authorFelix Riemann <[email protected]>2011-12-19 18:20:30 +0100
committerraveit65 <[email protected]>2018-07-08 12:29:16 +0200
commitb1c0911213e74d91059aaa8442898e52e13368af (patch)
tree535bd586017c56856020abe18397fb579e3775b0 /src/eom-window.c
parent28fbd143cb1752c3b8fd68b7206e1df679830a8b (diff)
downloadeom-b1c0911213e74d91059aaa8442898e52e13368af.tar.bz2
eom-b1c0911213e74d91059aaa8442898e52e13368af.tar.xz
Make Exif/XMP summaries available as sidebar
Makes the data from the properties dialog available as a sidebar. A button opens the details tab in the properties dialog. This is graphically still a bit roughg. Committing it in hopes to get some early feedback. https://bugzilla.gnome.org/show_bug.cgi?id=616438 origin commit: https://git.gnome.org/browse/eog/commit/?id=7ac112f
Diffstat (limited to 'src/eom-window.c')
-rw-r--r--src/eom-window.c47
1 files changed, 33 insertions, 14 deletions
diff --git a/src/eom-window.c b/src/eom-window.c
index a7c3575..a56dfbf 100644
--- a/src/eom-window.c
+++ b/src/eom-window.c
@@ -52,6 +52,7 @@
#include "eom-save-as-dialog-helper.h"
#include "eom-close-confirmation-dialog.h"
#include "eom-clipboard-handler.h"
+#include "eom-metadata-sidebar.h"
#include "eom-enum-types.h"
@@ -3010,26 +3011,26 @@ eom_window_cmd_print (GtkAction *action, gpointer user_data)
eom_window_print (window);
}
-static void
-eom_window_cmd_properties (GtkAction *action, gpointer user_data)
+EomDialog*
+eom_window_get_properties_dialog (EomWindow *window)
{
- EomWindow *window = EOM_WINDOW (user_data);
EomWindowPrivate *priv;
- GtkAction *next_image_action, *previous_image_action;
- priv = window->priv;
+ g_return_val_if_fail (EOM_IS_WINDOW (window), NULL);
- next_image_action =
- gtk_action_group_get_action (priv->actions_collection,
- "GoNext");
+ priv = window->priv;
- previous_image_action =
- gtk_action_group_get_action (priv->actions_collection,
- "GoPrevious");
+ if (priv->properties_dlg == NULL) {
+ GtkAction *next_image_action, *previous_image_action;
- if (window->priv->properties_dlg == NULL) {
+ next_image_action =
+ gtk_action_group_get_action (priv->actions_collection,
+ "GoNext");
- window->priv->properties_dlg =
+ previous_image_action =
+ gtk_action_group_get_action (priv->actions_collection,
+ "GoPrevious");
+ priv->properties_dlg =
eom_properties_dialog_new (GTK_WINDOW (window),
EOM_THUMB_VIEW (priv->thumbview),
next_image_action,
@@ -3043,7 +3044,20 @@ eom_window_cmd_properties (GtkAction *action, gpointer user_data)
G_SETTINGS_BIND_GET);
}
- eom_dialog_show (EOM_DIALOG (window->priv->properties_dlg));
+ return EOM_DIALOG (priv->properties_dlg);
+}
+
+static void
+eom_window_cmd_properties (GtkAction *action, gpointer user_data)
+{
+ EomWindow *window = EOM_WINDOW (user_data);
+ EomWindowPrivate *priv;
+ EomDialog *dialog;
+
+ priv = window->priv;
+
+ dialog = eom_window_get_properties_dialog (window);
+ eom_dialog_show (dialog);
}
static void
@@ -4459,6 +4473,11 @@ eom_window_construct_ui (EomWindow *window)
window);
priv->view = eom_scroll_view_new ();
+
+ eom_sidebar_add_page (EOM_SIDEBAR (priv->sidebar),
+ _("Image Properties"),
+ GTK_WIDGET (eom_metadata_sidebar_new (window)));
+
gtk_widget_set_size_request (GTK_WIDGET (priv->view), 100, 100);
g_signal_connect (G_OBJECT (priv->view),
"zoom_changed",