gtk+ r21869 - in branches/gtk-2-14: . gtk



Author: matthiasc
Date: Thu Dec 11 03:45:00 2008
New Revision: 21869
URL: http://svn.gnome.org/viewvc/gtk+?rev=21869&view=rev

Log:
        Bug 560135 - Print when the user double clicks a printer

        * gtk/gtkprintunixdialog.c: add handling of double click to
        GtkPrintUnixDialog.



Modified:
   branches/gtk-2-14/ChangeLog
   branches/gtk-2-14/gtk/gtkprintunixdialog.c

Modified: branches/gtk-2-14/gtk/gtkprintunixdialog.c
==============================================================================
--- branches/gtk-2-14/gtk/gtkprintunixdialog.c	(original)
+++ branches/gtk-2-14/gtk/gtkprintunixdialog.c	Thu Dec 11 03:45:00 2008
@@ -1696,6 +1696,19 @@
   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)
 {
@@ -1774,6 +1787,8 @@
 						     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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]