[gnome-bluetooth] Make the error alert when gnome-file-share-properties can't be spawned compliant with GNOME HIG
- From: Bastien Nocera <hadess src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth] Make the error alert when gnome-file-share-properties can't be spawned compliant with GNOME HIG
- Date: Fri, 1 Jan 2010 12:45:16 +0000 (UTC)
commit 0af90ffbcad6aef5c67c9c6fd52bd3e6ea3deb50
Author: Daniele Forsi <daniele forsi it>
Date: Tue Dec 29 00:23:53 2009 +0100
Make the error alert when gnome-file-share-properties can't be spawned compliant with GNOME HIG
Use a GtkMessageDialog with gtk_message_dialog_format_secondary_text (),
which is available since GTK+ 2.6.
https://bugzilla.gnome.org/show_bug.cgi?id=605635
properties/main.c | 26 ++++++++------------------
1 files changed, 8 insertions(+), 18 deletions(-)
---
diff --git a/properties/main.c b/properties/main.c
index b914e0d..a6754f2 100644
--- a/properties/main.c
+++ b/properties/main.c
@@ -78,32 +78,22 @@ static void close_callback(GtkWidget *button, gpointer user_data)
static void
receive_callback (GtkWidget *item, GtkWindow *window)
{
- GtkWidget *dialog, *hbox, *image, *label;
+ GtkWidget *dialog;
const char *command = "gnome-file-share-properties";
if (!g_spawn_command_line_async(command, NULL)) {
/* translators:
* This is the name of the preferences dialogue for gnome-user-share */
- dialog = gtk_dialog_new_with_buttons(_("Cannot start \"Personal File Sharing\" Preferences"), window,
- GTK_DIALOG_NO_SEPARATOR,
- GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL);
-
- hbox = gtk_hbox_new (FALSE, 4);
-
- image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_ERROR, GTK_ICON_SIZE_MENU);
- gtk_box_pack_start(GTK_BOX (hbox), image, FALSE, FALSE, 4);
+ dialog = gtk_message_dialog_new (window,
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_CLOSE,
+ _("Cannot start \"Personal File Sharing\" Preferences"));
/* translators:
* This is the name of the preferences dialogue for gnome-user-share */
- label = gtk_label_new (_("Please verify that the \"Personal File Sharing\" program is correctly installed."));
- gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
- gtk_box_pack_start(GTK_BOX (hbox), label, TRUE, TRUE, 4);
-
- gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 2);
-
- gtk_widget_show_all(hbox);
- gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
- gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), hbox);
+ gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
+ _("Please verify that the \"Personal File Sharing\" program is correctly installed."));
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]