[gnome-control-center] Printers: fix panel width
- From: matthiasc src gnome org
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] Printers: fix panel width
- Date: Wed, 2 Feb 2011 05:22:50 +0000 (UTC)
commit 79752c921a623c529e3e3bc672ae8a0d34010abc
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Feb 2 00:22:35 2011 -0500
Printers: fix panel width
panels/printers/cc-printers-panel.c | 10 +---
panels/printers/printers.ui | 96 ++++++++++++++---------------------
2 files changed, 41 insertions(+), 65 deletions(-)
---
diff --git a/panels/printers/cc-printers-panel.c b/panels/printers/cc-printers-panel.c
index d89a74a..be41b57 100644
--- a/panels/printers/cc-printers-panel.c
+++ b/panels/printers/cc-printers-panel.c
@@ -432,8 +432,6 @@ printer_selection_changed_cb (GtkTreeSelection *selection,
widget = (GtkWidget*)
gtk_builder_get_object (priv->builder, "supply-drawing-area");
- width = gtk_widget_get_allocated_width (widget);
-
if (marker_levels)
{
gchar **marker_levelsv = NULL;
@@ -443,17 +441,15 @@ printer_selection_changed_cb (GtkTreeSelection *selection,
marker_levelsv = g_strsplit (marker_levels, ",", -1);
gtk_widget_set_size_request (widget,
- width,
+ -1,
((g_strv_length (marker_levelsv) - 1) * SUPPLY_BAR_SPACE
+ g_strv_length (marker_levelsv) * SUPPLY_BAR_HEIGHT));
g_strfreev (marker_levelsv);
}
else
- gtk_widget_set_size_request (widget, 0, 0);
+ gtk_widget_set_size_request (widget, -1, -1);
- width = gtk_widget_get_allocated_width (widget);
- height = gtk_widget_get_allocated_height (widget);
- gtk_widget_queue_draw_area (widget, 0, 0, width, height);
+ gtk_widget_queue_draw (widget);
widget = (GtkWidget*)
diff --git a/panels/printers/printers.ui b/panels/printers/printers.ui
index 403cd29..f458a14 100644
--- a/panels/printers/printers.ui
+++ b/panels/printers/printers.ui
@@ -470,56 +470,46 @@
<child>
<object class="GtkTable" id="table3">
<property name="visible">True</property>
- <property name="n_columns">4</property>
- <property name="homogeneous">True</property>
+ <property name="n_columns">3</property>
<child>
- <object class="GtkLabel" id="label1">
+ <object class="GtkButton" id="back-button-1">
+ <property name="label" translatable="yes" comments="Translators: Switch back to printer's info tab">Back</property>
<property name="visible">True</property>
- <property name="label" translatable="yes" comments="Translators: This tab contains list of active print jobs of the selected printer">Active Print Jobs</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="halign">GTK_ALIGN_START</property>
+ <property name="valign">GTK_ALIGN_CENTER</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="x_options"></property>
+ <property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label13">
+ <object class="GtkLabel" id="label1">
<property name="visible">True</property>
+ <property name="label" translatable="yes" comments="Translators: This tab contains list of active print jobs of the selected printer">Active Print Jobs</property>
+ <property name="halign">GTK_ALIGN_CENTER</property>
+ <property name="valign">GTK_ALIGN_CENTER</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
<packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="x_options"></property>
+ <property name="left_attach">1</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox2">
+ <object class="GtkLabel" id="label13">
<property name="visible">True</property>
- <child>
- <object class="GtkButton" id="back-button-1">
- <property name="label" translatable="yes" comments="Translators: Switch back to printer's info tab">Back</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="position">0</property>
- </packing>
- </child>
</object>
<packing>
+ <property name="left_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
- <child>
- <placeholder/>
- </child>
</object>
<packing>
<property name="expand">False</property>
@@ -625,56 +615,46 @@
<child>
<object class="GtkTable" id="table2">
<property name="visible">True</property>
- <property name="n_columns">4</property>
- <property name="homogeneous">True</property>
+ <property name="n_columns">3</property>
<child>
- <object class="GtkLabel" id="label6">
+ <object class="GtkButton" id="back-button-2">
+ <property name="label" translatable="yes" comments="Translators: Switch back to printer's info tab">Back</property>
<property name="visible">True</property>
- <property name="label" translatable="yes" comments="Translators: This tab contains list of active print jobs of the selected printer">Printer Options</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="halign">GTK_ALIGN_START</property>
+ <property name="valign">GTK_ALIGN_CENTER</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="x_options"></property>
+ <property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label7">
+ <object class="GtkLabel" id="label6">
<property name="visible">True</property>
+ <property name="label" translatable="yes" comments="Translators: This tab contains list of active print jobs of the selected printer">Printer Options</property>
+ <property name="halign">GTK_ALIGN_CENTER</property>
+ <property name="valign">GTK_ALIGN_CENTER</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
<packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="x_options"></property>
+ <property name="left_attach">1</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox3">
+ <object class="GtkLabel" id="label7">
<property name="visible">True</property>
- <child>
- <object class="GtkButton" id="back-button-2">
- <property name="label" translatable="yes" comments="Translators: Switch back to printer's info tab">Back</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="position">0</property>
- </packing>
- </child>
</object>
<packing>
+ <property name="left_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
- <child>
- <placeholder/>
- </child>
</object>
<packing>
<property name="expand">False</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]