From eb15aa82624a0bc2e24907b28c06ae7a33fb7f58 Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Tue, 2 Dec 2003 03:12:53 +0000 Subject: [PATCH] When setting ranges for object-editor size and position spinboxes, allow for plenty of slop. git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@365 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- glabels2/src/object-editor-lsize-page.c | 2 +- glabels2/src/object-editor-position-page.c | 4 ++-- glabels2/src/object-editor-size-page.c | 4 ++-- glabels2/src/view-barcode.c | 2 +- glabels2/src/view-box.c | 2 +- glabels2/src/view-ellipse.c | 2 +- glabels2/src/view-image.c | 2 +- glabels2/src/view-line.c | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/glabels2/src/object-editor-lsize-page.c b/glabels2/src/object-editor-lsize-page.c index e304f526..866cfb8f 100644 --- a/glabels2/src/object-editor-lsize-page.c +++ b/glabels2/src/object-editor-lsize-page.c @@ -182,7 +182,7 @@ gl_object_editor_set_max_lsize (glObjectEditor *editor, /* Set widget values */ tmp = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->lsize_r_spin)); gtk_spin_button_set_range (GTK_SPIN_BUTTON (editor->priv->lsize_r_spin), - 0.0, LENGTH (dx_max, dy_max)); + 0.0, 2.0*LENGTH (dx_max, dy_max)); gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->lsize_r_spin), tmp); g_signal_handlers_unblock_by_func (G_OBJECT(editor->priv->lsize_r_spin), diff --git a/glabels2/src/object-editor-position-page.c b/glabels2/src/object-editor-position-page.c index a79e19e3..5e1be495 100644 --- a/glabels2/src/object-editor-position-page.c +++ b/glabels2/src/object-editor-position-page.c @@ -178,11 +178,11 @@ gl_object_editor_set_max_position (glObjectEditor *editor, /* Set widget values */ tmp = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->pos_x_spin)); gtk_spin_button_set_range (GTK_SPIN_BUTTON (editor->priv->pos_x_spin), - 0.0, x_max); + -x_max, 2.0*x_max); gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->pos_x_spin), tmp); tmp = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->pos_y_spin)); gtk_spin_button_set_range (GTK_SPIN_BUTTON (editor->priv->pos_y_spin), - 0.0, y_max); + -y_max, 2.0*y_max); gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->pos_y_spin), tmp); g_signal_handlers_unblock_by_func (G_OBJECT(editor->priv->pos_x_spin), diff --git a/glabels2/src/object-editor-size-page.c b/glabels2/src/object-editor-size-page.c index 90db43b8..83178a48 100644 --- a/glabels2/src/object-editor-size-page.c +++ b/glabels2/src/object-editor-size-page.c @@ -317,11 +317,11 @@ gl_object_editor_set_max_size (glObjectEditor *editor, /* Set widget values */ tmp = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->size_w_spin)); gtk_spin_button_set_range (GTK_SPIN_BUTTON (editor->priv->size_w_spin), - 0.0, w_max); + 0.0, 2.0*w_max); gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->size_w_spin), tmp); tmp = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->size_h_spin)); gtk_spin_button_set_range (GTK_SPIN_BUTTON (editor->priv->size_h_spin), - 0.0, h_max); + 0.0, 2.0*h_max); gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->size_h_spin), tmp); g_signal_handlers_unblock_by_func (G_OBJECT(editor->priv->size_w_spin), diff --git a/glabels2/src/view-barcode.c b/glabels2/src/view-barcode.c index a7bbfc60..8726eb65 100644 --- a/glabels2/src/view-barcode.c +++ b/glabels2/src/view-barcode.c @@ -213,9 +213,9 @@ construct_properties_editor (glViewObject *view_object) 0); /* Update */ + update_editor_from_label_cb (object->parent, GL_OBJECT_EDITOR(editor)); update_editor_from_object_cb (object, GL_OBJECT_EDITOR(editor)); update_editor_from_move_cb (object, 0, 0, GL_OBJECT_EDITOR(editor)); - update_editor_from_label_cb (object->parent, GL_OBJECT_EDITOR(editor)); /* Connect signals. */ g_signal_connect (G_OBJECT (editor), "changed", diff --git a/glabels2/src/view-box.c b/glabels2/src/view-box.c index a2b85574..c9bfb8eb 100644 --- a/glabels2/src/view-box.c +++ b/glabels2/src/view-box.c @@ -227,9 +227,9 @@ construct_properties_editor (glViewObject *view_object) 0); /* Update */ + update_editor_from_label_cb (object->parent, GL_OBJECT_EDITOR(editor)); update_editor_from_object_cb (object, GL_OBJECT_EDITOR(editor)); update_editor_from_move_cb (object, 0, 0, GL_OBJECT_EDITOR(editor)); - update_editor_from_label_cb (object->parent, GL_OBJECT_EDITOR(editor)); /* Connect signals. */ g_signal_connect (G_OBJECT (editor), "changed", diff --git a/glabels2/src/view-ellipse.c b/glabels2/src/view-ellipse.c index 37ee8b0c..fd2689cc 100644 --- a/glabels2/src/view-ellipse.c +++ b/glabels2/src/view-ellipse.c @@ -227,9 +227,9 @@ construct_properties_editor (glViewObject *view_object) 0); /* Update */ + update_editor_from_label_cb (object->parent, GL_OBJECT_EDITOR(editor)); update_editor_from_object_cb (object, GL_OBJECT_EDITOR(editor)); update_editor_from_move_cb (object, 0, 0, GL_OBJECT_EDITOR(editor)); - update_editor_from_label_cb (object->parent, GL_OBJECT_EDITOR(editor)); /* Connect signals. */ g_signal_connect (G_OBJECT (editor), "changed", diff --git a/glabels2/src/view-image.c b/glabels2/src/view-image.c index c48f7396..287d0e88 100644 --- a/glabels2/src/view-image.c +++ b/glabels2/src/view-image.c @@ -225,9 +225,9 @@ construct_properties_editor (glViewObject *view_object) 0); /* Update */ + update_editor_from_label_cb (object->parent, GL_OBJECT_EDITOR(editor)); update_editor_from_object_cb (object, GL_OBJECT_EDITOR(editor)); update_editor_from_move_cb (object, 0, 0, GL_OBJECT_EDITOR(editor)); - update_editor_from_label_cb (object->parent, GL_OBJECT_EDITOR(editor)); /* Connect signals. */ g_signal_connect (G_OBJECT (editor), "changed", diff --git a/glabels2/src/view-line.c b/glabels2/src/view-line.c index 065a3226..5ab61db3 100644 --- a/glabels2/src/view-line.c +++ b/glabels2/src/view-line.c @@ -226,9 +226,9 @@ construct_properties_editor (glViewObject *view_object) 0); /* Update */ + update_editor_from_label_cb (object->parent, GL_OBJECT_EDITOR(editor)); update_editor_from_object_cb (object, GL_OBJECT_EDITOR(editor)); update_editor_from_move_cb (object, 0, 0, GL_OBJECT_EDITOR(editor)); - update_editor_from_label_cb (object->parent, GL_OBJECT_EDITOR(editor)); /* Connect signals. */ g_signal_connect (G_OBJECT (editor), "changed", -- 2.39.5