[evolution-patches] UI-HACKFEST: Confirmation dialog for forget passwords



Hi,

Attached patch will bring in a confirmation dialog before forgetting
passwords.

The changes are made under the evolution/shell folder.

Thanks,
Sankar P
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/shell/ChangeLog,v
retrieving revision 1.1529
diff -u -p -r1.1529 ChangeLog
--- ChangeLog	13 Jul 2005 10:37:35 -0000	1.1529
+++ ChangeLog	21 Jul 2005 06:43:48 -0000
@@ -1,3 +1,11 @@
+2005-07-21  Sankar P  <psankar novell com>
+
+	* shell.error.xml : Added string for forget password prompt.
+
+	* e-shell-window-commands.c: (command_forget_passwords)
+	Added call to a confirmation dialog before forgetting passwords.
+	Fixes bug #216021
+	
 2005-07-07  Kjartan Maraas  <kmaraas gnome org>
 
 	* e-shell-window.c: (setup_widgets): Free the style here.
Index: e-shell-window-commands.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-shell-window-commands.c,v
retrieving revision 1.35
diff -u -p -r1.35 e-shell-window-commands.c
--- e-shell-window-commands.c	24 Jun 2005 10:56:29 -0000	1.35
+++ e-shell-window-commands.c	21 Jul 2005 06:43:48 -0000
@@ -33,6 +33,7 @@
 
 #include "e-util/e-icon-factory.h"
 #include "e-util/e-dialog-utils.h"
+#include "e-util/e-error.h"
 
 #include <glib/gprintf.h>
 
@@ -648,7 +649,8 @@ command_forget_passwords (BonoboUICompon
 			  void *data,
 			  const char *path)
 {
-	e_passwords_forget_passwords();
+	if (e_error_run (NULL, "shell:forget-passwords", NULL) == GTK_RESPONSE_YES) 
+		e_passwords_forget_passwords();
 }
 
 /* Tools menu.  */
Index: shell.error.xml
===================================================================
RCS file: /cvs/gnome/evolution/shell/shell.error.xml,v
retrieving revision 1.2
diff -u -p -r1.2 shell.error.xml
--- shell.error.xml	12 Jul 2005 04:04:13 -0000	1.2
+++ shell.error.xml	21 Jul 2005 06:43:48 -0000
@@ -73,4 +73,10 @@ Click help for details.</_secondary>
   <button stock="gtk-quit" response="GTK_RESPONSE_CANCEL"/>
  </error>
 
+ <error id="forget-passwords" type="question" default="GTK_RESPONSE_YES">
+  <_primary>Are you sure you want to forget the passwords?</_primary>
+  <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
+  <button _label="_Forget" response="GTK_RESPONSE_YES"/>
+ </error>
+ 
 </error-list>


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