[gnome-control-center] printers: Export name of selected PPD from PPD dialog
- From: Marek Kašík <mkasik src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] printers: Export name of selected PPD from PPD dialog
- Date: Thu, 31 Jul 2014 09:46:12 +0000 (UTC)
commit 8331c88bcde98996a11e4f52e2ed2aa45d2dc919
Author: Marek Kasik <mkasik redhat com>
Date: Tue Jul 15 14:30:13 2014 +0200
printers: Export name of selected PPD from PPD dialog
Add pp_ppd_selection_dialog_get_ppd_display_name() function
which returns human-readable name of selected PPD.
https://bugzilla.gnome.org/show_bug.cgi?id=695564
panels/printers/pp-ppd-selection-dialog.c | 10 ++++++++++
panels/printers/pp-ppd-selection-dialog.h | 19 ++++++++++---------
2 files changed, 20 insertions(+), 9 deletions(-)
---
diff --git a/panels/printers/pp-ppd-selection-dialog.c b/panels/printers/pp-ppd-selection-dialog.c
index 03ec22c..596bd16 100644
--- a/panels/printers/pp-ppd-selection-dialog.c
+++ b/panels/printers/pp-ppd-selection-dialog.c
@@ -59,6 +59,7 @@ struct _PpPPDSelectionDialog {
gpointer user_data;
gchar *ppd_name;
+ gchar *ppd_display_name;
GtkResponseType response;
gchar *manufacturer;
@@ -311,6 +312,7 @@ ppd_selection_dialog_response_cb (GtkDialog *dialog,
{
gtk_tree_model_get (model, &iter,
PPD_NAMES_COLUMN, &ppd_selection_dialog->ppd_name,
+ PPD_DISPLAY_NAMES_COLUMN, &ppd_selection_dialog->ppd_display_name,
-1);
}
}
@@ -430,6 +432,8 @@ pp_ppd_selection_dialog_free (PpPPDSelectionDialog *dialog)
g_free (dialog->ppd_name);
+ g_free (dialog->ppd_display_name);
+
g_free (dialog->manufacturer);
g_free (dialog);
@@ -441,6 +445,12 @@ pp_ppd_selection_dialog_get_ppd_name (PpPPDSelectionDialog *dialog)
return g_strdup (dialog->ppd_name);
}
+gchar *
+pp_ppd_selection_dialog_get_ppd_display_name (PpPPDSelectionDialog *dialog)
+{
+ return g_strdup (dialog->ppd_display_name);
+}
+
void
pp_ppd_selection_dialog_set_ppd_list (PpPPDSelectionDialog *dialog,
PPDList *list)
diff --git a/panels/printers/pp-ppd-selection-dialog.h b/panels/printers/pp-ppd-selection-dialog.h
index bb3fe3e..3a98ef9 100644
--- a/panels/printers/pp-ppd-selection-dialog.h
+++ b/panels/printers/pp-ppd-selection-dialog.h
@@ -28,15 +28,16 @@ G_BEGIN_DECLS
typedef struct _PpPPDSelectionDialog PpPPDSelectionDialog;
-PpPPDSelectionDialog *pp_ppd_selection_dialog_new (GtkWindow *parent,
- PPDList *ppd_list,
- gchar *manufacturer,
- UserResponseCallback user_callback,
- gpointer user_data);
-gchar *pp_ppd_selection_dialog_get_ppd_name (PpPPDSelectionDialog *dialog);
-void pp_ppd_selection_dialog_set_ppd_list (PpPPDSelectionDialog *dialog,
- PPDList *list);
-void pp_ppd_selection_dialog_free (PpPPDSelectionDialog *dialog);
+PpPPDSelectionDialog *pp_ppd_selection_dialog_new (GtkWindow *parent,
+ PPDList *ppd_list,
+ gchar *manufacturer,
+ UserResponseCallback user_callback,
+ gpointer user_data);
+gchar *pp_ppd_selection_dialog_get_ppd_name (PpPPDSelectionDialog *dialog);
+gchar *pp_ppd_selection_dialog_get_ppd_display_name (PpPPDSelectionDialog *dialog);
+void pp_ppd_selection_dialog_set_ppd_list (PpPPDSelectionDialog *dialog,
+ PPDList *list);
+void pp_ppd_selection_dialog_free (PpPPDSelectionDialog *dialog);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]