[Pkg-utopia-commits] r243 - packages/unstable/gnome-volume-manager/debian/patches

Sjoerd Simons sjoerd@costa.debian.org
Wed, 22 Jun 2005 09:22:53 +0000


Author: sjoerd
Date: 2005-06-22 09:22:52 +0000 (Wed, 22 Jun 2005)
New Revision: 243

Added:
   packages/unstable/gnome-volume-manager/debian/patches/01_browse_fixup.patch
   packages/unstable/gnome-volume-manager/debian/patches/04_reconnect_on_dbus_exit.patch
Removed:
   packages/unstable/gnome-volume-manager/debian/patches/03_browse_fixup.patch
   packages/unstable/gnome-volume-manager/debian/patches/11_dbus_reconnect_on_bus_exit.patch
Log:
Move around to have the same order as in the ubuntu package

Copied: packages/unstable/gnome-volume-manager/debian/patches/01_browse_fixup.patch (from rev 242, packages/unstable/gnome-volume-manager/debian/patches/03_browse_fixup.patch)

Deleted: packages/unstable/gnome-volume-manager/debian/patches/03_browse_fixup.patch
===================================================================
--- packages/unstable/gnome-volume-manager/debian/patches/03_browse_fixup.patch	2005-06-22 09:22:13 UTC (rev 242)
+++ packages/unstable/gnome-volume-manager/debian/patches/03_browse_fixup.patch	2005-06-22 09:22:52 UTC (rev 243)
@@ -1,70 +0,0 @@
-diff -ruN gnome-volume-manager-1.3.1-old/src/manager.c gnome-volume-manager-1.3.1/src/manager.c
---- gnome-volume-manager-1.3.1-old/src/manager.c	2005-03-31 18:27:07.000000000 +0200
-+++ gnome-volume-manager-1.3.1/src/manager.c	2005-04-13 14:08:36.049442384 +0200
-@@ -257,31 +257,32 @@
- /*
-  * gvm_check_dvd - is this a Video DVD?  If so, do something about it.
-  *
-- * Returns TRUE if this was a Video DVD and FALSE otherwise.
-+ * Returns TRUE if the Video DVD action was taken and FALSE otherwise.
-  */
- static gboolean
- gvm_check_dvd (const char *device, const char *mount_point, const char *udi)
- {
- 	char *path;
--	gboolean retval;
-+	gboolean isdvd;
- 
- 	path = g_build_path (G_DIR_SEPARATOR_S, mount_point, "video_ts", NULL);
--	retval = g_file_test (path, G_FILE_TEST_IS_DIR);
-+	isdvd = g_file_test (path, G_FILE_TEST_IS_DIR);
- 	g_free (path);
- 
- 	/* try the other name, if needed */
--	if (retval == FALSE) {
-+	if (isdvd == FALSE) {
- 		path = g_build_path (G_DIR_SEPARATOR_S, mount_point,
- 				     "VIDEO_TS", NULL);
--		retval = g_file_test (path, G_FILE_TEST_IS_DIR);
-+		isdvd = g_file_test (path, G_FILE_TEST_IS_DIR);
- 		g_free (path);
- 	}
- 
--	if (retval && config.autoplay_dvd)
-+	if (isdvd && config.autoplay_dvd) {
- 		gvm_run_command (device, config.autoplay_dvd_command,
- 				 mount_point, udi);
--
--	return retval;
-+    return TRUE;
-+  }
-+  return FALSE;
- }
- 
- /*
-@@ -289,7 +290,8 @@
-  * unit from a digital camera (e.g., a compact flash card).  If it is, then
-  * ask the user if he wants to import the photos.
-  *
-- * Returns TRUE if there were photos on this device, FALSE otherwise
-+ * Returns TRUE if there were photos on this device were imported, 
-+ * FALSE otherwise
-  *
-  * FIXME: Should probably not prompt the user and just do it automatically.
-  *        This now makes sense, as gphoto added an import mode.
-@@ -308,7 +310,6 @@
- 	if (!g_file_test (dcim_path, G_FILE_TEST_IS_DIR))
- 		goto out;
- 
--	retval = TRUE;
- 	dbg ("Photos detected: %s\n", dcim_path);
- 
- 	/* add the "content.photos" capability to this device */
-@@ -322,6 +323,7 @@
- 	}
- 
- 	if (config.autophoto) {
-+		retval=TRUE;
- 		askme = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_WARNING,
- 						GTK_BUTTONS_NONE,
- 						_("Import photos from device?"));

Copied: packages/unstable/gnome-volume-manager/debian/patches/04_reconnect_on_dbus_exit.patch (from rev 242, packages/unstable/gnome-volume-manager/debian/patches/11_dbus_reconnect_on_bus_exit.patch)

Deleted: packages/unstable/gnome-volume-manager/debian/patches/11_dbus_reconnect_on_bus_exit.patch
===================================================================
--- packages/unstable/gnome-volume-manager/debian/patches/11_dbus_reconnect_on_bus_exit.patch	2005-06-22 09:22:13 UTC (rev 242)
+++ packages/unstable/gnome-volume-manager/debian/patches/11_dbus_reconnect_on_bus_exit.patch	2005-06-22 09:22:52 UTC (rev 243)
@@ -1,116 +0,0 @@
---- gnome-volume-manager-1.3.1.old/src/manager.c	
-+++ gnome-volume-manager-1.3.1/src/manager.c
-@@ -50,7 +50,8 @@
- #define NAUTILUS_COMMAND	 BIN_NAUTILUS" -n --no-desktop %m"
- 
- static struct gvm_configuration config;
--static LibHalContext *hal_ctx;
-+static LibHalContext *hal_ctx = NULL;
-+static DBusConnection *dbus_connection = NULL;
- 
- /** List of UDI's for volumes mounted by g-v-m that we need to apply policy to*/
- static GSList *mounted_volumes_policy_queue = NULL;
-@@ -969,6 +970,73 @@
- {
- }
- 
-+static LibHalContext * gvm_do_hal_init ();
-+
-+/** Invoked by gvm_do_filter_dbus_msg in response to a D-BUS disconnect event.
-+ *
-+ * @param  data                 Context pointer
-+ * @return true if it should be tried again, false if success or failure.
-+ */
-+static gboolean
-+gvm_reconnect_to_hal (gpointer data __attribute__((__unused__)))
-+{
-+       static unsigned int retries = 0;
-+       DBusError error;
-+
-+       dbg ("Trying a reconnect ...\n");
-+       hal_ctx = gvm_do_hal_init ();
-+       if (hal_ctx != NULL) {
-+               dbg ("Reconnected OK.\n");
-+               retries = 0;
-+               return FALSE;
-+       } else if (dbus_connection){
-+               /* shut down dbus connection to try it again */
-+               dbus_connection_unref (dbus_connection);
-+               dbus_connection = NULL;
-+       }
-+
-+       /* Retry later if it failed. */
-+       if (retries++ < 100)
-+               return TRUE;
-+
-+       /* Too many retries; clean up and bail. */
-+       warn("gvm_reconnect_to_hal: no reconnection after 100 retries, exiting\n");
-+       libhal_ctx_shutdown (hal_ctx, &error);
-+       libhal_ctx_free (hal_ctx);
-+       hal_ctx = NULL;
-+       gtk_main_quit ();
-+       return FALSE;
-+}
-+
-+/** Invoked by D-BUS to filter messages.
-+ *
-+ * @param  connection  D-BUS connection
-+ * @param  message     D-BUS message
-+ * @param  user_data   Context pointer
-+ */
-+static DBusHandlerResult
-+gvm_do_filter_dbus_msg (DBusConnection *connection __attribute__((__unused__)),
-+                        DBusMessage *message,
-+                        void *user_data __attribute__((__unused__)))
-+{
-+       DBusError error;
-+       
-+       if (dbus_message_is_signal (message,
-+                                   DBUS_INTERFACE_LOCAL,
-+                                   "Disconnected")) {
-+               dbg("gvm_do_filter_dbus_msg: received Disconnected message\n");
-+               g_timeout_add(500, gvm_reconnect_to_hal, NULL);
-+               libhal_ctx_shutdown (hal_ctx, &error);
-+               libhal_ctx_free (hal_ctx);
-+               hal_ctx = NULL;
-+               dbus_connection_unref (dbus_connection);
-+               dbus_connection = NULL;
-+               return DBUS_HANDLER_RESULT_HANDLED;
-+       }
-+       else
-+               return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
-+}
-+
- /** Integrate a dbus mainloop. 
-  *
-  *  @param  ctx                 LibHal context
-@@ -980,14 +1048,15 @@
- hal_mainloop_integration (LibHalContext *ctx, 
- 			   DBusError *error)
- {
--	DBusConnection *dbus_connection;
--
- 	dbus_connection = dbus_bus_get (DBUS_BUS_SYSTEM, error);
- 
- 	if (dbus_error_is_set (error))
- 		return FALSE;
-+
-+        dbus_connection_set_exit_on_disconnect (dbus_connection, FALSE);
- 	
-         dbus_connection_setup_with_g_main (dbus_connection, NULL);
-+        dbus_connection_add_filter (dbus_connection, gvm_do_filter_dbus_msg, NULL, NULL);
- 
- 	libhal_ctx_set_dbus_connection (ctx, dbus_connection);
- 	
-@@ -1154,6 +1223,11 @@
- 	char *udi;
- 	DBusError error;
- 
-+        if (ctx == NULL) {
-+            warn("unmount_all: No hal connection! can't unmount volumes\n");
-+            return;
-+        }
-+
- 	dbg ("unmounting all volumes that we saw mounted in our life\n");
- 	dbus_error_init (&error);
- 	for (i = all_mounted_volumes; i != NULL; i = g_slist_next (i)) {