ports/118345: Nautilus patch for not keeping windows open in spatial mode.

Mehmet Kose mehmet.kose at gmail.com
Fri Nov 30 06:50:02 UTC 2007


>Number:         118345
>Category:       ports
>Synopsis:       Nautilus patch for not keeping windows open in spatial mode.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 30 06:50:01 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator:     Mehmet Kose
>Release:        7.0 Beta 3
>Organization:
>Environment:
FreeBSD decaf.ev 7.0-BETA3 FreeBSD 7.0-BETA3 #0: 
Fri Nov 16 22:20:33 UTC 2007 root at logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
For someone who likes small windows but don't want to keep them 
when opening another folder inside, I took this patch taken from Ubuntu.


>How-To-Repeat:

>Fix:
Makefile patch:


-OPTIONS=       TRACKER "Enable Tracker Search (sysutils/tracker)" Off
+OPTIONS=       TRACKER "Enable Tracker Search (sysutils/tracker)" Off \
+               CLOSEBEHIND "Auto Close Behind Window in Spatial Mode" Off
 

+.if !defined(WITHOUT_CLOSEBEHIND)
+EXTRA_PATCHES+=        ${PATCHDIR}/xpatch-close_behind
+.endif


Patch attached with submission follows:

--- libnautilus-private/apps_nautilus_preferences.schemas.in.orig	2007-09-18 09:51:48.000000000 +0300
+++ libnautilus-private/apps_nautilus_preferences.schemas.in	2007-11-30 04:11:49.000000000 +0200
@@ -54,6 +54,21 @@
     </schema>
 
     <schema>
+      <key>/schemas/apps/nautilus/preferences/auto_close_behind_window</key>
+      <applyto>/apps/nautilus/preferences/auto_close_behind_window</applyto>
+      <owner>nautilus</owner>
+      <type>bool</type>
+      <default>true</default>
+      <locale name="C">
+         <short>Don't keep behind windows open in spatial mode</short>
+         <long>
+		If set to true, then Nautilus spatial windows will automatically
+		closed after opening a folder in them.
+         </long>
+      </locale>
+    </schema>
+
+    <schema>
       <key>/schemas/apps/nautilus/preferences/always_use_location_entry</key>
       <applyto>/apps/nautilus/preferences/always_use_location_entry</applyto>
       <owner>nautilus</owner>
--- libnautilus-private/nautilus-global-preferences.c.orig	2007-06-27 10:12:34.000000000 +0300
+++ libnautilus-private/nautilus-global-preferences.c	2007-11-30 04:35:31.000000000 +0200
@@ -262,6 +262,10 @@
 	  PREFERENCE_BOOLEAN,
 	  GINT_TO_POINTER (FALSE)
 	},
+	{ NAUTILUS_PREFERENCES_AUTO_CLOSE_BEHIND_WINDOW,
+	  PREFERENCE_BOOLEAN,
+	  GINT_TO_POINTER (FALSE)
+	},
 	{ NAUTILUS_PREFERENCES_SHOW_BACKUP_FILES,
 	  PREFERENCE_BOOLEAN,
 	  GINT_TO_POINTER (FALSE)
--- libnautilus-private/nautilus-global-preferences.h.orig	2007-06-27 10:12:34.000000000 +0300
+++ libnautilus-private/nautilus-global-preferences.h	2007-11-30 04:20:42.000000000 +0200
@@ -80,6 +80,9 @@
 /* Spatial or browser mode */
 #define NAUTILUS_PREFERENCES_ALWAYS_USE_BROWSER       		"preferences/always_use_browser"
 
+/* Close behind window in spatial mode  */
+#define NAUTILUS_PREFERENCES_AUTO_CLOSE_BEHIND_WINDOW		"preferences/auto_close_behind_window"
+
 /* Which views should be displayed for new windows */
 #define NAUTILUS_PREFERENCES_START_WITH_LOCATION_BAR		"preferences/start_with_location_bar"
 #define NAUTILUS_PREFERENCES_ALWAYS_USE_LOCATION_ENTRY		"preferences/always_use_location_entry"
--- src/file-manager/fm-directory-view.c.orig	2007-08-27 11:03:57.000000000 +0300
+++ src/file-manager/fm-directory-view.c	2007-11-30 05:00:21.000000000 +0200
@@ -8872,6 +8872,16 @@
 	parameters->view = view;
 	parameters->files = nautilus_file_list_copy (files);
 	parameters->mode = mode;
+
+	if ( eel_preferences_get_boolean 
+	(NAUTILUS_PREFERENCES_AUTO_CLOSE_BEHIND_WINDOW) && nautilus_file_is_directory (file)) {
+		if (flags== NAUTILUS_WINDOW_OPEN_FLAG_CLOSE_BEHIND)
+			flags=0;
+		else 
+			flags=NAUTILUS_WINDOW_OPEN_FLAG_CLOSE_BEHIND;
+	}		
+
+
 	parameters->flags = flags;
 	parameters->mount_success = FALSE;
 	parameters->pending_mounts = 0;
--- src/nautilus-spatial-window.c.orig	2007-09-10 09:56:43.000000000 +0300
+++ src/nautilus-spatial-window.c	2007-11-30 05:07:53.000000000 +0200
@@ -527,7 +527,10 @@
 		{
 			close_behind = TRUE;
 		}
-		nautilus_window_open_location_with_selection (NAUTILUS_WINDOW (window), location, selection, close_behind);
+		if ( eel_preferences_get_boolean(NAUTILUS_PREFERENCES_AUTO_CLOSE_BEHIND_WINDOW))
+			nautilus_window_open_location_with_selection (NAUTILUS_WINDOW (window), location, selection, !close_behind);
+		else
+			nautilus_window_open_location_with_selection (NAUTILUS_WINDOW (window), location, selection, close_behind);
 	}
 
 	if (event != NULL) {


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list