]> git.sur5r.net Git - glabels/commitdiff
Added callbacks to track "moved" signals of label objects and update property dialogs.
authorJim Evins <evins@snaught.com>
Mon, 23 Sep 2002 03:59:14 +0000 (03:59 +0000)
committerJim Evins <evins@snaught.com>
Mon, 23 Sep 2002 03:59:14 +0000 (03:59 +0000)
git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@132 f5e0f49d-192f-0410-a22d-a8d8700d0965

glabels2/src/view-barcode.c
glabels2/src/view-box.c
glabels2/src/view-ellipse.c
glabels2/src/view-image.c
glabels2/src/view-line.c
glabels2/src/view-text.c

index 6b9a92f1d93ea6158a51f021a01c313a4adc7999..aad1f2af7ee58506d966550fb246c2bce31ca4c3 100644 (file)
@@ -76,35 +76,40 @@ static glViewObjectClass *parent_class = NULL;
 /* Private function prototypes.                           */
 /*========================================================*/
 
-static void      gl_view_barcode_class_init       (glViewBarcodeClass *klass);
-static void      gl_view_barcode_instance_init    (glViewBarcode *view_barcode);
-static void      gl_view_barcode_finalize         (GObject *object);
+static void      gl_view_barcode_class_init    (glViewBarcodeClass *klass);
+static void      gl_view_barcode_instance_init (glViewBarcode  *view_barcode);
+static void      gl_view_barcode_finalize      (GObject        *object);
 
-static void      update_view_barcode_cb           (glLabelObject *object,
-                                               glViewBarcode *view_barcode);
+static void      update_view_barcode_cb        (glLabelObject  *object,
+                                               glViewBarcode  *view_barcode);
 
-static GtkWidget *construct_properties_dialog  (glViewBarcode *view_barcode);
+static GtkWidget *construct_properties_dialog  (glViewBarcode  *view_barcode);
 
-static void      response_cb                   (GtkDialog *dialog,
-                                               gint response,
-                                               glViewBarcode *view_barcode);
+static void      response_cb                   (GtkDialog      *dialog,
+                                               gint            response,
+                                               glViewBarcode  *view_barcode);
 
-static void      bc_data_changed_cb            (glWdgtBCData *bc_data,
-                                               glViewBarcode *view_barcode);
+static void      bc_data_changed_cb            (glWdgtBCData   *bc_data,
+                                               glViewBarcode  *view_barcode);
 
-static void      bc_props_changed_cb           (glWdgtBCProps *bc_props,
-                                               glViewBarcode *view_barcode);
+static void      bc_props_changed_cb           (glWdgtBCProps  *bc_props,
+                                               glViewBarcode  *view_barcode);
 
-static void      bc_style_changed_cb           (glWdgtBCStyle *bc_style,
-                                               glViewBarcode *view_barcode);
+static void      bc_style_changed_cb           (glWdgtBCStyle  *bc_style,
+                                               glViewBarcode  *view_barcode);
 
 static void      position_changed_cb           (glWdgtPosition *position,
-                                               glViewBarcode *view_barcode);
+                                               glViewBarcode  *view_barcode);
 
-static void      update_dialog_cb              (glLabelObject *object,
-                                               glViewBarcode *view_barcode);
+static void      update_dialog_cb              (glLabelObject  *object,
+                                               glViewBarcode  *view_barcode);
 
-static void      draw_barcode                  (glViewBarcode *view_barcode);
+static void      update_dialog_from_move_cb    (glLabelObject  *object,
+                                               gdouble         dx,
+                                               gdouble         dy,
+                                               glViewBarcode  *view_barcode);
+
+static void      draw_barcode                  (glViewBarcode  *view_barcode);
 
 \f
 /*****************************************************************************/
@@ -356,6 +361,9 @@ construct_properties_dialog (glViewBarcode *view_barcode)
        /*----------------------------*/
        g_signal_connect (G_OBJECT (object), "changed",
                          G_CALLBACK (update_dialog_cb), view_barcode);
+       g_signal_connect (G_OBJECT (object), "moved",
+                         G_CALLBACK (update_dialog_from_move_cb),
+                         view_barcode);
 
        gl_debug (DEBUG_VIEW, "END");
 
@@ -563,6 +571,37 @@ update_dialog_cb (glLabelObject  *object,
        gl_debug (DEBUG_VIEW, "END");
 }
 
+/*---------------------------------------------------------------------------*/
+/* PRIVATE. label object "moved" callback.                                   */
+/*---------------------------------------------------------------------------*/
+static void
+update_dialog_from_move_cb (glLabelObject *object,
+                           gdouble        dx,
+                           gdouble        dy,
+                           glViewBarcode *view_barcode)
+{
+       gdouble            x, y;
+
+       gl_debug (DEBUG_VIEW, "START");
+
+       /* Query properties of object. */
+       gl_label_object_get_position (GL_LABEL_OBJECT(object), &x, &y);
+
+       /* Block widget handlers to prevent recursion */
+       g_signal_handlers_block_by_func (G_OBJECT(view_barcode->private->position),
+                                        position_changed_cb, view_barcode);
+
+       /* Update widgets in property dialog */
+       gl_wdgt_position_set_position (GL_WDGT_POSITION(view_barcode->private->position),
+                                      x, y);
+
+       /* Unblock widget handlers */
+       g_signal_handlers_unblock_by_func (G_OBJECT(view_barcode->private->position),
+                                          position_changed_cb, view_barcode);
+
+       gl_debug (DEBUG_VIEW, "END");
+}
+
 /*****************************************************************************/
 /* Return apropos cursor for create object mode.                             */
 /*****************************************************************************/
index dba80c2efec24a8e732cde4183848f69953498dd..6472350e5fe37b8b304e060f3b20f83c31989591 100644 (file)
@@ -73,32 +73,37 @@ static glViewObjectClass *parent_class = NULL;
 /*========================================================*/
 
 static void      gl_view_box_class_init       (glViewBoxClass *klass);
-static void      gl_view_box_instance_init    (glViewBox *view_box);
-static void      gl_view_box_finalize         (GObject *object);
+static void      gl_view_box_instance_init    (glViewBox      *view_box);
+static void      gl_view_box_finalize         (GObject        *object);
 
-static void      update_view_box_cb           (glLabelObject *object,
-                                              glViewBox *view_box);
+static void      update_view_box_cb           (glLabelObject  *object,
+                                              glViewBox      *view_box);
 
-static GtkWidget *construct_properties_dialog (glViewBox *view_box);
+static GtkWidget *construct_properties_dialog (glViewBox      *view_box);
 
-static void      response_cb                  (GtkDialog *dialog,
-                                              gint response,
-                                              glViewBox *view_box);
+static void      response_cb                  (GtkDialog      *dialog,
+                                              gint            response,
+                                              glViewBox      *view_box);
 
-static void      line_changed_cb              (glWdgtLine *line,
-                                              glViewBox *view_box);
+static void      line_changed_cb              (glWdgtLine     *line,
+                                              glViewBox      *view_box);
 
-static void      fill_changed_cb              (glWdgtFill *fill,
-                                              glViewBox *view_box);
+static void      fill_changed_cb              (glWdgtFill     *fill,
+                                              glViewBox      *view_box);
 
 static void      position_changed_cb          (glWdgtPosition *position,
-                                              glViewBox *view_box);
+                                              glViewBox      *view_box);
 
-static void      size_changed_cb              (glWdgtSize *size,
-                                              glViewBox *view_box);
+static void      size_changed_cb              (glWdgtSize     *size,
+                                              glViewBox      *view_box);
 
-static void      update_dialog_cb             (glLabelObject *object,
-                                              glViewBox *view_box);
+static void      update_dialog_cb             (glLabelObject  *object,
+                                              glViewBox      *view_box);
+
+static void      update_dialog_from_move_cb   (glLabelObject  *object,
+                                              gdouble         dx,
+                                              gdouble         dy,
+                                              glViewBox      *view_box);
 
 \f
 /*****************************************************************************/
@@ -369,6 +374,8 @@ construct_properties_dialog (glViewBox *view_box)
        /*----------------------------*/
        g_signal_connect (G_OBJECT (object), "changed",
                          G_CALLBACK (update_dialog_cb), view_box);
+       g_signal_connect (G_OBJECT (object), "moved",
+                         G_CALLBACK (update_dialog_from_move_cb), view_box);
 
        gl_debug (DEBUG_VIEW, "END");
 
@@ -560,6 +567,37 @@ update_dialog_cb (glLabelObject *object,
        gl_debug (DEBUG_VIEW, "END");
 }
 
+/*---------------------------------------------------------------------------*/
+/* PRIVATE. label object "moved" callback.                                   */
+/*---------------------------------------------------------------------------*/
+static void
+update_dialog_from_move_cb (glLabelObject *object,
+                           gdouble        dx,
+                           gdouble        dy,
+                           glViewBox     *view_box)
+{
+       gdouble            x, y;
+
+       gl_debug (DEBUG_VIEW, "START");
+
+       /* Query properties of object. */
+       gl_label_object_get_position (GL_LABEL_OBJECT(object), &x, &y);
+
+       /* Block widget handlers to prevent recursion */
+       g_signal_handlers_block_by_func (G_OBJECT(view_box->private->position),
+                                        position_changed_cb, view_box);
+
+       /* Update widgets in property dialog */
+       gl_wdgt_position_set_position (GL_WDGT_POSITION(view_box->private->position),
+                                      x, y);
+
+       /* Unblock widget handlers */
+       g_signal_handlers_unblock_by_func (G_OBJECT(view_box->private->position),
+                                          position_changed_cb, view_box);
+
+       gl_debug (DEBUG_VIEW, "END");
+}
+
 /*****************************************************************************/
 /* Return apropos cursor for create object mode.                             */
 /*****************************************************************************/
index 09b6cf2d34c08e0e117042287f83bb5c41188e02..d18fff7c3a8190bef5132bf08c1582a79b35033a 100644 (file)
@@ -73,32 +73,37 @@ static glViewObjectClass *parent_class = NULL;
 /*========================================================*/
 
 static void      gl_view_ellipse_class_init    (glViewEllipseClass *klass);
-static void      gl_view_ellipse_instance_init (glViewEllipse *view_ellipse);
-static void      gl_view_ellipse_finalize      (GObject *object);
+static void      gl_view_ellipse_instance_init (glViewEllipse  *view_ellipse);
+static void      gl_view_ellipse_finalize      (GObject        *object);
 
-static void      update_view_ellipse_cb        (glLabelObject *object,
-                                               glViewEllipse *view_ellipse);
+static void      update_view_ellipse_cb        (glLabelObject  *object,
+                                               glViewEllipse  *view_ellipse);
 
-static GtkWidget *construct_properties_dialog  (glViewEllipse *view_ellipse);
+static GtkWidget *construct_properties_dialog  (glViewEllipse  *view_ellipse);
 
-static void      response_cb                   (GtkDialog *dialog,
-                                               gint response,
-                                               glViewEllipse *view_ellipse);
+static void      response_cb                   (GtkDialog      *dialog,
+                                               gint            response,
+                                               glViewEllipse  *view_ellipse);
 
-static void      line_changed_cb               (glWdgtLine *line,
-                                               glViewEllipse *view_ellipse);
+static void      line_changed_cb               (glWdgtLine     *line,
+                                               glViewEllipse  *view_ellipse);
 
-static void      fill_changed_cb               (glWdgtFill *fill,
-                                               glViewEllipse *view_ellipse);
+static void      fill_changed_cb               (glWdgtFill     *fill,
+                                               glViewEllipse  *view_ellipse);
 
 static void      position_changed_cb           (glWdgtPosition *position,
-                                               glViewEllipse *view_ellipse);
+                                               glViewEllipse  *view_ellipse);
 
-static void      size_changed_cb               (glWdgtSize *size,
-                                               glViewEllipse *view_ellipse);
+static void      size_changed_cb               (glWdgtSize     *size,
+                                               glViewEllipse  *view_ellipse);
 
-static void      update_dialog_cb              (glLabelObject *object,
-                                               glViewEllipse *view_ellipse);
+static void      update_dialog_cb              (glLabelObject  *object,
+                                               glViewEllipse  *view_ellipse);
+
+static void      update_dialog_from_move_cb    (glLabelObject  *object,
+                                               gdouble         dx,
+                                               gdouble         dy,
+                                               glViewEllipse  *view_ellipse);
 
 \f
 /*****************************************************************************/
@@ -369,6 +374,9 @@ construct_properties_dialog (glViewEllipse *view_ellipse)
        /*----------------------------*/
        g_signal_connect (G_OBJECT (object), "changed",
                          G_CALLBACK (update_dialog_cb), view_ellipse);
+       g_signal_connect (G_OBJECT (object), "moved",
+                         G_CALLBACK (update_dialog_from_move_cb),
+                         view_ellipse);
 
        gl_debug (DEBUG_VIEW, "END");
 
@@ -556,6 +564,36 @@ update_dialog_cb (glLabelObject     *object,
        g_signal_handlers_unblock_by_func (G_OBJECT(view_ellipse->private->size),
                                           size_changed_cb, view_ellipse);
 
+       gl_debug (DEBUG_VIEW, "END");
+}
+
+/*---------------------------------------------------------------------------*/
+/* PRIVATE. label object "moved" callback.                                   */
+/*---------------------------------------------------------------------------*/
+static void
+update_dialog_from_move_cb (glLabelObject *object,
+                           gdouble        dx,
+                           gdouble        dy,
+                           glViewEllipse *view_ellipse)
+{
+       gdouble            x, y;
+
+       gl_debug (DEBUG_VIEW, "START");
+
+       /* Query properties of object. */
+       gl_label_object_get_position (GL_LABEL_OBJECT(object), &x, &y);
+
+       /* Block widget handlers to prevent recursion */
+       g_signal_handlers_block_by_func (G_OBJECT(view_ellipse->private->position),
+                                        position_changed_cb, view_ellipse);
+
+       /* Update widgets in property dialog */
+       gl_wdgt_position_set_position (GL_WDGT_POSITION(view_ellipse->private->position),
+                                      x, y);
+
+       /* Unblock widget handlers */
+       g_signal_handlers_unblock_by_func (G_OBJECT(view_ellipse->private->position),
+                                          position_changed_cb, view_ellipse);
 
        gl_debug (DEBUG_VIEW, "END");
 }
index 27bb8614ca47db202dbf8ed3a32a4e256b56c60f..06f52ee0f58ccb270dcfff412a8d5fe61dc49a1f 100644 (file)
@@ -72,33 +72,38 @@ static gchar *image_path = NULL;
 /* Private function prototypes.                           */
 /*========================================================*/
 
-static void      gl_view_image_class_init    (glViewImageClass *klass);
-static void      gl_view_image_instance_init (glViewImage *view_image);
-static void      gl_view_image_finalize      (GObject *object);
+static void      gl_view_image_class_init      (glViewImageClass *klass);
+static void      gl_view_image_instance_init   (glViewImage    *view_image);
+static void      gl_view_image_finalize        (GObject        *object);
 
-static void      update_view_image_cb        (glLabelObject *object,
-                                               glViewImage *view_image);
+static void      update_view_image_cb          (glLabelObject  *object,
+                                               glViewImage    *view_image);
 
-static GtkWidget *construct_properties_dialog  (glViewImage *view_image);
+static GtkWidget *construct_properties_dialog  (glViewImage    *view_image);
 
-static void      response_cb                   (GtkDialog *dialog,
-                                               gint response,
-                                               glViewImage *view_image);
+static void      response_cb                   (GtkDialog      *dialog,
+                                               gint            response,
+                                               glViewImage    *view_image);
 
-static void      file_changed_cb               (GtkEntry *pixmap_entry,
-                                               glViewImage *view_image);
+static void      file_changed_cb               (GtkEntry       *pixmap_entry,
+                                               glViewImage    *view_image);
 
 static void      position_changed_cb           (glWdgtPosition *position,
-                                               glViewImage *view_image);
+                                               glViewImage    *view_image);
 
-static void      size_changed_cb               (glWdgtSize *size,
-                                               glViewImage *view_image);
+static void      size_changed_cb               (glWdgtSize     *size,
+                                               glViewImage    *view_image);
 
-static void      size_reset_cb                 (GtkButton   *button,
-                                               glViewImage *view_image);
+static void      size_reset_cb                 (GtkButton      *button,
+                                               glViewImage    *view_image);
 
-static void      update_dialog_cb              (glLabelObject *object,
-                                               glViewImage *view_image);
+static void      update_dialog_cb              (glLabelObject  *object,
+                                               glViewImage    *view_image);
+
+static void      update_dialog_from_move_cb    (glLabelObject  *object,
+                                               gdouble         dx,
+                                               gdouble         dy,
+                                               glViewImage    *view_image);
 
 \f
 /*****************************************************************************/
@@ -368,6 +373,8 @@ construct_properties_dialog (glViewImage *view_image)
        /*----------------------------*/
        g_signal_connect (G_OBJECT (object), "changed",
                          G_CALLBACK (update_dialog_cb), view_image);
+       g_signal_connect (G_OBJECT (object), "moved",
+                         G_CALLBACK (update_dialog_from_move_cb), view_image);
 
        gl_debug (DEBUG_VIEW, "END");
 
@@ -379,7 +386,7 @@ construct_properties_dialog (glViewImage *view_image)
 /*---------------------------------------------------------------------------*/
 static void
 response_cb (GtkDialog     *dialog,
-            gint          response,
+            gint           response,
             glViewImage   *view_image)
 {
        gl_debug (DEBUG_VIEW, "START");
@@ -430,7 +437,7 @@ file_changed_cb (GtkEntry          *pixmap_entry,
 /* PRIVATE.  position "changed" callback.                                    */
 /*---------------------------------------------------------------------------*/
 static void
-position_changed_cb (glWdgtPosition     *position,
+position_changed_cb (glWdgtPosition   *position,
                     glViewImage      *view_image)
 {
        glLabelObject      *object;
@@ -455,7 +462,7 @@ position_changed_cb (glWdgtPosition     *position,
 /* PRIVATE.  size "changed" callback.                                        */
 /*---------------------------------------------------------------------------*/
 static void
-size_changed_cb (glWdgtSize     *size,
+size_changed_cb (glWdgtSize   *size,
                 glViewImage  *view_image)
 {
        glLabelObject *object;
@@ -506,7 +513,7 @@ size_reset_cb (GtkButton    *button,
 /* PRIVATE. label object "changed" callback.                                 */
 /*---------------------------------------------------------------------------*/
 static void
-update_dialog_cb (glLabelObject     *object,
+update_dialog_cb (glLabelObject   *object,
                  glViewImage     *view_image)
 {
        gchar              *filename;
@@ -550,6 +557,37 @@ update_dialog_cb (glLabelObject     *object,
        gl_debug (DEBUG_VIEW, "END");
 }
 
+/*---------------------------------------------------------------------------*/
+/* PRIVATE. label object "moved" callback.                                   */
+/*---------------------------------------------------------------------------*/
+static void
+update_dialog_from_move_cb (glLabelObject *object,
+                           gdouble        dx,
+                           gdouble        dy,
+                           glViewImage   *view_image)
+{
+       gdouble            x, y;
+
+       gl_debug (DEBUG_VIEW, "START");
+
+       /* Query properties of object. */
+       gl_label_object_get_position (GL_LABEL_OBJECT(object), &x, &y);
+
+       /* Block widget handlers to prevent recursion */
+       g_signal_handlers_block_by_func (G_OBJECT(view_image->private->position),
+                                        position_changed_cb, view_image);
+
+       /* Update widgets in property dialog */
+       gl_wdgt_position_set_position (GL_WDGT_POSITION(view_image->private->position),
+                                      x, y);
+
+       /* Unblock widget handlers */
+       g_signal_handlers_unblock_by_func (G_OBJECT(view_image->private->position),
+                                          position_changed_cb, view_image);
+
+       gl_debug (DEBUG_VIEW, "END");
+}
+
 /*****************************************************************************/
 /* Return apropos cursor for create object mode.                             */
 /*****************************************************************************/
index 2ec83848e6bac565c5f06690a86ddbe383ae9ab6..2cd987f8383be6fa1b6d9eaf30a2b12f2e255705 100644 (file)
@@ -68,30 +68,35 @@ static glViewObjectClass *parent_class = NULL;
 /* Private function prototypes.                           */
 /*========================================================*/
 
-static void      gl_view_line_class_init    (glViewLineClass *klass);
-static void      gl_view_line_instance_init (glViewLine *view_line);
-static void      gl_view_line_finalize      (GObject *object);
+static void      gl_view_line_class_init      (glViewLineClass *klass);
+static void      gl_view_line_instance_init   (glViewLine     *view_line);
+static void      gl_view_line_finalize        (GObject        *object);
 
-static void      update_view_line_cb        (glLabelObject *object,
-                                            glViewLine *view_line);
+static void      update_view_line_cb          (glLabelObject  *object,
+                                              glViewLine     *view_line);
 
-static GtkWidget *construct_properties_dialog (glViewLine *view_line);
+static GtkWidget *construct_properties_dialog (glViewLine     *view_line);
 
-static void      response_cb                (GtkDialog *dialog,
-                                            gint response,
-                                            glViewLine *view_line);
+static void      response_cb                  (GtkDialog      *dialog,
+                                              gint            response,
+                                              glViewLine     *view_line);
 
-static void      line_changed_cb            (glWdgtLine *line,
-                                            glViewLine *view_line);
+static void      line_changed_cb              (glWdgtLine     *line,
+                                              glViewLine     *view_line);
 
-static void      position_changed_cb        (glWdgtPosition *position,
-                                            glViewLine *view_line);
+static void      position_changed_cb          (glWdgtPosition *position,
+                                              glViewLine     *view_line);
 
-static void      vector_changed_cb          (glWdgtVector *vector,
-                                            glViewLine *view_line);
+static void      vector_changed_cb            (glWdgtVector   *vector,
+                                              glViewLine     *view_line);
 
-static void      update_dialog_cb           (glLabelObject *object,
-                                            glViewLine *view_line);
+static void      update_dialog_cb             (glLabelObject  *object,
+                                              glViewLine     *view_line);
+
+static void      update_dialog_from_move_cb   (glLabelObject  *object,
+                                              gdouble         dx,
+                                              gdouble         dy,
+                                              glViewLine     *view_line);
 
 \f
 /*****************************************************************************/
@@ -355,6 +360,8 @@ construct_properties_dialog (glViewLine *view_line)
        /*----------------------------*/
        g_signal_connect (G_OBJECT (object), "changed",
                          G_CALLBACK (update_dialog_cb), view_line);
+       g_signal_connect (G_OBJECT (object), "moved",
+                         G_CALLBACK (update_dialog_from_move_cb), view_line);
 
        gl_debug (DEBUG_VIEW, "END");
 
@@ -515,6 +522,37 @@ update_dialog_cb (glLabelObject     *object,
        gl_debug (DEBUG_VIEW, "END");
 }
 
+/*---------------------------------------------------------------------------*/
+/* PRIVATE. label object "moved" callback.                                   */
+/*---------------------------------------------------------------------------*/
+static void
+update_dialog_from_move_cb (glLabelObject *object,
+                           gdouble        dx,
+                           gdouble        dy,
+                           glViewLine    *view_line)
+{
+       gdouble            x, y;
+
+       gl_debug (DEBUG_VIEW, "START");
+
+       /* Query properties of object. */
+       gl_label_object_get_position (GL_LABEL_OBJECT(object), &x, &y);
+
+       /* Block widget handlers to prevent recursion */
+       g_signal_handlers_block_by_func (G_OBJECT(view_line->private->position),
+                                        position_changed_cb, view_line);
+
+       /* Update widgets in property dialog */
+       gl_wdgt_position_set_position (GL_WDGT_POSITION(view_line->private->position),
+                                      x, y);
+
+       /* Unblock widget handlers */
+       g_signal_handlers_unblock_by_func (G_OBJECT(view_line->private->position),
+                                          position_changed_cb, view_line);
+
+       gl_debug (DEBUG_VIEW, "END");
+}
+
 /*****************************************************************************/
 /* Return apropos cursor for create object mode.                             */
 /*****************************************************************************/
index 2d5ba759960e0468924b68b115e5dc59b30fa7e8..638ebad66f6ea94334fcdabb254261560eb0c6bf 100644 (file)
@@ -74,31 +74,36 @@ static glViewObjectClass *parent_class = NULL;
 /*========================================================*/
 
 static void      gl_view_text_class_init       (glViewTextClass *klass);
-static void      gl_view_text_instance_init    (glViewText *view_text);
-static void      gl_view_text_finalize         (GObject *object);
+static void      gl_view_text_instance_init    (glViewText      *view_text);
+static void      gl_view_text_finalize         (GObject         *object);
 
-static void      update_view_text_cb           (glLabelObject *object,
-                                               glViewText *view_text);
+static void      update_view_text_cb           (glLabelObject   *object,
+                                               glViewText      *view_text);
 
-static GtkWidget *construct_properties_dialog  (glViewText *view_text);
+static GtkWidget *construct_properties_dialog  (glViewText      *view_text);
 
-static void      response_cb                   (GtkDialog *dialog,
-                                               gint response,
-                                               glViewText *view_text);
+static void      response_cb                   (GtkDialog       *dialog,
+                                               gint             response,
+                                               glViewText      *view_text);
 
 static void      text_entry_changed_cb         (glWdgtTextEntry *text_entry,
-                                               glViewText *view_text);
+                                               glViewText      *view_text);
 
 static void      text_props_changed_cb         (glWdgtTextProps *text_props,
-                                               glViewText *view_text);
+                                               glViewText      *view_text);
 
-static void      position_changed_cb           (glWdgtPosition *position,
-                                               glViewText *view_text);
+static void      position_changed_cb           (glWdgtPosition  *position,
+                                               glViewText      *view_text);
 
-static void      update_dialog_cb              (glLabelObject *object,
-                                               glViewText *view_text);
+static void      update_dialog_cb              (glLabelObject   *object,
+                                               glViewText      *view_text);
 
-static void      draw_hacktext                 (glViewText *view_text);
+static void      update_dialog_from_move_cb    (glLabelObject   *object,
+                                               gdouble          dx,
+                                               gdouble          dy,
+                                               glViewText      *view_text);
+
+static void      draw_hacktext                 (glViewText      *view_text);
 
 \f
 /*****************************************************************************/
@@ -335,6 +340,8 @@ construct_properties_dialog (glViewText *view_text)
        /*----------------------------*/
        g_signal_connect (G_OBJECT (object), "changed",
                          G_CALLBACK (update_dialog_cb), view_text);
+       g_signal_connect (G_OBJECT (object), "moved",
+                         G_CALLBACK (update_dialog_from_move_cb), view_text);
 
        gl_debug (DEBUG_VIEW, "END");
 
@@ -516,6 +523,37 @@ update_dialog_cb (glLabelObject  *object,
        gl_debug (DEBUG_VIEW, "END");
 }
 
+/*---------------------------------------------------------------------------*/
+/* PRIVATE. label object "moved" callback.                                   */
+/*---------------------------------------------------------------------------*/
+static void
+update_dialog_from_move_cb (glLabelObject *object,
+                           gdouble        dx,
+                           gdouble        dy,
+                           glViewText    *view_text)
+{
+       gdouble            x, y;
+
+       gl_debug (DEBUG_VIEW, "START");
+
+       /* Query properties of object. */
+       gl_label_object_get_position (GL_LABEL_OBJECT(object), &x, &y);
+
+       /* Block widget handlers to prevent recursion */
+       g_signal_handlers_block_by_func (G_OBJECT(view_text->private->position),
+                                        position_changed_cb, view_text);
+
+       /* Update widgets in property dialog */
+       gl_wdgt_position_set_position (GL_WDGT_POSITION(view_text->private->position),
+                                      x, y);
+
+       /* Unblock widget handlers */
+       g_signal_handlers_unblock_by_func (G_OBJECT(view_text->private->position),
+                                          position_changed_cb, view_text);
+
+       gl_debug (DEBUG_VIEW, "END");
+}
+
 /*****************************************************************************/
 /* Return apropos cursor for create object mode.                             */
 /*****************************************************************************/