[nautilus] slot: add a revealer for the searchbar
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] slot: add a revealer for the searchbar
- Date: Sun, 25 Aug 2013 02:10:05 +0000 (UTC)
commit 2e838500607ab949900a0f61cc32b6565cdd7fc6
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Sat Aug 24 19:05:31 2013 -0700
slot: add a revealer for the searchbar
https://bugzilla.gnome.org/show_bug.cgi?id=706674
src/nautilus-window-slot.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index cdfd48a..545eee4 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -97,6 +97,7 @@ struct NautilusWindowSlotDetails {
/* Query editor */
NautilusQueryEditor *query_editor;
+ GtkWidget *query_editor_revealer;
gulong qe_changed_id;
gulong qe_cancel_id;
gulong qe_activated_id;
@@ -299,7 +300,8 @@ query_editor_changed_callback (NautilusQueryEditor *editor,
static void
hide_query_editor (NautilusWindowSlot *slot)
{
- gtk_widget_hide (GTK_WIDGET (slot->details->query_editor));
+ gtk_revealer_set_reveal_child (GTK_REVEALER (slot->details->query_editor_revealer),
+ FALSE);
if (slot->details->qe_changed_id > 0) {
g_signal_handler_disconnect (slot->details->query_editor, slot->details->qe_changed_id);
@@ -347,7 +349,8 @@ show_query_editor (NautilusWindowSlot *slot)
nautilus_directory_unref (directory);
- gtk_widget_show (GTK_WIDGET (slot->details->query_editor));
+ gtk_revealer_set_reveal_child (GTK_REVEALER (slot->details->query_editor_revealer),
+ TRUE);
gtk_widget_grab_focus (GTK_WIDGET (slot->details->query_editor));
if (slot->details->qe_changed_id == 0) {
@@ -505,7 +508,7 @@ remove_all_extra_location_widgets (GtkWidget *widget,
NautilusDirectory *directory;
directory = nautilus_directory_get (slot->details->location);
- if (widget != GTK_WIDGET (slot->details->query_editor)) {
+ if (widget != GTK_WIDGET (slot->details->query_editor_revealer)) {
gtk_container_remove (GTK_CONTAINER (slot->details->extra_location_widgets), widget);
}
@@ -583,9 +586,11 @@ nautilus_window_slot_constructed (GObject *object)
gtk_widget_show (extras_vbox);
slot->details->query_editor = NAUTILUS_QUERY_EDITOR (nautilus_query_editor_new ());
- nautilus_window_slot_add_extra_location_widget (slot, GTK_WIDGET (slot->details->query_editor));
- g_object_add_weak_pointer (G_OBJECT (slot->details->query_editor),
- (gpointer *) &slot->details->query_editor);
+ slot->details->query_editor_revealer = gtk_revealer_new ();
+ gtk_container_add (GTK_CONTAINER (slot->details->query_editor_revealer),
+ GTK_WIDGET (slot->details->query_editor));
+ gtk_widget_show_all (slot->details->query_editor_revealer);
+ nautilus_window_slot_add_extra_location_widget (slot, slot->details->query_editor_revealer);
slot->details->view_overlay = gtk_overlay_new ();
gtk_widget_add_events (slot->details->view_overlay,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]