[glabels/zint] Fix maximum size of object editor sidebar at initialization.
- From: Jim Evins <jimevins src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glabels/zint] Fix maximum size of object editor sidebar at initialization.
- Date: Wed, 1 Sep 2010 01:51:44 +0000 (UTC)
commit e68145406dd9ea1326cace7341fa736e8e065bff
Author: Jim Evins <evins snaught com>
Date: Tue Aug 31 21:48:50 2010 -0400
Fix maximum size of object editor sidebar at initialization.
Kludge: Load barcode styles for each backend type at initialization, so that
when they are loaded for real, the maximum size of the widget has already been
established and doesn't cause the object editor to change size.
data/ui/object-editor.ui | 22 +++++++++++-----------
src/object-editor-bc-page.c | 12 ++++++++++--
2 files changed, 21 insertions(+), 13 deletions(-)
---
diff --git a/data/ui/object-editor.ui b/data/ui/object-editor.ui
index 59a2fc4..cac447e 100644
--- a/data/ui/object-editor.ui
+++ b/data/ui/object-editor.ui
@@ -1169,7 +1169,7 @@
<object class="GtkLabel" id="bc_be_label">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Backend engine:</property>
+ <property name="label" translatable="yes">Backend:</property>
</object>
<packing>
<property name="x_options">GTK_FILL</property>
@@ -2272,22 +2272,22 @@
<object class="GtkSizeGroup" id="page_sizegroup">
<property name="mode">both</property>
<widgets>
- <widget name="shadow_page_vbox"/>
- <widget name="lsize_page_vbox"/>
- <widget name="size_page_vbox"/>
- <widget name="bc_page_vbox"/>
- <widget name="data_page_vbox"/>
- <widget name="img_page_vbox"/>
- <widget name="fill_page_vbox"/>
- <widget name="line_page_vbox"/>
- <widget name="text_page_vbox"/>
<widget name="edit_page_vbox"/>
+ <widget name="text_page_vbox"/>
+ <widget name="line_page_vbox"/>
+ <widget name="fill_page_vbox"/>
+ <widget name="img_page_vbox"/>
+ <widget name="data_page_vbox"/>
+ <widget name="bc_page_vbox"/>
+ <widget name="size_page_vbox"/>
+ <widget name="lsize_page_vbox"/>
+ <widget name="shadow_page_vbox"/>
</widgets>
</object>
<object class="GtkSizeGroup" id="width_sizegroup">
<widgets>
- <widget name="notebook"/>
<widget name="title_hbox"/>
+ <widget name="notebook"/>
</widgets>
</object>
</interface>
diff --git a/src/object-editor-bc-page.c b/src/object-editor-bc-page.c
index bce9a2a..f6d5557 100644
--- a/src/object-editor-bc-page.c
+++ b/src/object-editor-bc-page.c
@@ -71,6 +71,7 @@ void
gl_object_editor_prepare_bc_page (glObjectEditor *editor)
{
GList *backends = NULL;
+ GList *p;
gl_debug (DEBUG_EDITOR, "START");
@@ -112,6 +113,14 @@ gl_object_editor_prepare_bc_page (glObjectEditor *editor)
backends = gl_barcode_backends_get_backend_list ();
gl_combo_util_set_strings (GTK_COMBO_BOX(editor->priv->bc_backend_combo),
backends);
+
+ /* Kludge: Load styles for each backend once, so that when they are loaded for real the size of
+ * of the widget has already been established and does't cause the sidebar to change size. */
+ for ( p = backends; p != NULL; p=p->next )
+ {
+ gl_object_editor_load_bc_styles (editor, gl_barcode_backends_backend_name_to_id ((gchar *)p->data));
+ }
+
gl_barcode_backends_free_backend_list (backends);
/* Modify widgets */
@@ -271,8 +280,7 @@ gl_object_editor_load_bc_styles (glObjectEditor *editor,
editor->priv->stop_signals = TRUE;
styles = gl_barcode_backends_get_styles_list (backend_id);
- gl_combo_util_set_strings (GTK_COMBO_BOX(editor->priv->bc_style_combo),
- styles);
+ gl_combo_util_set_strings (GTK_COMBO_BOX(editor->priv->bc_style_combo), styles);
gl_barcode_backends_free_styles_list (styles);
editor->priv->stop_signals = FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]