Hello,

For those who care, I've update the patches (see attachment) for the
last Debian package. They seem to work with version 2.26.0-1....

I'm still trying to have them integrated upstream...


Cheers,

-- 
Stéphane
commit 10e08dcf71ebeb0411bdd662522802a95c792468
Author: Stephane Glondu <[email protected]>
Date:   Thu Jun 11 08:29:47 2009 +0200

    Add patches for one filesystem

diff --git a/debian/changelog b/debian/changelog
index add42b3..f90730f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+gnome-utils (2.26.0-1+baobab1) UNRELEASED; urgency=low
+
+  * Add patches for one filesystem
+
+ -- Stephane Glondu <[email protected]>  Thu, 11 Jun 2009 08:27:55 +0200
+
 gnome-utils (2.26.0-1) unstable; urgency=low
 
   [ Josselin Mouette ]
diff --git a/debian/patches/1001-Add-one_filesystem-option-to-preference-dialog.patch b/debian/patches/1001-Add-one_filesystem-option-to-preference-dialog.patch
new file mode 100644
index 0000000..7d7c2f1
--- /dev/null
+++ b/debian/patches/1001-Add-one_filesystem-option-to-preference-dialog.patch
@@ -0,0 +1,135 @@
+From 8aa5b4f9ba02973a95d0a730b06c6c206edf1d07 Mon Sep 17 00:00:00 2001
+From: Stephane Glondu <[email protected]>
+Date: Tue, 2 Sep 2008 23:12:55 +0200
+Subject: [PATCH 1/2] Add one_filesystem option to preference dialog
+
+---
+ baobab/data/baobab.glade  |   19 +++++++++++++++++++
+ baobab/src/baobab-prefs.c |   23 ++++++++++++++++++++++-
+ baobab/src/baobab.c       |    3 +++
+ baobab/src/baobab.h       |    2 ++
+ 4 files changed, 46 insertions(+), 1 deletions(-)
+
+diff --git a/baobab/data/baobab.glade b/baobab/data/baobab.glade
+index 91e9448..5a74abf 100644
+--- a/baobab/data/baobab.glade
++++ b/baobab/data/baobab.glade
+@@ -749,6 +749,25 @@
+ 	      <property name="fill">False</property>
+ 	    </packing>
+ 	  </child>
++
++	  <child>
++	    <widget class="GtkCheckButton" id="check_one_filesystem">
++	      <property name="visible">True</property>
++	      <property name="can_focus">True</property>
++	      <property name="label" translatable="yes">_Do not cross filesystem borders</property>
++	      <property name="use_underline">True</property>
++	      <property name="relief">GTK_RELIEF_NORMAL</property>
++	      <property name="focus_on_click">True</property>
++	      <property name="active">True</property>
++	      <property name="inconsistent">False</property>
++	      <property name="draw_indicator">True</property>
++	    </widget>
++	    <packing>
++	      <property name="padding">0</property>
++	      <property name="expand">False</property>
++	      <property name="fill">False</property>
++	    </packing>
++	  </child>
+ 	</widget>
+ 	<packing>
+ 	  <property name="padding">0</property>
+diff --git a/baobab/src/baobab-prefs.c b/baobab/src/baobab-prefs.c
+index 93ebac4..0ce6ad2 100644
+--- a/baobab/src/baobab-prefs.c
++++ b/baobab/src/baobab-prefs.c
+@@ -56,6 +56,8 @@ static gboolean set_model_checks (GtkTreeModel * model, GtkTreePath * path,
+ static void enable_home_cb (GtkToggleButton * togglebutton,
+ 			    gpointer user_data);
+ 
++static void enable_one_filesystem_cb (GtkToggleButton * togglebutton,
++                                      gpointer user_data);
+ 
+ void
+ props_notify (GConfClient *client,
+@@ -103,7 +105,7 @@ filechooser_response_cb (GtkDialog *dialog,
+ void
+ create_props (void)
+ {
+-	GtkWidget *dlg, *check_enablehome;
++	GtkWidget *dlg, *check_enablehome, *check_one_filesystem;
+ 	GladeXML *dlg_xml;
+ 
+ 	props_changed = FALSE;
+@@ -125,10 +127,19 @@ create_props (void)
+ 	gtk_toggle_button_set_active ((GtkToggleButton *) check_enablehome,
+ 				      baobab.bbEnableHomeMonitor);
+ 
++	check_one_filesystem = glade_xml_get_widget (dlg_xml, "check_one_filesystem");
++	gtk_toggle_button_set_active ((GtkToggleButton *) check_one_filesystem,
++				      baobab.bbEnableOneFilesystem);
++
+ 	g_signal_connect_after ((GtkToggleButton *) check_enablehome,
+ 				"toggled", G_CALLBACK (enable_home_cb),
+ 				NULL);
+ 
++	g_signal_connect_after ((GtkToggleButton *) check_one_filesystem,
++				"toggled", G_CALLBACK (enable_one_filesystem_cb),
++				NULL);
++
++
+ 	g_signal_connect (dlg, "response",
+ 		    	  G_CALLBACK (filechooser_response_cb),
+ 		    	  NULL);
+@@ -406,3 +417,13 @@ enable_home_cb (GtkToggleButton *togglebutton, gpointer user_data)
+ 			       baobab.bbEnableHomeMonitor, NULL);
+ 
+ }
++
++void
++enable_one_filesystem_cb (GtkToggleButton *togglebutton, gpointer user_data)
++{
++	baobab.bbEnableOneFilesystem = gtk_toggle_button_get_active (togglebutton);
++
++	gconf_client_set_bool (baobab.gconf_client, PROPS_ENABLE_ONE_FILESYSTEM,
++			       baobab.bbEnableOneFilesystem, NULL);
++
++}
+diff --git a/baobab/src/baobab.c b/baobab/src/baobab.c
+index de0f841..ab3885c 100644
+--- a/baobab/src/baobab.c
++++ b/baobab/src/baobab.c
+@@ -719,6 +719,9 @@ baobab_init (void)
+ 	baobab.bbEnableHomeMonitor = gconf_client_get_bool (baobab.gconf_client,
+ 							    PROPS_ENABLE_HOME_MONITOR,
+ 							    NULL);
++	baobab.bbEnableOneFilesystem = gconf_client_get_bool (baobab.gconf_client,
++                                                              PROPS_ENABLE_ONE_FILESYSTEM,
++                                                              NULL);
+ 
+ 	baobab_create_toolbar ();
+ 
+diff --git a/baobab/src/baobab.h b/baobab/src/baobab.h
+index 370a1a2..914088b 100644
+--- a/baobab/src/baobab.h
++++ b/baobab/src/baobab.h
+@@ -45,6 +45,7 @@ struct BaobabSearchOpt;
+ #define BAOBAB_SUBFLSTIPS_VISIBLE_KEY   BAOBAB_KEY_DIR "/ui/baobab_subfoldertips_visible"
+ #define PROPS_SCAN_KEY			BAOBAB_KEY_DIR "/properties/skip_scan_uri_list"
+ #define PROPS_ENABLE_HOME_MONITOR	BAOBAB_KEY_DIR "/properties/enable_home_monitor"
++#define PROPS_ENABLE_ONE_FILESYSTEM	BAOBAB_KEY_DIR "/properties/enable_one_filesystem"
+ #define SYSTEM_TOOLBAR_STYLE		"/desktop/gnome/interface/toolbar_style"
+ 
+ typedef struct _ContextMenu ContextMenu;
+@@ -76,6 +77,7 @@ struct _baobab_application {
+ 	gboolean CONTENTS_CHANGED_DELAYED;
+ 	GSList *excluded_locations;
+ 	gboolean bbEnableHomeMonitor;
++	gboolean bbEnableOneFilesystem;
+ 	gchar *label_scan;
+ 	gboolean show_allocated;
+ 	gboolean is_local;
+-- 
+1.6.3.1
+
diff --git a/debian/patches/1002-Actually-implement-the-one_filesystem-option.patch b/debian/patches/1002-Actually-implement-the-one_filesystem-option.patch
new file mode 100644
index 0000000..4297bd6
--- /dev/null
+++ b/debian/patches/1002-Actually-implement-the-one_filesystem-option.patch
@@ -0,0 +1,63 @@
+From a2722b7d04a5982f3e4b1ac9fe581940280675eb Mon Sep 17 00:00:00 2001
+From: Stephane Glondu <[email protected]>
+Date: Tue, 2 Sep 2008 23:59:08 +0200
+Subject: [PATCH 2/2] Actually implement the one_filesystem option
+
+---
+ baobab/src/baobab-scan.c |   12 +++++++++---
+ 1 files changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/baobab/src/baobab-scan.c b/baobab/src/baobab-scan.c
+index 35e88d8..c38eeef 100644
+--- a/baobab/src/baobab-scan.c
++++ b/baobab/src/baobab-scan.c
+@@ -131,6 +131,7 @@ static const char *dir_attributes = \
+ 	G_FILE_ATTRIBUTE_STANDARD_SIZE "," \
+ 	G_FILE_ATTRIBUTE_UNIX_BLOCKS "," \
+ 	G_FILE_ATTRIBUTE_UNIX_NLINK "," \
++	G_FILE_ATTRIBUTE_UNIX_DEVICE "," \
+ 	G_FILE_ATTRIBUTE_ACCESS_CAN_READ;
+ 
+ 
+@@ -168,7 +169,8 @@ loopdir (GFile *file,
+ 	 GFileInfo *info,
+ 	 guint count,
+ 	 BaobabHardLinkArray *hla,
+-	 gint current_depth)
++	 gint current_depth,
++	 dev_t device)
+ {
+ 	GList *file_list;
+ 	guint64 tempHLsize = 0;
+@@ -203,6 +205,10 @@ loopdir (GFile *file,
+ 
+ 	parse_name = g_file_get_parse_name (file);	
+ 
++	/* Skip folders outside the first filesystem */
++	if (baobab.bbEnableOneFilesystem && g_file_info_get_attribute_uint32(info, G_FILE_ATTRIBUTE_UNIX_DEVICE) != device)
++		goto exit;
++
+ 	if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_STANDARD_SIZE))
+ 		retloop.size = g_file_info_get_size (info);
+ 
+@@ -261,7 +267,7 @@ loopdir (GFile *file,
+ 		if (temp_type == G_FILE_TYPE_DIRECTORY) {
+ 			GFile *child_dir = g_file_get_child (file, 
+ 						g_file_info_get_name (temp_info));
+-			temp = loopdir (child_dir, temp_info, count, hla, current_depth+1);
++			temp = loopdir (child_dir, temp_info, count, hla, current_depth+1, device);
+ 			retloop.size += temp.size;
+ 			retloop.alloc_size += temp.alloc_size;
+ 			retloop.depth = ((temp.depth + 1) > retloop.depth) ? temp.depth + 1 : retloop.depth;
+@@ -360,7 +366,7 @@ baobab_scan_execute (GFile *location)
+ 	if (ftype == G_FILE_TYPE_DIRECTORY) {
+ 		hla = baobab_hardlinks_array_create ();
+ 
+-		sizes = loopdir (location, info, 0, hla, 0);
++		sizes = loopdir (location, info, 0, hla, 0, g_file_info_get_attribute_uint32(info, G_FILE_ATTRIBUTE_UNIX_DEVICE));
+ 		baobab.model_max_depth = sizes.depth;
+ 
+ 		baobab_hardlinks_array_free (hla);
+-- 
+1.6.3.1
+

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to