2012-06-02 [wwp] 3.8.0cvs53
authorTristan Chabredier <wwp@claws-mail.org>
Sat, 2 Jun 2012 09:29:29 +0000 (09:29 +0000)
committerTristan Chabredier <wwp@claws-mail.org>
Sat, 2 Jun 2012 09:29:29 +0000 (09:29 +0000)
* src/gtk/progressdialog.c
Add a hide button to the retrieve/send progress dialogs. WM's close button
now hides (as well as pressing Esc) instead of doing nothing.

ChangeLog
PATCHSETS
configure.ac
src/gtk/progressdialog.c

index 5084da0..a5a983d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-06-02 [wwp]       3.8.0cvs53
+
+       * src/gtk/progressdialog.c
+               Add a hide button to the retrieve/send progress dialogs. WM's close button
+               now hides (as well as pressing Esc) instead of doing nothing.
+
 2012-06-02 [wwp]       3.8.0cvs52
 
        * doc/man/claws-mail.1
index 272c0a4..b05d757 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.382.2.601 -r 1.382.2.602 src/compose.c;  cvs diff -u -r 1.274.2.345 -r 1.274.2.346 src/mainwindow.c;  cvs diff -u -r 1.94.2.232 -r 1.94.2.233 src/messageview.c;  ) > 3.8.0cvs50.patchset
 ( cvs diff -u -r 1.382.2.602 -r 1.382.2.603 src/compose.c;  ) > 3.8.0cvs51.patchset
 ( cvs diff -u -r 1.1.2.9 -r 1.1.2.10 doc/man/claws-mail.1;  cvs diff -u -r 1.115.2.249 -r 1.115.2.250 src/main.c;  cvs diff -u -r 1.7.2.20 -r 1.7.2.21 src/main.h;  cvs diff -u -r 1.149.2.106 -r 1.149.2.107 src/inc.c;  cvs diff -u -r 1.150.2.123 -r 1.150.2.124 src/procmsg.c;  cvs diff -u -r 1.4.2.83 -r 1.4.2.84 src/gtk/about.c;  ) > 3.8.0cvs52.patchset
+( cvs diff -u -r 1.1.4.31 -r 1.1.4.32 src/gtk/progressdialog.c;  ) > 3.8.0cvs53.patchset
index 84f1d05..e570420 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=8
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=52
+EXTRA_VERSION=53
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index d315e78..e7a5268 100644 (file)
@@ -43,6 +43,9 @@ static gint progress_dialog_insert_account(ProgressDialog *progress,
                                           const gchar    *status,
                                           GdkPixbuf      *image);
 
+static void progress_dialog_hide_btn_cb(GtkWidget *widget, gpointer data);
+static void progress_dialog_delete_event_btn_cb(GtkWidget *widget, gpointer data);
+
 ProgressDialog *progress_dialog_create(void)
 {
        ProgressDialog *progress;
@@ -50,6 +53,7 @@ ProgressDialog *progress_dialog_create(void)
        GtkWidget *hbox;
        GtkWidget *vbox;
        GtkWidget *label;
+       GtkWidget *hide_btn;
        GtkWidget *showlog_btn;
        GtkWidget *cancel_btn;
        GtkWidget *progressbar;
@@ -82,6 +86,9 @@ ProgressDialog *progress_dialog_create(void)
        gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 8);
        gtk_widget_show(label);
 
+       hide_btn = gtk_dialog_add_button(GTK_DIALOG(dialog),
+                                          _("_Hide"),
+                                          GTK_RESPONSE_NONE);
        showlog_btn = gtk_dialog_add_button(GTK_DIALOG(dialog),
                                           _("_View log"),
                                           GTK_RESPONSE_NONE);
@@ -142,7 +149,13 @@ ProgressDialog *progress_dialog_create(void)
        gtk_tree_view_column_set_resizable(column, TRUE);
        gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED);
        gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column);
-       
+
+       /* the WM close and hide buttons are handled internally and not published to caller */
+       g_signal_connect(G_OBJECT(dialog), "delete_event",
+                               G_CALLBACK(progress_dialog_delete_event_btn_cb), NULL);
+       g_signal_connect(G_OBJECT(hide_btn), "clicked",
+                               G_CALLBACK(progress_dialog_hide_btn_cb), dialog);
+
        progress->window      = dialog;
        progress->label       = label;
        progress->showlog_btn  = showlog_btn;
@@ -260,3 +273,13 @@ static gint progress_dialog_insert_account(ProgressDialog *progress,
 
        return result;
 }
+
+static void progress_dialog_hide_btn_cb(GtkWidget *widget, gpointer data)
+{
+               gtk_widget_hide(GTK_WIDGET(data));
+}
+
+static void progress_dialog_delete_event_btn_cb(GtkWidget *widget, gpointer data)
+{
+               gtk_widget_hide(widget);
+}