[gnome-photos] main-toolbar: Set the header bar to STANDALONE for collections
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] main-toolbar: Set the header bar to STANDALONE for collections
- Date: Mon, 8 Apr 2013 13:26:11 +0000 (UTC)
commit 41e5e1ec14006bf503e459fa5b3f1a65fa1cfef1
Author: Debarshi Ray <debarshir gnome org>
Date: Mon Apr 8 14:49:03 2013 +0200
main-toolbar: Set the header bar to STANDALONE for collections
src/photos-main-toolbar.c | 30 ++++++++++++++++++++----------
1 files changed, 20 insertions(+), 10 deletions(-)
---
diff --git a/src/photos-main-toolbar.c b/src/photos-main-toolbar.c
index 65675b2..3a89fa4 100644
--- a/src/photos-main-toolbar.c
+++ b/src/photos-main-toolbar.c
@@ -165,24 +165,34 @@ photos_main_toolbar_active_changed (PhotosBaseManager *manager, GObject *object,
PhotosMainToolbar *self = PHOTOS_MAIN_TOOLBAR (user_data);
PhotosMainToolbarPrivate *priv = self->priv;
GObject *item;
+ PhotosHeaderBarMode mode;
item = photos_base_manager_get_active_object (priv->col_mngr);
- if (item != NULL && priv->coll_back_button == NULL)
+ if (item != NULL)
{
- priv->coll_back_button = photos_main_toolbar_add_back_button (self);
- gtk_widget_show (priv->coll_back_button);
+ mode = PHOTOS_HEADER_BAR_MODE_STANDALONE;
+ if (priv->coll_back_button == NULL)
+ {
+ priv->coll_back_button = photos_main_toolbar_add_back_button (self);
+ gtk_widget_show (priv->coll_back_button);
- g_signal_connect (priv->coll_back_button,
- "clicked",
- G_CALLBACK (photos_main_toolbar_coll_back_button_clicked),
- self);
+ g_signal_connect (priv->coll_back_button,
+ "clicked",
+ G_CALLBACK (photos_main_toolbar_coll_back_button_clicked),
+ self);
+ }
}
- else if (item == NULL && priv->coll_back_button != NULL)
+ else
{
- gtk_widget_destroy (priv->coll_back_button);
- priv->coll_back_button = NULL;
+ mode = PHOTOS_HEADER_BAR_MODE_NORMAL;
+ if (priv->coll_back_button != NULL)
+ {
+ gtk_widget_destroy (priv->coll_back_button);
+ priv->coll_back_button = NULL;
+ }
}
+ photos_header_bar_set_mode (PHOTOS_HEADER_BAR (priv->toolbar), mode);
photos_main_toolbar_set_toolbar_title (self);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]