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
This commit is contained in:
parent
375c5b0086
commit
8331c88bcd
2 changed files with 20 additions and 9 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue