API break request



If you get a password dialog from libgnomeui nautilus thinks this means
the open took a long time, so it opens a cancel dialog. There really is
no perfect way to fix this, so i've gone for the hack fix. It requires
an api addition to libgnomeui though, so I need to ask for permission to
add it.

Here is the libgnomeui patch:

Index: libgnomeui/gnome-authentication-manager.c
===================================================================
RCS file: /cvs/gnome/libgnomeui/libgnomeui/gnome-authentication-manager.c,v
retrieving revision 1.11
diff -u -p -r1.11 gnome-authentication-manager.c
--- libgnomeui/gnome-authentication-manager.c	24 Jun 2004 14:40:01 -0000	1.11
+++ libgnomeui/gnome-authentication-manager.c	24 Aug 2004 14:41:39 -0000
@@ -51,6 +51,14 @@
 #define DEBUG_MSG(x)
 #endif
 
+static int gnome_authentication_manager_dialog_visible = 0;
+
+gboolean
+gnome_authentication_manager_dialog_is_visible (void)
+{
+	return gnome_authentication_manager_dialog_visible > 0;
+}
+
 static GnomePasswordDialog *
 construct_password_dialog (gboolean is_proxy_authentication, const GnomeVFSModuleCallbackAuthenticationIn *in_args)
 {
@@ -148,6 +156,7 @@ authentication_dialog_destroyed (GtkDial
 {
 	DEBUG_MSG (("+%s\n", G_GNUC_FUNCTION));
 
+	gnome_authentication_manager_dialog_visible--;
 	mark_callback_completed (info);	
 }
 
@@ -187,6 +196,8 @@ present_authentication_dialog_nonblockin
 
 	gtk_widget_show (GTK_WIDGET (dialog));
 
+	gnome_authentication_manager_dialog_visible++;
+	
 	return 0;
 }
 
@@ -395,6 +406,7 @@ full_authentication_dialog_destroyed (Gt
 
 	info->response (info->response_data);
 	g_free (info);
+	gnome_authentication_manager_dialog_visible--;
 }
 
 static gint /* GtkFunction */
@@ -433,6 +445,8 @@ present_full_authentication_dialog_nonbl
 
 	gtk_widget_show (GTK_WIDGET (dialog));
 
+	gnome_authentication_manager_dialog_visible++;
+	
 	return 0;
 }
 
@@ -752,6 +766,7 @@ question_dialog_destroyed (GtkDialog *di
 {
 	info->response (info->response_data);
 	g_free (info);
+	gnome_authentication_manager_dialog_visible--;
 }
 
 static void
@@ -813,6 +828,8 @@ present_question_dialog_nonblocking (Que
 			  G_CALLBACK (question_dialog_destroyed), info);
 	
 	gtk_widget_show (GTK_WIDGET (dialog));
+
+	gnome_authentication_manager_dialog_visible++;
 	return 0;
 }
 
Index: libgnomeui/gnome-authentication-manager.h
===================================================================
RCS file: /cvs/gnome/libgnomeui/libgnomeui/gnome-authentication-manager.h,v
retrieving revision 1.1
diff -u -p -r1.1 gnome-authentication-manager.h
--- libgnomeui/gnome-authentication-manager.h	26 May 2003 16:03:38 -0000	1.1
+++ libgnomeui/gnome-authentication-manager.h	24 Aug 2004 14:41:39 -0000
@@ -25,6 +25,10 @@
 #ifndef GNOME_AUTHENTICATION_MANAGER_H
 #define GNOME_AUTHENTICATION_MANAGER_H
 
+#include <glib.h>
+
 void 	gnome_authentication_manager_init (void);
+
+gboolean gnome_authentication_manager_dialog_is_visible (void);
 
 #endif /* GNOME_AUTHENTICATION_MANAGER_H */



=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a maverick pirate shaman She's a disco-crazy goth Hell's Angel with a 
knack for trouble. They fight crime! 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]