Hello community,
here is the log from the commit of package nautilus
checked in at Tue May 16 02:19:35 CEST 2006.
--------
--- GNOME/nautilus/nautilus.changes 2006-05-12 02:38:03.000000000 +0200
+++ nautilus/nautilus.changes 2006-05-15 23:00:57.000000000 +0200
@@ -1,0 +2,9 @@
+Mon May 15 23:00:35 CEST 2006 - federico@novell.com
+
+- Added nautilus-158279-add-location-toggle-button.diff to fix
+ https://bugzilla.novell.com/show_bug.cgi?id=158279. This adds a
+ toggle button to the left of path bar in navigation windows.
+ Pressing this button will switch to using a location entry instead
+ of the path bar.
+
+-------------------------------------------------------------------
New:
----
nautilus-158279-add-location-toggle-button.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ nautilus.spec ++++++
--- /var/tmp/diff_new_pack.TAF8oj/_old 2006-05-16 02:19:12.000000000 +0200
+++ /var/tmp/diff_new_pack.TAF8oj/_new 2006-05-16 02:19:12.000000000 +0200
@@ -18,7 +18,7 @@
Group: Productivity/File utilities
Autoreqprov: on
Version: 2.12.2
-Release: 65
+Release: 66
Summary: The GNOME 2.x Desktop File Manager
Source: ftp://ftp.gnome.org/pub/gnome/sources/nautilus/2.11/%{name}-%{version}.tar.bz2
URL: http://www.gnome.org
@@ -50,6 +50,7 @@
Patch44: nautilus-trash-icon.patch
Patch45: nautilus-66073-update-progress-dialog.diff
Patch46: nautilus-142860-vfs-drive-for-extensions.diff
+Patch47: nautilus-158279-add-location-toggle-button.diff
PreReq: filesystem gconf2
Requires: gnome2-user-docs
Provides: nautilus2
@@ -105,6 +106,7 @@
%patch44
%patch45 -p1
%patch46 -p1
+%patch47 -p1
# FIXME: this code updates translation for upstreamed patches.
cd po
intltool-update --pot
@@ -189,6 +191,12 @@
%{prefix}/%_lib/pkgconfig/*.pc
%changelog -n nautilus
+* Mon May 15 2006 - federico@novell.com
+- Added nautilus-158279-add-location-toggle-button.diff to fix
+ https://bugzilla.novell.com/show_bug.cgi?id=158279. This adds a
+ toggle button to the left of path bar in navigation windows.
+ Pressing this button will switch to using a location entry instead
+ of the path bar.
* Fri May 12 2006 - federico@novell.com
- Updated nautilus-155010-desktop-volume-policy.diff; this fixes
https://bugzilla.novell.com/show_bug.cgi?id=175076. This fixes a
++++++ nautilus-158279-add-location-toggle-button.diff ++++++
2006-05-15 Federico Mena Quintero
Fix https://bugzilla.novell.com/show_bug.cgi?id=158279 - add a
button to the Nautilus location bar to toggle betwen the path bar
and a location entry.
* src/nautilus-window-private.h (NautilusNavigationWindowDetails):
Add a location_button field.
* src/nautilus-navigation-window.c
(nautilus_navigation_window_instance_init): Create the
location_button.
(location_button_toggled_cb): New callback. Changes the
preference for toggling between the path bar and the location bar.
(always_use_location_entry_changed): Toggle the button as
appropriate.
--- nautilus/src/nautilus-window-private.h.orig 2006-05-15 14:08:02.000000000 -0500
+++ nautilus/src/nautilus-window-private.h 2006-05-15 14:19:16.000000000 -0500
@@ -106,6 +106,8 @@ struct _NautilusNavigationWindowDetails
gboolean temporary_location_bar;
gboolean temporary_search_bar;
+ GtkWidget *location_button;
+
/* Side Pane */
int side_pane_width;
NautilusSidebar *current_side_panel;
--- nautilus/src/nautilus-navigation-window.c.orig 2006-05-12 13:53:18.000000000 -0500
+++ nautilus/src/nautilus-navigation-window.c 2006-05-15 15:48:36.000000000 -0500
@@ -139,6 +139,44 @@ GNOME_CLASS_BOILERPLATE (NautilusNavigat
NautilusWindow, NAUTILUS_TYPE_WINDOW)
static void
+location_button_toggled_cb (GtkToggleButton *toggle,
+ NautilusNavigationWindow *window)
+{
+ gboolean is_active;
+
+ is_active = gtk_toggle_button_get_active (toggle);
+ eel_preferences_set_boolean (NAUTILUS_PREFERENCES_ALWAYS_USE_LOCATION_ENTRY, is_active);
+
+ if (is_active)
+ nautilus_navigation_bar_activate (NAUTILUS_NAVIGATION_BAR (window->navigation_bar));
+}
+
+static gboolean
+location_button_should_be_active (NautilusNavigationWindow *window)
+{
+ return eel_preferences_get_boolean (NAUTILUS_PREFERENCES_ALWAYS_USE_LOCATION_ENTRY);
+}
+
+static GtkWidget *
+location_button_create (NautilusNavigationWindow *window)
+{
+ GtkWidget *image;
+ GtkWidget *button;
+
+ image = gtk_image_new_from_stock (GTK_STOCK_EDIT, GTK_ICON_SIZE_BUTTON);
+ gtk_widget_show (image);
+
+ button = g_object_new (GTK_TYPE_TOGGLE_BUTTON,
+ "image", image,
+ "active", location_button_should_be_active (window),
+ NULL);
+
+ g_signal_connect (button, "toggled",
+ G_CALLBACK (location_button_toggled_cb), window);
+ return button;
+}
+
+static void
nautilus_navigation_window_instance_init (NautilusNavigationWindow *window)
{
GtkUIManager *ui_manager;
@@ -191,7 +229,7 @@ nautilus_navigation_window_instance_init
location_bar = gtk_toolbar_new ();
window->details->location_bar = location_bar;
- hbox = gtk_hbox_new (FALSE, 0);
+ hbox = gtk_hbox_new (FALSE, 12);
gtk_widget_show (hbox);
item = gtk_tool_item_new ();
@@ -202,6 +240,10 @@ nautilus_navigation_window_instance_init
gtk_toolbar_insert (GTK_TOOLBAR (location_bar),
item, -1);
+ window->details->location_button = location_button_create (window);
+ gtk_box_pack_start (GTK_BOX (hbox), window->details->location_button, FALSE, FALSE, 0);
+ gtk_widget_show (window->details->location_button);
+
window->path_bar = g_object_new (NAUTILUS_TYPE_PATH_BAR, NULL);
gtk_widget_show (window->path_bar);
@@ -297,14 +339,25 @@ static void
always_use_location_entry_changed (gpointer callback_data)
{
NautilusNavigationWindow *window;
+ gboolean use_entry;
window = NAUTILUS_NAVIGATION_WINDOW (callback_data);
- if (eel_preferences_get_boolean (NAUTILUS_PREFERENCES_ALWAYS_USE_LOCATION_ENTRY)) {
+ use_entry = eel_preferences_get_boolean (NAUTILUS_PREFERENCES_ALWAYS_USE_LOCATION_ENTRY);
+
+ if (use_entry) {
nautilus_navigation_window_set_bar_mode (window, NAUTILUS_BAR_NAVIGATION);
} else {
nautilus_navigation_window_set_bar_mode (window, NAUTILUS_BAR_PATH);
}
+
+ g_signal_handlers_block_by_func (window->details->location_button,
+ G_CALLBACK (location_button_toggled_cb),
+ window);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (window->details->location_button), use_entry);
+ g_signal_handlers_unblock_by_func (window->details->location_button,
+ G_CALLBACK (location_button_toggled_cb),
+ window);
}
static int
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...