Commit 27aa41f5 authored by Marek Kasik's avatar Marek Kasik

printers: Visual improvements of driver selection dialog

Make the dialog bigger (600x400). Add padding between list of manufacturers
and the list of drivers. Add padding to manufacturers and drivers lists.
Change Manufacturers and Drivers to singular. Trigger resizing of treeview
when list has changed so it has optimal width.

https://bugzilla.gnome.org/show_bug.cgi?id=690448
parent ba205647
......@@ -116,6 +116,7 @@ manufacturer_selection_changed_cb (GtkTreeSelection *selection,
gtk_tree_view_set_model (models_treeview, GTK_TREE_MODEL (store));
g_object_unref (store);
gtk_tree_view_columns_autosize (models_treeview);
}
g_free (manufacturer_name);
......@@ -220,16 +221,22 @@ populate_dialog (PpPPDSelectionDialog *dialog)
GtkTreeView *manufacturers_treeview;
GtkTreeView *models_treeview;
GtkWidget *widget;
GtkWidget *header;
manufacturers_treeview = (GtkTreeView*)
gtk_builder_get_object (dialog->builder, "ppd-selection-manufacturers-treeview");
renderer = gtk_cell_renderer_text_new ();
gtk_cell_renderer_set_padding (renderer, 10, 0);
/* Translators: Name of column showing printer manufacturers */
column = gtk_tree_view_column_new_with_attributes (_("Manufacturers"), renderer,
column = gtk_tree_view_column_new_with_attributes (_("Manufacturer"), renderer,
"text", PPD_MANUFACTURERS_DISPLAY_NAMES_COLUMN, NULL);
gtk_tree_view_column_set_expand (column, TRUE);
header = gtk_label_new (gtk_tree_view_column_get_title (column));
gtk_misc_set_padding (GTK_MISC (header), 10, 0);
gtk_tree_view_column_set_widget (column, header);
gtk_widget_show (header);
gtk_tree_view_append_column (manufacturers_treeview, column);
......@@ -237,11 +244,17 @@ populate_dialog (PpPPDSelectionDialog *dialog)
gtk_builder_get_object (dialog->builder, "ppd-selection-models-treeview");
renderer = gtk_cell_renderer_text_new ();
gtk_cell_renderer_set_padding (renderer, 10, 0);
/* Translators: Name of column showing printer drivers */
column = gtk_tree_view_column_new_with_attributes (_("Drivers"), renderer,
"text", PPD_DISPLAY_NAMES_COLUMN, NULL);
column = gtk_tree_view_column_new_with_attributes (_("Driver"), renderer,
"text", PPD_DISPLAY_NAMES_COLUMN,
NULL);
gtk_tree_view_column_set_expand (column, TRUE);
header = gtk_label_new (gtk_tree_view_column_get_title (column));
gtk_misc_set_padding (GTK_MISC (header), 10, 0);
gtk_tree_view_column_set_widget (column, header);
gtk_widget_show (header);
gtk_tree_view_append_column (models_treeview, column);
......
......@@ -2,8 +2,8 @@
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkDialog" id="ppd-selection-dialog">
<property name="width_request">500</property>
<property name="height_request">350</property>
<property name="width_request">600</property>
<property name="height_request">400</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="title" translatable="yes"> </property>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment