r15328 - in /desktop/experimental/nautilus/debian: changelog patches/90_from_svn_mount_connect_to_server_locations.patch patches/series

slomo at users.alioth.debian.org slomo at users.alioth.debian.org
Wed Mar 19 15:22:55 UTC 2008


Author: slomo
Date: Wed Mar 19 15:22:55 2008
New Revision: 15328

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=15328
Log:
* 90_from_svn_mount_connect_to_server_locations.patch, Added. Mounts location
  in the connect to server dialog. Patch taken from the Ubuntu package.

Added:
    desktop/experimental/nautilus/debian/patches/90_from_svn_mount_connect_to_server_locations.patch
Modified:
    desktop/experimental/nautilus/debian/changelog
    desktop/experimental/nautilus/debian/patches/series

Modified: desktop/experimental/nautilus/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/nautilus/debian/changelog?rev=15328&op=diff
==============================================================================
--- desktop/experimental/nautilus/debian/changelog (original)
+++ desktop/experimental/nautilus/debian/changelog Wed Mar 19 15:22:55 2008
@@ -10,8 +10,10 @@
     for thrash:// for example or when the filesystem uses something else
     than UTF8 as encoding (%XX stuff in the title).
     See http://bugzilla.gnome.org/show_bug.cgi?id=142087
-
- -- Sebastian Dröge <slomo at debian.org>  Wed, 19 Mar 2008 14:15:10 +0100
+  * 90_from_svn_mount_connect_to_server_locations.patch, Added. Mounts location
+    in the connect to server dialog. Patch taken from the Ubuntu package.
+
+ -- Sebastian Dröge <slomo at debian.org>  Wed, 19 Mar 2008 16:22:08 +0100
 
 nautilus (2.22.0-2) experimental; urgency=low
 

Added: desktop/experimental/nautilus/debian/patches/90_from_svn_mount_connect_to_server_locations.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/nautilus/debian/patches/90_from_svn_mount_connect_to_server_locations.patch?rev=15328&op=file
==============================================================================
--- desktop/experimental/nautilus/debian/patches/90_from_svn_mount_connect_to_server_locations.patch (added)
+++ desktop/experimental/nautilus/debian/patches/90_from_svn_mount_connect_to_server_locations.patch Wed Mar 19 15:22:55 2008
@@ -1,0 +1,182 @@
+--- trunk/src/nautilus-connect-server-dialog.c	2008/03/16 20:53:43	13948
++++ trunk/src/nautilus-connect-server-dialog.c	2008/03/17 11:47:59	13949
+@@ -325,10 +325,6 @@
+ 	nautilus_connect_server_dialog_present_uri (dialog->details->application,
+ 						    location,
+ 						    GTK_WIDGET (dialog));
+-
+-	g_object_unref (location);
+-
+-	gtk_widget_destroy (GTK_WIDGET (dialog));
+ }
+ 
+ static void
+--- trunk/src/nautilus-connect-server-dialog-main.c	2008/03/16 20:53:43	13948
++++ trunk/src/nautilus-connect-server-dialog-main.c	2008/03/17 11:47:59	13949
+@@ -38,6 +38,7 @@
+ #include <eel/eel-app-launch-context.h>
+ #include <eel/eel-preferences.h>
+ #include <eel/eel-stock-dialogs.h>
++#include <eel/eel-mount-operation.h>
+ 
+ #include <libnautilus-private/nautilus-icon-names.h>
+ 
+@@ -47,27 +48,60 @@
+ static int open_dialogs;
+ 
+ static void
+-dialog_destroyed (GtkWidget *widget,
+-		  gpointer   user_data)
++main_dialog_destroyed (GtkWidget *widget,
++		       gpointer   user_data)
++{
++	/* this only happens when user clicks "cancel"
++	 * on the main dialog or when we are all done.
++	 */
++	gtk_main_quit ();
++}
++
++static void
++error_dialog_destroyed (GtkWidget *widget,
++			GtkWidget *main_dialog)
+ {
+ 	if (--open_dialogs <= 0)
+-		gtk_main_quit ();
++		gtk_widget_destroy (main_dialog);
+ }
+ 
+ static void
+-show_uri (const char *uri,
+-	  GdkScreen  *screen)
++display_error_dialog (GError *error, 
++		      const char *uri,
++		      GtkWidget *parent)
+ {
+ 	GtkDialog *error_dialog;
++	char *error_message;
++
++	error_message = g_strdup_printf (_("Can't display location \"%s\""),
++					 uri);
++	error_dialog = eel_show_error_dialog (error_message,
++					      error->message,
++					      NULL);
++
++	open_dialogs++;
++
++	g_signal_connect (error_dialog, "destroy",
++			  G_CALLBACK (error_dialog_destroyed), parent);
++
++	gtk_window_set_screen (GTK_WINDOW (error_dialog),
++			       gtk_widget_get_screen (parent));
++
++	g_free (error_message);
++}
++
++static void
++show_uri (const char *uri,
++	  GtkWidget  *widget)
++{
+ 	GError    *error;
+-	char      *error_message;
+ 	EelAppLaunchContext *launch_context;
+ 
+ 	launch_context = eel_app_launch_context_new ();
+-	eel_app_launch_context_set_screen (launch_context, screen);
++	eel_app_launch_context_set_screen (launch_context,
++					   gtk_widget_get_screen (widget));
+ 
+ 	error = NULL;
+-	/* FIXME: doesn't automount */
+ 	g_app_info_launch_default_for_uri (uri,
+ 					   G_APP_LAUNCH_CONTEXT (launch_context),
+ 					   &error);
+@@ -75,35 +109,48 @@
+ 	g_object_unref (launch_context);
+ 
+ 	if (error) {
+-		error_message = g_strdup_printf (_("Can't display location \"%s\""),
+-						 uri);
+-
+-		error_dialog = eel_show_error_dialog (error_message,
+-						      error->message,
+-						      NULL);
+-
+-		open_dialogs++;
+-
+-		g_signal_connect (error_dialog, "destroy",
+-				  G_CALLBACK (dialog_destroyed), NULL);
+-
+-		gtk_window_set_screen (GTK_WINDOW (error_dialog), screen);
+-
++		display_error_dialog (error, uri, widget);
+ 		g_error_free (error);
+-		g_free (error_message);
++	} else {
++		/* everything is OK, destroy the main dialog and quit */
++		gtk_widget_destroy (widget);
+ 	}
+ }
+ 
++static void
++mount_enclosing_ready_cb (GFile *location,
++			  GAsyncResult *res,
++			  GtkWidget *widget)
++{
++	char *uri;
++	GError *error = NULL;
++	
++	g_file_mount_enclosing_volume_finish (location,
++					      res, &error);
++	uri = g_file_get_uri (location);
++	if (error) {
++		display_error_dialog (error, uri, widget);
++	} else {
++		/* volume is mounted, show it */
++		show_uri (uri, widget);
++		g_object_unref (location);
++	}
++	g_free (uri);
++}
++
+ void
+ nautilus_connect_server_dialog_present_uri (NautilusApplication *application,
+ 					    GFile *location,
+ 					    GtkWidget *widget)
+ {
+-	char *uri;
++	GMountOperation *op;
+ 
+-	uri = g_file_get_uri (location);
+-	show_uri (uri, gtk_widget_get_screen (widget));
+-	g_free (uri);
++	op = eel_mount_operation_new (GTK_WINDOW (widget));
++	g_file_mount_enclosing_volume (location,
++				       0, op,
++				       NULL,
++				       (GAsyncReadyCallback) mount_enclosing_ready_cb,
++				       widget);
+ }
+ 
+ int
+@@ -155,9 +202,9 @@
+ 		g_object_unref (location);
+ 	}
+ 
+-	open_dialogs = 1;
++	open_dialogs = 0;
+ 	g_signal_connect (dialog, "destroy",
+-			  G_CALLBACK (dialog_destroyed), NULL);
++			  G_CALLBACK (main_dialog_destroyed), NULL);
+ 
+ 	gtk_widget_show (dialog);
+ 
+--- trunk/src/nautilus-connect-server-dialog-nonmain.c	2008/03/16 20:53:43	13948
++++ trunk/src/nautilus-connect-server-dialog-nonmain.c	2008/03/17 11:47:59	13949
+@@ -50,4 +50,7 @@
+ 							     location,
+ 							     gtk_widget_get_screen (widget));
+ 	}
++
++	gtk_widget_destroy (widget);
++	g_object_unref (location);
+ }

Modified: desktop/experimental/nautilus/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/nautilus/debian/patches/series?rev=15328&op=diff
==============================================================================
--- desktop/experimental/nautilus/debian/patches/series (original)
+++ desktop/experimental/nautilus/debian/patches/series Wed Mar 19 15:22:55 2008
@@ -7,4 +7,5 @@
 14_sidebar_network-protocol.patch
 15_tracker_check.patch
 90_from_svn_fix_changing_default_application.patch
+90_from_svn_mount_connect_to_server_locations.patch
 99_ltmain_as-needed.patch -p0




More information about the pkg-gnome-commits mailing list