From b7270cca21f97c762f1a1ff50f63df7efc8b2c5c Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Wed, 4 Feb 2004 02:11:18 +0000 Subject: [PATCH] 2004-02-03 Jim Evins * src/object-editor-image-page.c: (gl_object_editor_prepare_image_page): Track "changed" signal of pixmap entry's GtkEntry rather than its "activate" signal -- this catches all changes to the entry rather than just changes resulting from a browse, so one can easily pull previous entries from the history. * src/view-highlight.c: (tl_resize_event_handler), (tr_resize_event_handler), (bl_resize_event_handler), (br_resize_event_handler): Allow control key to be dropped while dragging a corner resize handle without losing the aspect ratio lock. git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@411 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- glabels2/ChangeLog | 15 +++++++++++++++ glabels2/src/view-highlight.c | 20 ++++++++------------ 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/glabels2/ChangeLog b/glabels2/ChangeLog index 00aa3a24..c28bbbac 100644 --- a/glabels2/ChangeLog +++ b/glabels2/ChangeLog @@ -1,3 +1,18 @@ +2004-02-03 Jim Evins + + * src/object-editor-image-page.c: + (gl_object_editor_prepare_image_page): + Track "changed" signal of pixmap entry's GtkEntry rather than its + "activate" signal -- this catches all changes to the entry rather than + just changes resulting from a browse, so one can easily pull previous + entries from the history. + + * src/view-highlight.c: (tl_resize_event_handler), + (tr_resize_event_handler), (bl_resize_event_handler), + (br_resize_event_handler): + Allow control key to be dropped while dragging a corner resize handle + without losing the aspect ratio lock. + 2004-02-02 Jim Evins * src/label-image.c: (gl_label_image_set_filename): diff --git a/glabels2/src/view-highlight.c b/glabels2/src/view-highlight.c index 67659800..019715f5 100644 --- a/glabels2/src/view-highlight.c +++ b/glabels2/src/view-highlight.c @@ -985,9 +985,9 @@ tl_resize_event_handler (GnomeCanvasItem *handle_item, gdouble x0, y0, w, h; gdouble x1, y1, x2, y2; static gboolean dragging = FALSE; + static gboolean is_control_pressed; glLabelObject *object; GdkCursor *cursor; - gboolean is_control_pressed; if ( view_highlight->private->view->state != GL_VIEW_STATE_ARROW ) { /* don't interfere with object creation modes */ @@ -1001,6 +1001,7 @@ tl_resize_event_handler (GnomeCanvasItem *handle_item, case GDK_BUTTON_PRESS: switch (event->button.button) { case 1: + is_control_pressed = event->button.state & GDK_CONTROL_MASK; dragging = TRUE; gnome_canvas_item_grab (handle_item, GDK_POINTER_MOTION_MASK | @@ -1016,7 +1017,6 @@ tl_resize_event_handler (GnomeCanvasItem *handle_item, case GDK_BUTTON_RELEASE: switch (event->button.button) { case 1: - is_control_pressed = event->button.state & GDK_CONTROL_MASK; dragging = FALSE; get_origin_and_corners (view_highlight, &x0, &y0, &x1, &y1, &x2, &y2); @@ -1046,7 +1046,6 @@ tl_resize_event_handler (GnomeCanvasItem *handle_item, case GDK_MOTION_NOTIFY: if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { - is_control_pressed = event->button.state & GDK_CONTROL_MASK; get_origin_and_corners (view_highlight, &x0, &y0, &x1, &y1, &x2, &y2); gnome_canvas_item_w2i (view_highlight->private->group, @@ -1101,9 +1100,9 @@ tr_resize_event_handler (GnomeCanvasItem *handle_item, gdouble x0, y0, w, h; gdouble x1, y1, x2, y2; static gboolean dragging = FALSE; + static gboolean is_control_pressed; glLabelObject *object; GdkCursor *cursor; - gboolean is_control_pressed; if ( view_highlight->private->view->state != GL_VIEW_STATE_ARROW ) { /* don't interfere with object creation modes */ @@ -1117,6 +1116,7 @@ tr_resize_event_handler (GnomeCanvasItem *handle_item, case GDK_BUTTON_PRESS: switch (event->button.button) { case 1: + is_control_pressed = event->button.state & GDK_CONTROL_MASK; dragging = TRUE; gnome_canvas_item_grab (handle_item, GDK_POINTER_MOTION_MASK | @@ -1132,7 +1132,6 @@ tr_resize_event_handler (GnomeCanvasItem *handle_item, case GDK_BUTTON_RELEASE: switch (event->button.button) { case 1: - is_control_pressed = event->button.state & GDK_CONTROL_MASK; dragging = FALSE; get_origin_and_corners (view_highlight, &x0, &y0, &x1, &y1, &x2, &y2); @@ -1162,7 +1161,6 @@ tr_resize_event_handler (GnomeCanvasItem *handle_item, case GDK_MOTION_NOTIFY: if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { - is_control_pressed = event->button.state & GDK_CONTROL_MASK; get_origin_and_corners (view_highlight, &x0, &y0, &x1, &y1, &x2, &y2); gnome_canvas_item_w2i (view_highlight->private->group, @@ -1217,9 +1215,9 @@ bl_resize_event_handler (GnomeCanvasItem *handle_item, gdouble x0, y0, w, h; gdouble x1, y1, x2, y2; static gboolean dragging = FALSE; + static gboolean is_control_pressed; glLabelObject *object; GdkCursor *cursor; - gboolean is_control_pressed; if ( view_highlight->private->view->state != GL_VIEW_STATE_ARROW ) { /* don't interfere with object creation modes */ @@ -1233,6 +1231,7 @@ bl_resize_event_handler (GnomeCanvasItem *handle_item, case GDK_BUTTON_PRESS: switch (event->button.button) { case 1: + is_control_pressed = event->button.state & GDK_CONTROL_MASK; dragging = TRUE; gnome_canvas_item_grab (handle_item, GDK_POINTER_MOTION_MASK | @@ -1248,7 +1247,6 @@ bl_resize_event_handler (GnomeCanvasItem *handle_item, case GDK_BUTTON_RELEASE: switch (event->button.button) { case 1: - is_control_pressed = event->button.state & GDK_CONTROL_MASK; dragging = FALSE; get_origin_and_corners (view_highlight, &x0, &y0, &x1, &y1, &x2, &y2); @@ -1278,7 +1276,6 @@ bl_resize_event_handler (GnomeCanvasItem *handle_item, case GDK_MOTION_NOTIFY: if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { - is_control_pressed = event->button.state & GDK_CONTROL_MASK; get_origin_and_corners (view_highlight, &x0, &y0, &x1, &y1, &x2, &y2); gnome_canvas_item_w2i (view_highlight->private->group, @@ -1333,9 +1330,9 @@ br_resize_event_handler (GnomeCanvasItem *handle_item, gdouble x0, y0, w, h; gdouble x1, y1, x2, y2; static gboolean dragging = FALSE; + static gboolean is_control_pressed; glLabelObject *object; GdkCursor *cursor; - gboolean is_control_pressed; if ( view_highlight->private->view->state != GL_VIEW_STATE_ARROW ) { /* don't interfere with object creation modes */ @@ -1350,6 +1347,7 @@ br_resize_event_handler (GnomeCanvasItem *handle_item, gl_debug (DEBUG_VIEW, "BUTTON_PRESS"); switch (event->button.button) { case 1: + is_control_pressed = event->button.state & GDK_CONTROL_MASK; dragging = TRUE; gnome_canvas_item_grab (handle_item, GDK_POINTER_MOTION_MASK | @@ -1366,7 +1364,6 @@ br_resize_event_handler (GnomeCanvasItem *handle_item, gl_debug (DEBUG_VIEW, "BUTTON_RELEASE"); switch (event->button.button) { case 1: - is_control_pressed = event->button.state & GDK_CONTROL_MASK; dragging = FALSE; get_origin_and_corners (view_highlight, &x0, &y0, &x1, &y1, &x2, &y2); @@ -1396,7 +1393,6 @@ br_resize_event_handler (GnomeCanvasItem *handle_item, case GDK_MOTION_NOTIFY: gl_debug (DEBUG_VIEW, "MOTION_NOTIFY"); if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { - is_control_pressed = event->button.state & GDK_CONTROL_MASK; get_origin_and_corners (view_highlight, &x0, &y0, &x1, &y1, &x2, &y2); gnome_canvas_item_w2i (view_highlight->private->group, -- 2.39.5