From 805d3406f17cf8d85927bf8f230a4a34b61f031c Mon Sep 17 00:00:00 2001 From: Jens Granseuer Date: Thu, 19 Feb 2009 19:36:54 +0000 Subject: fix message markup appearing in dialog (bug #572453) 2009-02-19 Jens Granseuer * theme-installer.c: (gnome_theme_install_real): fix message markup appearing in dialog (bug #572453) svn path=/trunk/; revision=9277 --- capplets/appearance/ChangeLog | 5 +++++ capplets/appearance/theme-installer.c | 17 ++++++----------- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'capplets/appearance') diff --git a/capplets/appearance/ChangeLog b/capplets/appearance/ChangeLog index 3085d690d..bb53a8ea4 100644 --- a/capplets/appearance/ChangeLog +++ b/capplets/appearance/ChangeLog @@ -1,3 +1,8 @@ +2009-02-19 Jens Granseuer + + * theme-installer.c: (gnome_theme_install_real): fix message markup + appearing in dialog (bug #572453) + ==================== 2.25.90 ==================== 2009-01-28 Luca Ferretti diff --git a/capplets/appearance/theme-installer.c b/capplets/appearance/theme-installer.c index 412e431f8..285d44e91 100644 --- a/capplets/appearance/theme-installer.c +++ b/capplets/appearance/theme-installer.c @@ -270,7 +270,6 @@ gnome_theme_install_real (gint filetype, const gchar *tmp_dir, const gchar *them GFile *theme_source_dir, *theme_dest_dir; GError *error = NULL; gint theme_type; - gchar *user_message = NULL; gchar *target_dir = NULL; /* What type of theme is it? */ @@ -287,8 +286,6 @@ gnome_theme_install_real (gint filetype, const gchar *tmp_dir, const gchar *them target_dir = g_build_path (G_DIR_SEPARATOR_S, g_get_home_dir (), ".themes", theme_name, NULL); - user_message = g_strdup_printf (_("GNOME Theme %s correctly installed"), - theme_name); break; case THEME_METACITY: case THEME_GTK: @@ -386,19 +383,18 @@ gnome_theme_install_real (gint filetype, const gchar *tmp_dir, const gchar *them if (ask_user) { /* Ask to apply theme (if we can) */ - if ((theme_type == THEME_GTK || theme_type == THEME_METACITY || + if (theme_type == THEME_GTK || theme_type == THEME_METACITY || theme_type == THEME_ICON || theme_type == THEME_CURSOR || - theme_type == THEME_ICON_CURSOR) && ask_user) + theme_type == THEME_ICON_CURSOR) { /* TODO: currently cannot apply "gnome themes" */ gchar *str; str = g_strdup_printf (_("The theme \"%s\" has been installed."), theme_name); - user_message = g_strdup_printf ("%s", str); + dialog = gtk_message_dialog_new_with_markup (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_NONE, + "%s", str); g_free (str); - dialog = gtk_message_dialog_new_with_markup (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_NONE, "%s", user_message); - gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), _("Would you like to apply it now, or keep your current theme?")); gtk_dialog_add_button (GTK_DIALOG (dialog), _("Keep Current Theme"), GTK_RESPONSE_CLOSE); @@ -447,15 +443,14 @@ gnome_theme_install_real (gint filetype, const gchar *tmp_dir, const gchar *them GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, - "%s", - user_message); + _("GNOME Theme %s correctly installed"), + theme_name); gtk_dialog_run (GTK_DIALOG (dialog)); } gtk_widget_destroy (dialog); } } - g_free (user_message); g_free (target_dir); return success; -- cgit v1.2.1