seahorse r2574 - in trunk: . gkr



Author: sadam
Date: Sat Oct 11 20:59:22 2008
New Revision: 2574
URL: http://svn.gnome.org/viewvc/seahorse?rev=2574&view=rev

Log:
2008-10-11  Adam Schreiber  <sadam clemson edu>

    * gkr/Makefile.am:
    * gkr/seahorse-gkr-commands.c:
    * gkr/seahorse-gkr-commands.vala:
    * gkr/vala-build.stamp: Use ngettext. Fixes bug #554933


Modified:
   trunk/ChangeLog
   trunk/gkr/Makefile.am
   trunk/gkr/seahorse-gkr-commands.c
   trunk/gkr/seahorse-gkr-commands.vala
   trunk/gkr/vala-build.stamp

Modified: trunk/gkr/Makefile.am
==============================================================================
--- trunk/gkr/Makefile.am	(original)
+++ trunk/gkr/Makefile.am	Sat Oct 11 20:59:22 2008
@@ -21,6 +21,7 @@
 
 VALA_VAPIS = \
 	libseahorse-gkr-c.vapi \
+	$(top_srcdir)/bugs.vapi \
 	$(top_srcdir)/config.vapi \
 	$(top_srcdir)/libseahorse/libseahorse-c.vapi \
 	$(top_srcdir)/libseahorse/libseahorse.vapi

Modified: trunk/gkr/seahorse-gkr-commands.c
==============================================================================
--- trunk/gkr/seahorse-gkr-commands.c	(original)
+++ trunk/gkr/seahorse-gkr-commands.c	Sat Oct 11 20:59:22 2008
@@ -63,7 +63,8 @@
 	SeahorseGKeyringCommands * self;
 	guint num;
 	char* prompt;
-	SeahorseOperation* _tmp4;
+	char* _tmp1;
+	SeahorseOperation* _tmp3;
 	self = SEAHORSE_GKEYRING_COMMANDS (base);
 	g_return_val_if_fail (keys != NULL, NULL);
 	num = g_list_length (keys);
@@ -71,22 +72,15 @@
 		return NULL;
 	}
 	prompt = NULL;
-	if (num == 1) {
-		char* _tmp1;
-		_tmp1 = NULL;
-		prompt = (_tmp1 = g_strdup_printf (_ ("Are you sure you want to delete the password '%s'?"), seahorse_object_get_display_name (((SeahorseObject*) (((SeahorseObject*) (keys->data)))))), (prompt = (g_free (prompt), NULL)), _tmp1);
-	} else {
-		char* _tmp2;
-		_tmp2 = NULL;
-		prompt = (_tmp2 = g_strdup_printf (_ ("Are you sure you want to delete %d passwords?"), num), (prompt = (g_free (prompt), NULL)), _tmp2);
-	}
+	_tmp1 = NULL;
+	prompt = (_tmp1 = g_strdup_printf (ngettext ("Are you sure you want to delete the password '%s'?", "Are you sure you want to delete %d passwords?", ((gint) (num))), num), (prompt = (g_free (prompt), NULL)), _tmp1);
 	if (!seahorse_util_prompt_delete (prompt, GTK_WIDGET (seahorse_view_get_window (seahorse_commands_get_view (SEAHORSE_COMMANDS (self)))))) {
-		SeahorseOperation* _tmp3;
-		_tmp3 = NULL;
-		return (_tmp3 = NULL, (prompt = (g_free (prompt), NULL)), _tmp3);
+		SeahorseOperation* _tmp2;
+		_tmp2 = NULL;
+		return (_tmp2 = NULL, (prompt = (g_free (prompt), NULL)), _tmp2);
 	}
-	_tmp4 = NULL;
-	return (_tmp4 = seahorse_source_delete_objects (keys), (prompt = (g_free (prompt), NULL)), _tmp4);
+	_tmp3 = NULL;
+	return (_tmp3 = seahorse_source_delete_objects (keys), (prompt = (g_free (prompt), NULL)), _tmp3);
 }
 
 

Modified: trunk/gkr/seahorse-gkr-commands.vala
==============================================================================
--- trunk/gkr/seahorse-gkr-commands.vala	(original)
+++ trunk/gkr/seahorse-gkr-commands.vala	Sat Oct 11 20:59:22 2008
@@ -59,10 +59,9 @@
 				return null;
 			
 			string prompt;
-			if (num == 1)
-				prompt = _("Are you sure you want to delete the password '%s'?").printf(keys.data.display_name);
-			else
-				prompt = _("Are you sure you want to delete %d passwords?").printf(num);
+			
+			prompt = Bugs.ngettext ("Are you sure you want to delete the password '%s'?", 
+			                   "Are you sure you want to delete %d passwords?", (int) num).printf (num);
 			
 			if (!Util.prompt_delete (prompt, view.window))
 				return null;

Modified: trunk/gkr/vala-build.stamp
==============================================================================
--- trunk/gkr/vala-build.stamp	(original)
+++ trunk/gkr/vala-build.stamp	Sat Oct 11 20:59:22 2008
@@ -1 +1 @@
-1221098971
+1223758482



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