2007-02-11 [colin] 2.7.2cvs41
[claws.git] / src / alertpanel.c
index 482fb336ccf5a8d9c70dc3b38f9907d1d0c9ada4..c1cafe6389d649d9363cde29d728fe7cbc9c5512 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2006 Hiroyuki Yamamoto and the Sylpheed-Claws team
+ * Copyright (C) 1999-2007 Hiroyuki Yamamoto and the Claws Mail team
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -157,7 +157,7 @@ void alertpanel_warning(const gchar *format, ...)
 void alertpanel_error(const gchar *format, ...)
 {
        va_list args;
-       gchar buf[256];
+       gchar buf[512];
 
        va_start(args, format);
        g_vsnprintf(buf, sizeof(buf), format, args);
@@ -230,18 +230,19 @@ static void alertpanel_create(const gchar *title,
        GtkWidget *label;
        GtkWidget *hbox;
        GtkWidget *vbox;
-       GtkWidget *disable_chkbtn;
+       GtkWidget *disable_checkbtn;
        GtkWidget *confirm_area;
        GtkWidget *button1;
        GtkWidget *button2;
        GtkWidget *button3;
        const gchar *label2;
        const gchar *label3;
-       
+       gchar *tmp = title?g_markup_printf_escaped("%s", title)
+                       :g_strdup("");
        gchar *title_full = g_strdup_printf("<span weight=\"bold\" "
                                "size=\"larger\">%s</span>",
-                               title?title:"");
-
+                               tmp);
+       g_free(tmp);
        debug_print("Creating alert panel dialog...\n");
 
        dialog = gtk_dialog_new();
@@ -334,13 +335,13 @@ static void alertpanel_create(const gchar *title,
                gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), hbox,
                                   FALSE, FALSE, 0);
 
-               disable_chkbtn = gtk_check_button_new_with_label
+               disable_checkbtn = gtk_check_button_new_with_label
                        (_("Show this message next time"));
-               gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(disable_chkbtn),
+               gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(disable_checkbtn),
                                             TRUE);
-               gtk_box_pack_start(GTK_BOX(hbox), disable_chkbtn,
+               gtk_box_pack_start(GTK_BOX(hbox), disable_checkbtn,
                                   FALSE, FALSE, 12);
-               g_signal_connect(G_OBJECT(disable_chkbtn), "toggled",
+               g_signal_connect(G_OBJECT(disable_checkbtn), "toggled",
                                 G_CALLBACK(alertpanel_button_toggled),
                                 GUINT_TO_POINTER(G_ALERTDISABLE));
        }