gtk+ r21775 - in trunk: . gtk



Author: mkasik
Date: Mon Nov 10 15:33:44 2008
New Revision: 21775
URL: http://svn.gnome.org/viewvc/gtk+?rev=21775&view=rev

Log:
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.


Modified:
   trunk/ChangeLog
   trunk/gtk/gtkprintunixdialog.c

Modified: trunk/gtk/gtkprintunixdialog.c
==============================================================================
--- trunk/gtk/gtkprintunixdialog.c	(original)
+++ trunk/gtk/gtkprintunixdialog.c	Mon Nov 10 15:33:44 2008
@@ -1697,6 +1697,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)
 {
@@ -1775,6 +1788,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]