[gnome-control-center] printers: Install selected printer when the row is activated
- From: Marek Kašík <mkasik src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] printers: Install selected printer when the row is activated
- Date: Wed, 10 Jun 2015 09:35:33 +0000 (UTC)
commit da9b74061f5822d070a941aaa5ee41a77050a4b1
Author: Marek Kasik <mkasik redhat com>
Date: Thu May 28 16:45:04 2015 +0200
printers: Install selected printer when the row is activated
Allow user to install printer by activating a row with a found device.
https://bugzilla.gnome.org/show_bug.cgi?id=748206
panels/printers/pp-new-printer-dialog.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/panels/printers/pp-new-printer-dialog.c b/panels/printers/pp-new-printer-dialog.c
index dcdda4d..aaba996 100644
--- a/panels/printers/pp-new-printer-dialog.c
+++ b/panels/printers/pp-new-printer-dialog.c
@@ -1786,6 +1786,18 @@ cups_get_dests_cb (GObject *source_object,
}
static void
+row_activated_cb (GtkTreeView *tree_view,
+ GtkTreePath *path,
+ GtkTreeViewColumn *column,
+ gpointer user_data)
+{
+ PpNewPrinterDialog *dialog = (PpNewPrinterDialog *) user_data;
+ PpNewPrinterDialogPrivate *priv = dialog->priv;
+
+ gtk_dialog_response (GTK_DIALOG (priv->dialog), GTK_RESPONSE_OK);
+}
+
+static void
cell_data_func (GtkTreeViewColumn *tree_column,
GtkCellRenderer *cell,
GtkTreeModel *tree_model,
@@ -1859,6 +1871,9 @@ populate_devices_list (PpNewPrinterDialog *dialog)
g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)),
"changed", G_CALLBACK (device_selection_changed_cb), dialog);
+ g_signal_connect (treeview,
+ "row-activated", G_CALLBACK (row_activated_cb), dialog);
+
priv->local_printer_icon = g_themed_icon_new ("printer");
priv->remote_printer_icon = g_themed_icon_new ("printer-network");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]