summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Amit Chaudhuri <amit.k.chaudhuri@gmail.com>2013-03-14 17:54:06 +0000
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-03-14 11:30:23 -0700
commitd6e77cd1682e6396bd5c63a9c7e5dcc9fa6a7809 (patch)
tree9724f8d2ca8946cc40f46ea595e3f836d72874c9
parent03c21b0a92d52fe25c97b9a846294e366a930603 (diff)
downloadsubsurface-d6e77cd1682e6396bd5c63a9c7e5dcc9fa6a7809.tar.gz
Fix bug in colour print initialisation.
The callback function for switching colour printing on/off was registered after the initial activation of the button. This meant the first attempt to print was compromised. We move the registration so that printing works as the user specifies from the first attempt. Tested by printing both B/W and colour images to file with minimal mouse clicks. Spotted by Salva - thanks. Signed-off-by: Amit Chaudhuri <amit.k.chaudhuri@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--print.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/print.c b/print.c
index a015a4e18..9ea097843 100644
--- a/print.c
+++ b/print.c
@@ -924,10 +924,10 @@ static GtkWidget *print_dialog(GtkPrintOperation *operation, gpointer user_data)
G_CALLBACK(print_selection_toggle), NULL);
GtkWidget *colorButton;
colorButton = gtk_check_button_new_with_label(_("Print in color"));
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(colorButton),TRUE);
- gtk_box_pack_start(GTK_BOX(box), colorButton, FALSE, FALSE, 2);
g_signal_connect(G_OBJECT(colorButton), "toggled",
G_CALLBACK(color_selection_toggle), NULL);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(colorButton),TRUE);
+ gtk_box_pack_start(GTK_BOX(box), colorButton, FALSE, FALSE, 2);
}
gtk_widget_show_all(vbox);