talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit e08ea0a07308080a622a01b2f793774d918ff4e1
parent 09775efd07295f8e79550c5fb93580f9d3dd590a
Author: Tristan Chabredier <wwp@claws-mail.org>
Date:   Sat,  2 Jun 2012 09:29:29 +0000

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.

Diffstat:
MChangeLog | 6++++++
MPATCHSETS | 1+
Mconfigure.ac | 2+-
Msrc/gtk/progressdialog.c | 25++++++++++++++++++++++++-
4 files changed, 32 insertions(+), 2 deletions(-)

diff --git 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 diff --git a/PATCHSETS b/PATCHSETS @@ -4369,3 +4369,4 @@ ( 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 diff --git a/configure.ac b/configure.ac @@ -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= diff --git a/src/gtk/progressdialog.c b/src/gtk/progressdialog.c @@ -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); +}