[gnome-photos] embed: Hide any empty search bars that might have been floating around
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] embed: Hide any empty search bars that might have been floating around
- Date: Tue, 13 Oct 2015 13:57:38 +0000 (UTC)
commit 52b4915dcecbc3458d73c5acae795514bd3e4a15
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Oct 13 15:46:07 2015 +0200
embed: Hide any empty search bars that might have been floating around
If we were moving to the preview from any other mode than search, then
there might have been an empty search bar. There is nothing to save
in this case, because if there was then we would have been in the
search mode, but we should still hide the search bar.
Fall out from ee3a5edb69987ce6a28d6bb29a6f7f98aafa91c1
https://bugzilla.gnome.org/show_bug.cgi?id=737071
src/photos-embed.c | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/src/photos-embed.c b/src/photos-embed.c
index 59d8413..b4250fc 100644
--- a/src/photos-embed.c
+++ b/src/photos-embed.c
@@ -288,8 +288,21 @@ photos_embed_prepare_for_preview (PhotosEmbed *self, PhotosWindowMode old_mode)
photos_embed_tracker_controllers_set_frozen (self, TRUE);
active_collection = photos_item_manager_get_active_collection (PHOTOS_ITEM_MANAGER (priv->item_mngr));
- if (old_mode == PHOTOS_WINDOW_MODE_SEARCH && active_collection == NULL)
- photos_embed_save_search (self);
+ if (old_mode == PHOTOS_WINDOW_MODE_SEARCH)
+ {
+ if (active_collection == NULL)
+ photos_embed_save_search (self);
+ }
+ else
+ {
+ GVariant *state;
+
+ /* Hide any empty search bars that might have been floating
+ * around.
+ */
+ state = g_variant_new ("b", FALSE);
+ g_action_change_state (priv->search_action, state);
+ }
/* This is not needed when activated from the search provider. */
if (old_mode != PHOTOS_WINDOW_MODE_NONE)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]