eel r2067 - in trunk: . eel



Author: carlosgc
Date: Fri Feb 22 09:35:01 2008
New Revision: 2067
URL: http://svn.gnome.org/viewvc/eel?rev=2067&view=rev

Log:
2008-02-22  Carlos Garcia Campos  <carlosgc gnome org>

	* eel/eel-mount-operation.c: (ask_question):
	Use the first line of the question message as primary text for the
	dialog so that it's formatted.



Modified:
   trunk/ChangeLog
   trunk/eel/eel-mount-operation.c

Modified: trunk/eel/eel-mount-operation.c
==============================================================================
--- trunk/eel/eel-mount-operation.c	(original)
+++ trunk/eel/eel-mount-operation.c	Fri Feb 22 09:35:01 2008
@@ -27,6 +27,7 @@
 #include "eel-mount-operation.h"
 #include <libgnomeui/gnome-password-dialog.h>
 #include <gtk/gtkmessagedialog.h>
+#include <string.h>
 
 #define I_(string) g_intern_static_string (string)
 
@@ -197,10 +198,24 @@
 {
 	GtkWidget *dialog;
 	int cnt, len;
+	char *primary;
+	const char *secondary = NULL;
+
+	primary = strstr (message, "\n");
+	if (primary) {
+		secondary = primary + 1;
+		primary = g_strndup (message, strlen (message) - strlen (primary));
+	}
 	
 	dialog = gtk_message_dialog_new (EEL_MOUNT_OPERATION (op)->priv->parent_window,
 					 0, GTK_MESSAGE_QUESTION,
-					 GTK_BUTTONS_NONE, "%s", message);
+					 GTK_BUTTONS_NONE, "%s", primary);
+	g_free (primary);
+
+	if (secondary) {
+		gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
+							  "%s", secondary);
+	}
 	
 	if (choices) {
 		/* First count the items in the list then 



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