[glabels] Fixed problem with creation of 1st barcode.
- From: Jim Evins <jimevins src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glabels] Fixed problem with creation of 1st barcode.
- Date: Sat, 20 Nov 2010 20:58:42 +0000 (UTC)
commit a35071a7dd2b561b6cf479c46639fa62fbefb045
Author: Jim Evins <evins snaught com>
Date: Sat Nov 20 15:52:35 2010 -0500
Fixed problem with creation of 1st barcode.
A change signal is apparently being delayed until the actual widget is
being realized as a result of the gtk_widget_show of the object editor
notebook. The proper fix is to use actual signal blockers rather than
the simple "stop_signals" flag, since the flags assume callbacks are
always called inline rather than being called asynchronously.
src/object-editor-bc-page.c | 4 +++-
src/object-editor.c | 7 ++-----
2 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/src/object-editor-bc-page.c b/src/object-editor-bc-page.c
index 06a7c57..1c2d0cf 100644
--- a/src/object-editor-bc-page.c
+++ b/src/object-editor-bc-page.c
@@ -310,6 +310,8 @@ gl_object_editor_set_bc_style (glObjectEditor *editor,
gl_debug (DEBUG_EDITOR, "START");
+ gl_object_editor_load_bc_styles (editor, bc_style->backend_id);
+
editor->priv->stop_signals = TRUE;
backend_name = gl_barcode_backends_backend_id_to_name (bc_style->backend_id);
@@ -357,7 +359,7 @@ gl_object_editor_set_bc_style (glObjectEditor *editor,
gtk_widget_set_sensitive (editor->priv->data_digits_spin,
!editor->priv->data_format_fixed_flag);
}
-
+
editor->priv->stop_signals = FALSE;
gl_debug (DEBUG_EDITOR, "END");
diff --git a/src/object-editor.c b/src/object-editor.c
index f7030dd..ef4329d 100644
--- a/src/object-editor.c
+++ b/src/object-editor.c
@@ -284,7 +284,6 @@ set_object (glObjectEditor *editor,
gchar *s;
GtkTextBuffer *buffer;
gint old_page, new_page;
- glLabelBarcodeStyle *bc_style;
gl_debug (DEBUG_EDITOR, "START");
@@ -413,10 +412,6 @@ set_object (glObjectEditor *editor,
gtk_widget_hide (editor->priv->shadow_page_vbox);
gtk_widget_hide (editor->priv->size_reset_image_button);
-
- bc_style = gl_label_barcode_get_style (GL_LABEL_BARCODE(object));
- gl_object_editor_load_bc_styles (editor, bc_style->backend_id);
- gl_label_barcode_style_free (bc_style);
}
gtk_image_set_from_icon_name (GTK_IMAGE(editor->priv->title_image),
@@ -432,7 +427,9 @@ set_object (glObjectEditor *editor,
gtk_widget_set_sensitive (editor->priv->title_image, TRUE);
gtk_widget_set_sensitive (editor->priv->title_label, TRUE);
+ editor->priv->stop_signals = TRUE;
gtk_widget_show (editor->priv->notebook);
+ editor->priv->stop_signals = FALSE;
/* if the old active page is no longer visible, set to 1st visible page. */
new_page = gtk_notebook_get_current_page (GTK_NOTEBOOK (editor->priv->notebook));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]