[nautilus-actions] Fix #592781: use explicit format strings



commit c1113058d1b9e45853df5abf6825e056609a98e3
Author: Pierre Wieser <pwieser trychlos org>
Date:   Sun Aug 23 11:10:59 2009 +0200

    Fix #592781: use explicit format strings

 ChangeLog                   |    5 +++++
 NEWS                        |   17 +++++++++++++++++
 src/nact/base-application.c |    9 +++++----
 3 files changed, 27 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index aaa4951..690e858 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-08-23 Pierre Wieser <pwieser trychlos org>
+
+	* src/nact/base-application.c:
+	Fix #592781: use explicit format strings.
+
 2009-08-21 Pierre Wieser <pwieser trychlos org>
 
 	Add About Nautilus Actions item in Nautilus context menu.
diff --git a/NEWS b/NEWS
index 3db7788..68168ff 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,20 @@
+Version xxxxxx
+==============
+
+	Release date
+
+	Displays actions as a submenu of Nautilus context menu.
+
+	Bugfixes
+
+		#592781 reported by Jerome Krausz (use explicit format string)
+
+	Various code enhancements
+
+		BaseApplication base class has been rewritten to get a cleaner api.
+
+	New and updated translations
+
 Version 1.12.0
 ==============
 
diff --git a/src/nact/base-application.c b/src/nact/base-application.c
index 5a32429..62402a1 100644
--- a/src/nact/base-application.c
+++ b/src/nact/base-application.c
@@ -574,7 +574,7 @@ BaseWindow *
 base_application_get_main_window( BaseApplication *application )
 {
 	static const gchar *thisfn = "base_application_get_main_window";
-	g_debug( "%s: icon=%p", thisfn, application );
+	g_debug( "%s: application=%p", thisfn, application );
 
 	g_assert( BASE_IS_APPLICATION( application ));
 
@@ -1003,10 +1003,10 @@ display_dlg( BaseApplication *application, GtkMessageType type_message, GtkButto
 {
 	g_assert( BASE_IS_APPLICATION( application ));
 
-	GtkWidget *dialog = gtk_message_dialog_new( NULL, GTK_DIALOG_MODAL, type_message, type_buttons, first );
+	GtkWidget *dialog = gtk_message_dialog_new( NULL, GTK_DIALOG_MODAL, type_message, type_buttons, "%s", first );
 
-	if( second && strlen( second )){
-		gtk_message_dialog_format_secondary_text( GTK_MESSAGE_DIALOG( dialog ), second );
+	if( second && g_utf8_strlen( second, -1 )){
+		gtk_message_dialog_format_secondary_text( GTK_MESSAGE_DIALOG( dialog ), "%s", second );
 	}
 
 	const gchar *name = g_get_application_name();
@@ -1086,6 +1086,7 @@ set_get_dialog_error( BaseApplication *application, const gchar *dialog )
 	application->private->exit_code = APPLICATION_ERROR_DIALOG_LOAD;
 
 	gchar *fname = base_application_get_ui_filename( application );
+
 	gchar *msg = g_strdup_printf(
 			/* i18n: unable to load <dialog_name> dialog from XML definition in <filename> */
 			_( "Unable to load %s dialog from XML definition in %s." ), dialog, fname );



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