[gnome-photos] main-toolbar: Update the title as we navigate in the preview
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] main-toolbar: Update the title as we navigate in the preview
- Date: Fri, 2 Aug 2013 16:25:20 +0000 (UTC)
commit 8fb0c104dde9273b354a08037e08b9ed584a3872
Author: Debarshi Ray <debarshir gnome org>
Date: Fri Aug 2 18:15:54 2013 +0200
main-toolbar: Update the title as we navigate in the preview
Fixes: https://bugzilla.gnome.org/696794
src/photos-main-toolbar.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-main-toolbar.c b/src/photos-main-toolbar.c
index 169eae1..35e24ea 100644
--- a/src/photos-main-toolbar.c
+++ b/src/photos-main-toolbar.c
@@ -198,6 +198,19 @@ photos_main_toolbar_col_active_changed (PhotosBaseManager *manager, GObject *obj
static void
+photos_main_toolbar_item_active_changed (PhotosBaseManager *manager, GObject *object, gpointer user_data)
+{
+ PhotosMainToolbar *self = PHOTOS_MAIN_TOOLBAR (user_data);
+ PhotosMainToolbarPrivate *priv = self->priv;
+ PhotosWindowMode window_mode;
+
+ window_mode = photos_mode_controller_get_window_mode (priv->mode_cntrlr);
+ if (window_mode == PHOTOS_WINDOW_MODE_PREVIEW)
+ photos_main_toolbar_set_toolbar_title (self);
+}
+
+
+static void
photos_main_toolbar_select_button_clicked (GtkButton *button, gpointer user_data)
{
PhotosMainToolbar *self = PHOTOS_MAIN_TOOLBAR (user_data);
@@ -298,6 +311,9 @@ photos_main_toolbar_clear_state_data (PhotosMainToolbar *self)
if (priv->col_mngr != NULL)
g_signal_handlers_disconnect_by_func (priv->col_mngr, photos_main_toolbar_col_active_changed, self);
+ if (priv->item_mngr != NULL)
+ g_signal_handlers_disconnect_by_func (priv->item_mngr, photos_main_toolbar_item_active_changed, self);
+
if (priv->sel_cntrlr != NULL)
g_signal_handlers_disconnect_by_func (priv->sel_cntrlr, photos_main_toolbar_set_toolbar_title, self);
}
@@ -449,6 +465,8 @@ photos_main_toolbar_populate_for_preview (PhotosMainToolbar *self)
remote_display_action = g_action_map_lookup_action (G_ACTION_MAP (app), "remote-display-current");
remote_display_available = photos_dlna_renderers_manager_is_available ();
g_simple_action_set_enabled (G_SIMPLE_ACTION (remote_display_action), remote_display_available);
+
+ g_signal_connect (priv->item_mngr, "active-changed", G_CALLBACK (photos_main_toolbar_item_active_changed),
self);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]