diff options
Diffstat (limited to 'panels')
-rw-r--r-- | panels/printers/options-dialog.ui | 159 | ||||
-rw-r--r-- | panels/printers/pp-options-dialog.c | 14 |
2 files changed, 75 insertions, 98 deletions
diff --git a/panels/printers/options-dialog.ui b/panels/printers/options-dialog.ui index 665c5eebf..f9ba3bbd3 100644 --- a/panels/printers/options-dialog.ui +++ b/panels/printers/options-dialog.ui @@ -13,77 +13,61 @@ <property name="destroy_with_parent">True</property> <property name="type_hint">dialog</property> <child internal-child="vbox"> - <object class="GtkBox" id="main-vbox"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - <property name="spacing">10</property> + <object class="GtkBox"> <child> - <object class="GtkBox" id="box2"> + <object class="GtkStack" id="stack"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hexpand">True</property> - <property name="vexpand">True</property> - <child> - <object class="GtkScrolledWindow" id="scrolled-window1"> - <property name="width_request">120</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hscrollbar_policy">never</property> - <property name="shadow_type">in</property> - <child> - <object class="GtkTreeView" id="options-categories-treeview"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="headers_visible">False</property> - <child internal-child="selection"> - <object class="GtkTreeSelection" id="treeview-selection"/> - </child> - </object> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> + <property name="homogeneous">True</property> <child> - <object class="GtkNotebook" id="options-notebook"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="tab_pos">left</property> - <property name="show_tabs">False</property> - </object> - <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="pack_type">end</property> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child internal-child="action_area"> - <object class="GtkButtonBox" id="dialog-action-area1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="layout_style">end</property> - <child> - <object class="GtkBox" id="box3"> + <object class="GtkBox" id="main-vbox"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">10</property> <child> - <object class="GtkSpinner" id="options-spinner"> - <property name="width_request">24</property> - <property name="height_request">24</property> + <object class="GtkBox" id="box2"> + <property name="visible">True</property> <property name="can_focus">False</property> - <property name="no_show_all">True</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <child> + <object class="GtkScrolledWindow" id="scrolled-window1"> + <property name="width_request">120</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hscrollbar_policy">never</property> + <property name="shadow_type">in</property> + <child> + <object class="GtkTreeView" id="options-categories-treeview"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="headers_visible">False</property> + <child internal-child="selection"> + <object class="GtkTreeSelection" id="treeview-selection"/> + </child> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkNotebook" id="options-notebook"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="tab_pos">left</property> + <property name="show_tabs">False</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">1</property> + </packing> + </child> </object> <packing> <property name="expand">False</property> @@ -91,46 +75,41 @@ <property name="position">0</property> </packing> </child> - <child> - <object class="GtkLabel" id="progress-label"> - <property name="can_focus">False</property> - <property name="no_show_all">True</property> - <property name="label" translatable="yes">Loading options…</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="padding">10</property> - <property name="position">1</property> - </packing> - </child> </object> <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - <property name="secondary">True</property> + <property name="name">main-box</property> </packing> </child> <child> - <object class="GtkButton" id="options-close-button"> - <property name="label" translatable="yes">_Close</property> + <object class="GtkSpinner" id="options-spinner"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="use_underline">True</property> + <property name="width_request">24</property> + <property name="height_request">24</property> + <property name="can_focus">False</property> </object> <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">2</property> + <property name="name">progress-box</property> </packing> </child> </object> + </child> + </object> + </child> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action-area1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="options-close-button"> + <property name="label" translatable="yes">Close</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + </object> <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="pack_type">end</property> <property name="position">2</property> </packing> </child> diff --git a/panels/printers/pp-options-dialog.c b/panels/printers/pp-options-dialog.c index 47ea2e34b..d2def2ec9 100644 --- a/panels/printers/pp-options-dialog.c +++ b/panels/printers/pp-options-dialog.c @@ -508,12 +508,11 @@ populate_options_real (PpOptionsDialog *dialog) widget = (GtkWidget*) gtk_builder_get_object (dialog->builder, "options-spinner"); - gtk_widget_hide (widget); gtk_spinner_stop (GTK_SPINNER (widget)); widget = (GtkWidget*) - gtk_builder_get_object (dialog->builder, "progress-label"); - gtk_widget_hide (widget); + gtk_builder_get_object (dialog->builder, "stack"); + gtk_stack_set_visible_child_name (GTK_STACK (widget), "main-box"); treeview = (GtkTreeView *) gtk_builder_get_object (dialog->builder, "options-categories-treeview"); @@ -777,6 +776,10 @@ populate_options (PpOptionsDialog *dialog) "orientation-requested-default", NULL}; + widget = (GtkWidget*) + gtk_builder_get_object (dialog->builder, "stack"); + gtk_stack_set_visible_child_name (GTK_STACK (widget), "progress-box"); + treeview = (GtkTreeView *) gtk_builder_get_object (dialog->builder, "options-categories-treeview"); @@ -789,13 +792,8 @@ populate_options (PpOptionsDialog *dialog) widget = (GtkWidget*) gtk_builder_get_object (dialog->builder, "options-spinner"); - gtk_widget_show (widget); gtk_spinner_start (GTK_SPINNER (widget)); - widget = (GtkWidget*) - gtk_builder_get_object (dialog->builder, "progress-label"); - gtk_widget_show (widget); - printer_get_ppd_async (dialog->printer_name, NULL, 0, |