diff options
author | Dave Camp <dave@ximian.com> | 2004-04-01 21:05:51 +0000 |
---|---|---|
committer | Dave Camp <campd@src.gnome.org> | 2004-04-01 21:05:51 +0000 |
commit | 29051eba2e2d5a7747447d5757c0cb0e68594fc4 (patch) | |
tree | 07d4c5bea0ae4aadb89c70a2fb0fba1596fca606 /src | |
parent | d563a42a208bc60ab56705287718a040019f7579 (diff) | |
download | nautilus-29051eba2e2d5a7747447d5757c0cb0e68594fc4.tar.gz |
Add an down arrow to the location button in an attempt to make it look
2004-04-01 Dave Camp <dave@ximian.com>
* src/nautilus-spatial-window.c:
(nautilus_spatial_window_set_location_button),
(nautilus_spatial_window_instance_init): Add an down arrow to the
location button in an attempt to make it look more like a
pulldown menu.
Diffstat (limited to 'src')
-rw-r--r-- | src/nautilus-spatial-window.c | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/src/nautilus-spatial-window.c b/src/nautilus-spatial-window.c index 5da57ee25..a6f76f6ce 100644 --- a/src/nautilus-spatial-window.c +++ b/src/nautilus-spatial-window.c @@ -90,6 +90,7 @@ struct _NautilusSpatialWindowDetails { GtkWidget *content_box; GtkWidget *location_button; + GtkWidget *location_label; GtkWidget *location_statusbar; GnomeVFSURI *location; @@ -505,13 +506,13 @@ nautilus_spatial_window_set_location_button (NautilusSpatialWindow *window, } if (uri != NULL) { name = nautilus_get_uri_shortname_for_display (uri); - gtk_button_set_label (GTK_BUTTON (window->details->location_button), - name); + gtk_label_set_label (GTK_LABEL (window->details->location_label), + name); g_free (name); gtk_widget_set_sensitive (window->details->location_button, TRUE); } else { - gtk_button_set_label (GTK_BUTTON (window->details->location_button), - ""); + gtk_label_set_label (GTK_LABEL (window->details->location_label), + ""); gtk_widget_set_sensitive (window->details->location_button, FALSE); } @@ -527,6 +528,8 @@ nautilus_spatial_window_instance_init (NautilusSpatialWindow *window) GtkShadowType shadow_type; GtkWidget *frame; GtkRcStyle *rc_style; + GtkWidget *arrow; + GtkWidget *hbox; window->details = g_new0 (NautilusSpatialWindowDetails, 1); window->affect_spatial_window_on_next_location_change = TRUE; @@ -543,7 +546,7 @@ nautilus_spatial_window_instance_init (NautilusSpatialWindow *window) gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (window->details->location_statusbar), FALSE); - window->details->location_button = gtk_button_new_with_label (""); + window->details->location_button = gtk_button_new (); gtk_button_set_relief (GTK_BUTTON (window->details->location_button), GTK_RELIEF_NONE); rc_style = gtk_widget_get_modifier_style (window->details->location_button); @@ -554,6 +557,20 @@ nautilus_spatial_window_instance_init (NautilusSpatialWindow *window) gtk_widget_show (window->details->location_button); + hbox = gtk_hbox_new (FALSE, 3); + gtk_container_add (GTK_CONTAINER (window->details->location_button), + hbox); + gtk_widget_show (hbox); + + window->details->location_label = gtk_label_new (""); + gtk_box_pack_start (GTK_BOX (hbox), window->details->location_label, + FALSE, FALSE, 0); + gtk_widget_show (window->details->location_label); + + arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_NONE); + gtk_box_pack_start (GTK_BOX (hbox), arrow, FALSE, FALSE, 0); + gtk_widget_show (arrow); + frame = gtk_frame_new (NULL); gtk_widget_style_get (GTK_WIDGET (window->details->location_statusbar), "shadow_type", &shadow_type, NULL); |