[nautilus] Make search button a toggle again
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] Make search button a toggle again
- Date: Fri, 13 Jul 2012 19:53:28 +0000 (UTC)
commit c9b280c37c602aeda7be7b14b31e8a868b39aaea
Author: William Jon McCann <jmccann redhat com>
Date: Thu Jul 12 14:28:21 2012 -0400
Make search button a toggle again
src/nautilus-toolbar.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/nautilus-toolbar.c b/src/nautilus-toolbar.c
index 6064735..f174888 100644
--- a/src/nautilus-toolbar.c
+++ b/src/nautilus-toolbar.c
@@ -104,6 +104,7 @@ get_icon_margin (NautilusToolbar *self)
static GtkWidget *
toolbar_create_toolbutton (NautilusToolbar *self,
gboolean create_menu,
+ gboolean create_toggle,
const gchar *name)
{
GtkWidget *button, *image;
@@ -111,6 +112,8 @@ toolbar_create_toolbutton (NautilusToolbar *self,
if (create_menu) {
button = gtk_menu_button_new ();
+ } else if (create_toggle) {
+ button = gtk_toggle_button_new ();
} else {
button = gtk_button_new ();
}
@@ -165,11 +168,11 @@ nautilus_toolbar_constructed (GObject *obj)
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
/* Back */
- tool_button = toolbar_create_toolbutton (self, FALSE, NAUTILUS_ACTION_BACK);
+ tool_button = toolbar_create_toolbutton (self, FALSE, FALSE, NAUTILUS_ACTION_BACK);
gtk_container_add (GTK_CONTAINER (box), GTK_WIDGET (tool_button));
/* Forward */
- tool_button = toolbar_create_toolbutton (self, FALSE, NAUTILUS_ACTION_FORWARD);
+ tool_button = toolbar_create_toolbutton (self, FALSE, FALSE, NAUTILUS_ACTION_FORWARD);
gtk_container_add (GTK_CONTAINER (box), GTK_WIDGET (tool_button));
gtk_style_context_add_class (gtk_widget_get_style_context (box),
@@ -202,7 +205,7 @@ nautilus_toolbar_constructed (GObject *obj)
/* search */
tool_item = gtk_tool_item_new ();
- tool_button = toolbar_create_toolbutton (self, FALSE, NAUTILUS_ACTION_SEARCH);
+ tool_button = toolbar_create_toolbutton (self, FALSE, TRUE, NAUTILUS_ACTION_SEARCH);
gtk_container_add (GTK_CONTAINER (tool_item), GTK_WIDGET (tool_button));
gtk_container_add (GTK_CONTAINER (self->priv->toolbar), GTK_WIDGET (tool_item));
gtk_widget_show_all (GTK_WIDGET (tool_item));
@@ -210,7 +213,7 @@ nautilus_toolbar_constructed (GObject *obj)
/* Page Menu */
tool_item = gtk_tool_item_new ();
- tool_button = toolbar_create_toolbutton (self, TRUE, "emblem-system-symbolic");
+ tool_button = toolbar_create_toolbutton (self, TRUE, FALSE, "emblem-system-symbolic");
menu = gtk_ui_manager_get_widget (self->priv->ui_manager, "/ViewMenu");
gtk_menu_button_set_menu (GTK_MENU_BUTTON (tool_button), menu);
gtk_container_add (GTK_CONTAINER (tool_item), tool_button);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]