summaryrefslogtreecommitdiff
path: root/gtk/gtkprintunixdialog.c
diff options
context:
space:
mode:
authorMarek Kasik <mkasik@redhat.com>2008-11-10 15:33:44 +0000
committerMarek Kašík <mkasik@src.gnome.org>2008-11-10 15:33:44 +0000
commit0212f0457cd86c706a3017bc513b289bb4edbccb (patch)
tree187203ad687301a59d36ae16148425875bf34e4f /gtk/gtkprintunixdialog.c
parent0a0f9eaf4801cfcb5ab9e1416ec08b46b7db8d5e (diff)
downloadgtk+-0212f0457cd86c706a3017bc513b289bb4edbccb.tar.gz
Bug 560135 - Print when the user double clicks a printer
2008-11-10 Marek Kasik <mkasik@redhat.com> Bug 560135 - Print when the user double clicks a printer * gtk/gtkprintunixdialog.c: add handling of double click to GtkPrintUnixDialog. svn path=/trunk/; revision=21775
Diffstat (limited to 'gtk/gtkprintunixdialog.c')
-rw-r--r--gtk/gtkprintunixdialog.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c
index 9ac5b19f33..5a7b406a38 100644
--- a/gtk/gtkprintunixdialog.c
+++ b/gtk/gtkprintunixdialog.c
@@ -1697,6 +1697,19 @@ update_range_sensitivity (GtkWidget *button,
gtk_widget_set_sensitive (range, active);
}
+void
+emit_ok_response (GtkTreeView *tree_view,
+ GtkTreePath *path,
+ GtkTreeViewColumn *column,
+ gpointer *user_data)
+{
+ GtkPrintUnixDialog *print_dialog;
+
+ print_dialog = (GtkPrintUnixDialog *) user_data;
+
+ gtk_dialog_response (GTK_DIALOG (print_dialog), GTK_RESPONSE_OK);
+}
+
static void
create_main_page (GtkPrintUnixDialog *dialog)
{
@@ -1775,6 +1788,8 @@ create_main_page (GtkPrintUnixDialog *dialog)
NULL);
gtk_tree_view_column_set_cell_data_func (column, renderer, set_cell_sensitivity_func, NULL, NULL);
gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column);
+
+ g_signal_connect (GTK_TREE_VIEW (treeview), "row-activated", G_CALLBACK (emit_ok_response), dialog);
gtk_widget_show (treeview);
gtk_container_add (GTK_CONTAINER (scrolled), treeview);