From 7c97b308cf69ff467b5bd675698bfc19f59c4e83 Mon Sep 17 00:00:00 2001 From: Andy Hertzfeld Date: Tue, 1 Feb 2000 11:27:43 +0000 Subject: [PATCH] added zoom control to location bar, not yet wired up to the content view added zoom control to location bar, not yet wired up to the content view --- ChangeLog-20000414 | 16 +++ icons/Makefile.am | 3 +- icons/zoom.png | Bin 0 -> 1118 bytes src/Makefile.am | 2 + src/nautilus-navigation-window.c | 13 ++- src/nautilus-object-window.c | 13 ++- src/nautilus-spatial-window.c | 13 ++- src/nautilus-window.c | 13 ++- src/nautilus-zoom-control.c | 174 +++++++++++++++++++++++++++++++ src/nautilus-zoom-control.h | 73 +++++++++++++ src/ntl-window.c | 13 ++- 11 files changed, 317 insertions(+), 16 deletions(-) create mode 100644 icons/zoom.png create mode 100644 src/nautilus-zoom-control.c create mode 100644 src/nautilus-zoom-control.h diff --git a/ChangeLog-20000414 b/ChangeLog-20000414 index 4f5081d7d..bc0be660f 100644 --- a/ChangeLog-20000414 +++ b/ChangeLog-20000414 @@ -1,3 +1,19 @@ +2000-02-02 Andy Hertzfeld + + added a zoom control to location bar, not yet wired up to the content view + + * icons/Makefile.am: + * icons/zoom.png: + added zoom image for use in zoom control + + * src/nautilus-zoom-control.h: + * src/nautilus-zoom-control.c: + * src/Makefile.am + new zoom control widget + + * src/ntl-window.c: + added zoom control to location bar + 2000-02-01 Darin Adler * libnautilus/nautilus-icon-factory.h: diff --git a/icons/Makefile.am b/icons/Makefile.am index 5506df013..8da3b3ea3 100644 --- a/icons/Makefile.am +++ b/icons/Makefile.am @@ -21,6 +21,7 @@ icon_DATA = \ i-zipdisk2.png \ multi-ok.png \ not.png \ - nautilus3.jpg + nautilus3.jpg \ + zoom.png EXTRA_DIST = $(icon_DATA) diff --git a/icons/zoom.png b/icons/zoom.png new file mode 100644 index 0000000000000000000000000000000000000000..0a10d4b5a5ceec83834c750401f58e44571a1079 GIT binary patch literal 1118 zcmV-k1flzhP)|Gdh0C&sWbq|f zTpHZd%$|~zE~d~jZ6A_6)#hO&;2I(sY>+UPBHV>pLq{E${bARJkVxDG#j-?MK=h$! z58{pS-|tqvvcW!Z9`tP{(m*0KokvC*JLUqk9P>z2 zc>-LdcX-IV5~G-yqDsW0BU+5b$T2ZTfQvY8o~9Sqi1qGH8B@@%O)sv=Ntp0|PfGY9 zwoiJ8hd6GY+_M291?#kHOhG$Vt_0nHyQTtIr1I3&WT@67j*CTn^r4>wK}1aS!eY{~ z9;u7r+6;`DKKOh?uv!f*^^EoP^;1Dgk_5Nged=AWKqc-iKO#X8G2tI>ISByp?aVj? zL4?P%#*#K=aBvW2vl)knhjsm`B;vSOM09lzdWQ~k?g5s(DHf9sZm$IZ@Y~M5I^_$M z60x6)$GZ~YDcxOVkoUH{8s zG3lTi=q(+@0Rg)f>UsprH)`kA4?`v9n;v@m|O)53kx-REzk3sX8XMrZr$Y} z2qK;&5-?dTEV&{Q!8DAVvP4wJ6bglEnr9>uId!1YHtPKCaKWGl$CR@RP{ui$!z zhf;ZZY204FJewc|>ov1{K3`*%e&!3>HTP^lPKMH}cq)IA1i(e%aF|l56p@1US~XRA zL?!;oQO!I2IT$m2xM-fixbFet*=${HE|-HZxDAVa96LW2z;R}T!yn_ym4|RTgSdX< z4n0dgXC9whLA7~AHIIM(gT9y!0RRL+gx;aUrSq@jyxxTDb_$#M1QNkCfYRL3I%0&+ zHK<9a)8uppv~1B%CqEi kx->L`?6zM1ualMW4>nNr4<0#}RsaA107*qoM6N<$g3x6aXaE2J literal 0 HcmV?d00001 diff --git a/src/Makefile.am b/src/Makefile.am index 1646f4078..70e96e985 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -32,6 +32,8 @@ nautilus_SOURCES= \ nautilus-bookmarks-window.h \ nautilus-self-check-functions.c \ nautilus-self-check-functions.h \ + nautilus-zoom-control.c \ + nautilus-zoom-control.h \ ntl-app.c \ ntl-app.h \ ntl-content-view.c \ diff --git a/src/nautilus-navigation-window.c b/src/nautilus-navigation-window.c index 820db5ef3..1705cbeaf 100644 --- a/src/nautilus-navigation-window.c +++ b/src/nautilus-navigation-window.c @@ -36,6 +36,7 @@ #include "ntl-miniicon.h" #include #include +#include "nautilus-zoom-control.h" static void nautilus_window_realize (GtkWidget *widget); static void nautilus_window_real_set_content_view (NautilusWindow *window, NautilusView *new_view); @@ -415,7 +416,7 @@ nautilus_window_constructed(NautilusWindow *window) { GnomeApp *app; GtkWidget *location_bar_box, *statusbar; - GtkWidget *temp_frame; + GtkWidget *temp_frame, *zoom_control; app = GNOME_APP(window); @@ -435,16 +436,22 @@ nautilus_window_constructed(NautilusWindow *window) window->ent_uri = explorer_location_bar_new(); gtk_signal_connect(GTK_OBJECT(window->ent_uri), "location_changed", nautilus_window_goto_uri_cb, window); - gtk_box_pack_start(GTK_BOX(location_bar_box), window->ent_uri, TRUE, TRUE, GNOME_PAD); + gtk_box_pack_start(GTK_BOX(location_bar_box), window->ent_uri, TRUE, TRUE, GNOME_PAD_SMALL); gnome_app_add_docked(app, location_bar_box, "uri-entry", GNOME_DOCK_ITEM_BEH_EXCLUSIVE|GNOME_DOCK_ITEM_BEH_NEVER_VERTICAL, GNOME_DOCK_TOP, 2, 0, 0); /* Option menu for content view types; it's empty here, filled in when a uri is set. */ window->option_cvtype = gtk_option_menu_new(); - gtk_box_pack_end(GTK_BOX(location_bar_box), window->option_cvtype, FALSE, FALSE, GNOME_PAD_BIG); + gtk_box_pack_end(GTK_BOX(location_bar_box), window->option_cvtype, FALSE, FALSE, GNOME_PAD_SMALL); gtk_widget_show(window->option_cvtype); + /* allocate the zoom control and place on the right next to the menu */ + + zoom_control = nautilus_zoom_control_new(); + gtk_widget_show(zoom_control); + gtk_box_pack_end(GTK_BOX(location_bar_box), zoom_control, FALSE, FALSE, 0); + gtk_widget_show_all(location_bar_box); /* set up status bar */ diff --git a/src/nautilus-object-window.c b/src/nautilus-object-window.c index 820db5ef3..1705cbeaf 100644 --- a/src/nautilus-object-window.c +++ b/src/nautilus-object-window.c @@ -36,6 +36,7 @@ #include "ntl-miniicon.h" #include #include +#include "nautilus-zoom-control.h" static void nautilus_window_realize (GtkWidget *widget); static void nautilus_window_real_set_content_view (NautilusWindow *window, NautilusView *new_view); @@ -415,7 +416,7 @@ nautilus_window_constructed(NautilusWindow *window) { GnomeApp *app; GtkWidget *location_bar_box, *statusbar; - GtkWidget *temp_frame; + GtkWidget *temp_frame, *zoom_control; app = GNOME_APP(window); @@ -435,16 +436,22 @@ nautilus_window_constructed(NautilusWindow *window) window->ent_uri = explorer_location_bar_new(); gtk_signal_connect(GTK_OBJECT(window->ent_uri), "location_changed", nautilus_window_goto_uri_cb, window); - gtk_box_pack_start(GTK_BOX(location_bar_box), window->ent_uri, TRUE, TRUE, GNOME_PAD); + gtk_box_pack_start(GTK_BOX(location_bar_box), window->ent_uri, TRUE, TRUE, GNOME_PAD_SMALL); gnome_app_add_docked(app, location_bar_box, "uri-entry", GNOME_DOCK_ITEM_BEH_EXCLUSIVE|GNOME_DOCK_ITEM_BEH_NEVER_VERTICAL, GNOME_DOCK_TOP, 2, 0, 0); /* Option menu for content view types; it's empty here, filled in when a uri is set. */ window->option_cvtype = gtk_option_menu_new(); - gtk_box_pack_end(GTK_BOX(location_bar_box), window->option_cvtype, FALSE, FALSE, GNOME_PAD_BIG); + gtk_box_pack_end(GTK_BOX(location_bar_box), window->option_cvtype, FALSE, FALSE, GNOME_PAD_SMALL); gtk_widget_show(window->option_cvtype); + /* allocate the zoom control and place on the right next to the menu */ + + zoom_control = nautilus_zoom_control_new(); + gtk_widget_show(zoom_control); + gtk_box_pack_end(GTK_BOX(location_bar_box), zoom_control, FALSE, FALSE, 0); + gtk_widget_show_all(location_bar_box); /* set up status bar */ diff --git a/src/nautilus-spatial-window.c b/src/nautilus-spatial-window.c index 820db5ef3..1705cbeaf 100644 --- a/src/nautilus-spatial-window.c +++ b/src/nautilus-spatial-window.c @@ -36,6 +36,7 @@ #include "ntl-miniicon.h" #include #include +#include "nautilus-zoom-control.h" static void nautilus_window_realize (GtkWidget *widget); static void nautilus_window_real_set_content_view (NautilusWindow *window, NautilusView *new_view); @@ -415,7 +416,7 @@ nautilus_window_constructed(NautilusWindow *window) { GnomeApp *app; GtkWidget *location_bar_box, *statusbar; - GtkWidget *temp_frame; + GtkWidget *temp_frame, *zoom_control; app = GNOME_APP(window); @@ -435,16 +436,22 @@ nautilus_window_constructed(NautilusWindow *window) window->ent_uri = explorer_location_bar_new(); gtk_signal_connect(GTK_OBJECT(window->ent_uri), "location_changed", nautilus_window_goto_uri_cb, window); - gtk_box_pack_start(GTK_BOX(location_bar_box), window->ent_uri, TRUE, TRUE, GNOME_PAD); + gtk_box_pack_start(GTK_BOX(location_bar_box), window->ent_uri, TRUE, TRUE, GNOME_PAD_SMALL); gnome_app_add_docked(app, location_bar_box, "uri-entry", GNOME_DOCK_ITEM_BEH_EXCLUSIVE|GNOME_DOCK_ITEM_BEH_NEVER_VERTICAL, GNOME_DOCK_TOP, 2, 0, 0); /* Option menu for content view types; it's empty here, filled in when a uri is set. */ window->option_cvtype = gtk_option_menu_new(); - gtk_box_pack_end(GTK_BOX(location_bar_box), window->option_cvtype, FALSE, FALSE, GNOME_PAD_BIG); + gtk_box_pack_end(GTK_BOX(location_bar_box), window->option_cvtype, FALSE, FALSE, GNOME_PAD_SMALL); gtk_widget_show(window->option_cvtype); + /* allocate the zoom control and place on the right next to the menu */ + + zoom_control = nautilus_zoom_control_new(); + gtk_widget_show(zoom_control); + gtk_box_pack_end(GTK_BOX(location_bar_box), zoom_control, FALSE, FALSE, 0); + gtk_widget_show_all(location_bar_box); /* set up status bar */ diff --git a/src/nautilus-window.c b/src/nautilus-window.c index 820db5ef3..1705cbeaf 100644 --- a/src/nautilus-window.c +++ b/src/nautilus-window.c @@ -36,6 +36,7 @@ #include "ntl-miniicon.h" #include #include +#include "nautilus-zoom-control.h" static void nautilus_window_realize (GtkWidget *widget); static void nautilus_window_real_set_content_view (NautilusWindow *window, NautilusView *new_view); @@ -415,7 +416,7 @@ nautilus_window_constructed(NautilusWindow *window) { GnomeApp *app; GtkWidget *location_bar_box, *statusbar; - GtkWidget *temp_frame; + GtkWidget *temp_frame, *zoom_control; app = GNOME_APP(window); @@ -435,16 +436,22 @@ nautilus_window_constructed(NautilusWindow *window) window->ent_uri = explorer_location_bar_new(); gtk_signal_connect(GTK_OBJECT(window->ent_uri), "location_changed", nautilus_window_goto_uri_cb, window); - gtk_box_pack_start(GTK_BOX(location_bar_box), window->ent_uri, TRUE, TRUE, GNOME_PAD); + gtk_box_pack_start(GTK_BOX(location_bar_box), window->ent_uri, TRUE, TRUE, GNOME_PAD_SMALL); gnome_app_add_docked(app, location_bar_box, "uri-entry", GNOME_DOCK_ITEM_BEH_EXCLUSIVE|GNOME_DOCK_ITEM_BEH_NEVER_VERTICAL, GNOME_DOCK_TOP, 2, 0, 0); /* Option menu for content view types; it's empty here, filled in when a uri is set. */ window->option_cvtype = gtk_option_menu_new(); - gtk_box_pack_end(GTK_BOX(location_bar_box), window->option_cvtype, FALSE, FALSE, GNOME_PAD_BIG); + gtk_box_pack_end(GTK_BOX(location_bar_box), window->option_cvtype, FALSE, FALSE, GNOME_PAD_SMALL); gtk_widget_show(window->option_cvtype); + /* allocate the zoom control and place on the right next to the menu */ + + zoom_control = nautilus_zoom_control_new(); + gtk_widget_show(zoom_control); + gtk_box_pack_end(GTK_BOX(location_bar_box), zoom_control, FALSE, FALSE, 0); + gtk_widget_show_all(location_bar_box); /* set up status bar */ diff --git a/src/nautilus-zoom-control.c b/src/nautilus-zoom-control.c new file mode 100644 index 000000000..36769be07 --- /dev/null +++ b/src/nautilus-zoom-control.c @@ -0,0 +1,174 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ + +/* Nautilus + * Copyright (C) 2000 Eazel, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Andy Hertzfeld + * + * This is the zoom control for the location bar + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "nautilus-zoom-control.h" + +static void nautilus_zoom_control_class_initialize (NautilusZoomControlClass *klass); +static void nautilus_zoom_control_initialize (NautilusZoomControl *pixmap); +static void nautilus_zoom_control_draw (GtkWidget *widget, GdkRectangle *box); +static gboolean nautilus_zoom_control_button_press_event (GtkWidget *widget, GdkEventButton *event); + +static GtkEventBoxClass *parent_class; + +GtkType +nautilus_zoom_control_get_type (void) +{ + static GtkType zoom_control_type = 0; + + if (!zoom_control_type) + { + static const GtkTypeInfo zoom_control_info = + { + "NautilusZoomControl", + sizeof (NautilusZoomControl), + sizeof (NautilusZoomControlClass), + (GtkClassInitFunc) nautilus_zoom_control_class_initialize, + (GtkObjectInitFunc) nautilus_zoom_control_initialize, + /* reserved_1 */ NULL, + /* reserved_2 */ NULL, + (GtkClassInitFunc) NULL, + }; + + zoom_control_type = gtk_type_unique (gtk_event_box_get_type(), &zoom_control_info); + } + + return zoom_control_type; +} + +static void +nautilus_zoom_control_class_initialize (NautilusZoomControlClass *class) +{ + GtkObjectClass *object_class; + GtkWidgetClass *widget_class; + + object_class = (GtkObjectClass*) class; + widget_class = (GtkWidgetClass*) class; + parent_class = gtk_type_class (gtk_event_box_get_type ()); + + widget_class->draw = nautilus_zoom_control_draw; + widget_class->button_press_event = nautilus_zoom_control_button_press_event; +} + +static void +nautilus_zoom_control_initialize (NautilusZoomControl *zoom_control) +{ + gchar *file_name; + GtkWidget *pix_widget; + + zoom_control->current_zoom = NAUTILUS_ZOOM_LEVEL_STANDARD; + zoom_control->min_zoom = NAUTILUS_ZOOM_LEVEL_SMALLEST; + zoom_control->max_zoom = NAUTILUS_ZOOM_LEVEL_LARGEST; + zoom_control->zoom_factor = 1.0; + + /* allocate the pixmap that holds the image */ + + file_name = gnome_pixmap_file ("nautilus/zoom.png"); + pix_widget = GTK_WIDGET (gnome_pixmap_new_from_file (file_name)); + gtk_widget_show (pix_widget); + gtk_container_add (GTK_CONTAINER(zoom_control), pix_widget); + g_free (file_name); + +} + +GtkWidget* +nautilus_zoom_control_new () +{ + NautilusZoomControl *zoom_control = gtk_type_new (nautilus_zoom_control_get_type ()); + return GTK_WIDGET (zoom_control); +} + +static void +nautilus_zoom_control_draw (GtkWidget *widget, GdkRectangle *box) +{ + NautilusZoomControl *zoom_control; + gchar buffer[8]; + GdkFont *label_font; + GdkGC* temp_gc; + + gint x, y, percent; + + g_return_if_fail (widget != NULL); + g_return_if_fail (NAUTILUS_IS_ZOOM_CONTROL (widget)); + + zoom_control = NAUTILUS_ZOOM_CONTROL (widget); + + /* invoke our superclass to draw the image */ + + NAUTILUS_CALL_PARENT_CLASS (GTK_WIDGET_CLASS, draw, (widget, box)); + + /* draw the current zoom level percentage */ + label_font = gdk_font_load("-bitstream-courier-medium-r-normal-*-9-*-*-*-*-*-*-*"); + temp_gc = gdk_gc_new(widget->window); + + percent = floor((100.0 * zoom_control->zoom_factor) + .5); + g_snprintf(buffer, 8, "%d", percent); + + x = (box->width - gdk_string_width(label_font, buffer)) >> 1; + y = (box->height >> 1) + 3; + + gdk_draw_string (widget->window, label_font, temp_gc, x, y, &buffer[0]); + + gdk_font_unref(label_font); + gdk_gc_unref(temp_gc); +} + +/* hit-test the index tabs and activate if necessary */ + +static gboolean +nautilus_zoom_control_button_press_event (GtkWidget *widget, GdkEventButton *event) +{ + NautilusZoomControl *zoom_control = NAUTILUS_ZOOM_CONTROL (widget); + gint width = widget->allocation.width; + gint changed = FALSE; + + if (event->x < (width / 3) && (zoom_control->current_zoom > zoom_control->min_zoom)) + { + zoom_control->current_zoom -= 1; + changed = TRUE; + } + else if ((event->x > ((2 * width) / 3)) && (zoom_control->current_zoom < zoom_control->max_zoom)) + { + zoom_control->current_zoom += 1; + changed = TRUE; + } + + if (changed) + { + gtk_widget_queue_draw(widget); + zoom_control->zoom_factor = (double) nautilus_icon_size_for_zoom_level (zoom_control->current_zoom) + / NAUTILUS_ICON_SIZE_STANDARD; + /* FIXME: tell the content view about the zoom change here soon */ + } + + return TRUE; +} \ No newline at end of file diff --git a/src/nautilus-zoom-control.h b/src/nautilus-zoom-control.h new file mode 100644 index 000000000..ab4f11e58 --- /dev/null +++ b/src/nautilus-zoom-control.h @@ -0,0 +1,73 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ + +/* Nautilus + * Copyright (C) 2000 Eazel, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Andy Hertzfeld + * + * This is the header file for the zoom control on the location bar + * + */ + +#ifndef __NAUTILUS_ZOOM_CONTROL_H__ +#define __NAUTILUS_ZOOM_CONTROL_H__ + + +#include +#include + + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + + +#define NAUTILUS_TYPE_ZOOM_CONTROL (nautilus_zoom_control_get_type ()) +#define NAUTILUS_ZOOM_CONTROL(obj) (GTK_CHECK_CAST ((obj), NAUTILUS_TYPE_ZOOM_CONTROL, NautilusZoomControl)) +#define NAUTILUS_ZOOM_CONTROL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_ZOOM_CONTROL, NautilusZoomControlClass)) +#define NAUTILUS_IS_ZOOM_CONTROL(obj) (GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_ZOOM_CONTROL)) +#define NAUTILUS_IS_ZOOM_CONTROL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_ZOOM_CONTROL)) + +typedef struct _NautilusZoomControl NautilusZoomControl; +typedef struct _NautilusZoomControlClass NautilusZoomControlClass; + +struct _NautilusZoomControl +{ + GtkPixmap pixmap; + + gint current_zoom; + gint min_zoom; + gint max_zoom; + double zoom_factor; +}; + +struct _NautilusZoomControlClass +{ + GtkEventBoxClass parent_class; +}; + + +GtkType nautilus_zoom_control_get_type (void); +GtkWidget* nautilus_zoom_control_new (void); + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + + +#endif /* __NAUTILUS_ZOOM_CONTROL_H__ */ diff --git a/src/ntl-window.c b/src/ntl-window.c index 820db5ef3..1705cbeaf 100644 --- a/src/ntl-window.c +++ b/src/ntl-window.c @@ -36,6 +36,7 @@ #include "ntl-miniicon.h" #include #include +#include "nautilus-zoom-control.h" static void nautilus_window_realize (GtkWidget *widget); static void nautilus_window_real_set_content_view (NautilusWindow *window, NautilusView *new_view); @@ -415,7 +416,7 @@ nautilus_window_constructed(NautilusWindow *window) { GnomeApp *app; GtkWidget *location_bar_box, *statusbar; - GtkWidget *temp_frame; + GtkWidget *temp_frame, *zoom_control; app = GNOME_APP(window); @@ -435,16 +436,22 @@ nautilus_window_constructed(NautilusWindow *window) window->ent_uri = explorer_location_bar_new(); gtk_signal_connect(GTK_OBJECT(window->ent_uri), "location_changed", nautilus_window_goto_uri_cb, window); - gtk_box_pack_start(GTK_BOX(location_bar_box), window->ent_uri, TRUE, TRUE, GNOME_PAD); + gtk_box_pack_start(GTK_BOX(location_bar_box), window->ent_uri, TRUE, TRUE, GNOME_PAD_SMALL); gnome_app_add_docked(app, location_bar_box, "uri-entry", GNOME_DOCK_ITEM_BEH_EXCLUSIVE|GNOME_DOCK_ITEM_BEH_NEVER_VERTICAL, GNOME_DOCK_TOP, 2, 0, 0); /* Option menu for content view types; it's empty here, filled in when a uri is set. */ window->option_cvtype = gtk_option_menu_new(); - gtk_box_pack_end(GTK_BOX(location_bar_box), window->option_cvtype, FALSE, FALSE, GNOME_PAD_BIG); + gtk_box_pack_end(GTK_BOX(location_bar_box), window->option_cvtype, FALSE, FALSE, GNOME_PAD_SMALL); gtk_widget_show(window->option_cvtype); + /* allocate the zoom control and place on the right next to the menu */ + + zoom_control = nautilus_zoom_control_new(); + gtk_widget_show(zoom_control); + gtk_box_pack_end(GTK_BOX(location_bar_box), zoom_control, FALSE, FALSE, 0); + gtk_widget_show_all(location_bar_box); /* set up status bar */ -- GitLab