]> git.sur5r.net Git - glabels/commitdiff
2008-02-03 Jim Evins <evins@snaught.com>
authorJim Evins <evins@snaught.com>
Sun, 3 Feb 2008 20:49:14 +0000 (20:49 +0000)
committerJim Evins <evins@snaught.com>
Sun, 3 Feb 2008 20:49:14 +0000 (20:49 +0000)
* src/label-image.c: (gl_label_image_class_init), (set_size):
Enforce minimum size for images.

git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@743 f5e0f49d-192f-0410-a22d-a8d8700d0965

glabels2/ChangeLog
glabels2/src/label-image.c

index 842c9777bf62928e744976174a4eaf7c55c1ec0a..1f6031a124f7fa2b7a464863d212190f4548d912 100644 (file)
@@ -1,3 +1,36 @@
+2008-02-03  Jim Evins  <evins@snaught.com>
+
+       * src/label-image.c: (gl_label_image_class_init), (set_size):
+               Enforce minimum size for images.
+
+2008-02-03  Jim Evins  <evins@snaught.com>
+
+       * src/object-editor-edit-page.c: (field_selected_cb):
+       * src/object-editor-lsize-page.c: (gl_object_editor_set_max_lsize):
+       * src/object-editor-private.h:
+       * src/object-editor-shadow-page.c:
+       (gl_object_editor_set_max_shadow_offset):
+       * src/object-editor-size-page.c: (gl_object_editor_set_max_size):
+       * src/object-editor.c: (gl_object_editor_finalize),
+       (gl_object_editor_new), (gl_object_notebook_construct_valist),
+       (label_changed_cb):
+       * src/object-editor.h:
+       * src/ui-sidebar.c: (gl_ui_sidebar_construct):
+       * src/view-barcode.c: (construct_properties_editor):
+       * src/view-box.c: (construct_properties_editor):
+       * src/view-ellipse.c: (construct_properties_editor):
+       * src/view-image.c: (construct_properties_editor):
+       * src/view-line.c: (construct_properties_editor):
+       * src/view-object.c: (gl_view_object_finalize):
+       * src/view-text.c: (construct_properties_editor),
+               Move update_editor_from_label callback from individual view objects
+               to the object editor, so that signals can be disconnected when
+               object editor is finalized.
+       * src/view-text.c: (gl_view_text_create_button_press_event):
+               Fixed bug that caused multiple view objects to be created for a
+               single text object.  This bug would manifest itself as a crash
+               when deleting multi-object selections which included text objects.
+       
 2008-02-02  Jim Evins  <evins@snaught.com>
 
        * src/Makefile.am:
index 5408dcfdfda5c7318ede7703faf007b1a086f17a..9d0bcaf2ffd6bc8ed197f8199073dc5a3ea97639 100644 (file)
 
 #include "debug.h"
 
+
+#define MIN_IMAGE_SIZE 1.0
+
+
 /*========================================================*/
 /* Private types.                                         */
 /*========================================================*/
@@ -57,6 +61,10 @@ static void gl_label_image_finalize      (GObject           *object);
 static void copy                         (glLabelObject     *dst_object,
                                          glLabelObject     *src_object);
 
+static void set_size                      (glLabelObject      *object,
+                                          gdouble             w,
+                                          gdouble             h);
+
 static void    draw_object               (glLabelObject     *object,
                                           cairo_t           *cr,
                                           gboolean           screen_flag,
@@ -78,6 +86,7 @@ gl_label_image_class_init (glLabelImageClass *class)
        gl_label_image_parent_class = g_type_class_peek_parent (class);
 
        label_object_class->copy           = copy;
+       label_object_class->set_size       = set_size;
         label_object_class->draw_object    = draw_object;
         label_object_class->draw_shadow    = NULL;
 
@@ -174,6 +183,30 @@ copy (glLabelObject *dst_object,
 }
 
 
+/*---------------------------------------------------------------------------*/
+/* PRIVATE.  Set size method.                                                */
+/*---------------------------------------------------------------------------*/
+static void
+set_size (glLabelObject *object,
+         gdouble        w,
+         gdouble        h)
+{
+       g_return_if_fail (object && GL_IS_LABEL_OBJECT (object));
+
+        if (w < MIN_IMAGE_SIZE)
+        {
+                w = MIN_IMAGE_SIZE;
+        }
+
+        if (h < MIN_IMAGE_SIZE)
+        {
+                h = MIN_IMAGE_SIZE;
+        }
+
+       GL_LABEL_OBJECT_CLASS (gl_label_image_parent_class)->set_size (object, w, h);
+}
+
+
 /*****************************************************************************/
 /* Set object params.                                                        */
 /*****************************************************************************/