diff options
author | Juan Pablo Ugarte <juanpablougarte@gmail.com> | 2013-07-01 17:12:45 -0300 |
---|---|---|
committer | Juan Pablo Ugarte <juanpablougarte@gmail.com> | 2013-07-01 17:12:45 -0300 |
commit | 19ebe3e7401112ad9f3f6b91e6c53fd622601232 (patch) | |
tree | 44e1004f3d809166a035a29d145c66914f7f7930 /gladeui/glade-design-layout.c | |
parent | 752ee621bd3bbb1ee081b2a6a60a065f2375db32 (diff) | |
download | glade-19ebe3e7401112ad9f3f6b91e6c53fd622601232.tar.gz |
Made double click on the toplevel border select the widget even if there is a child selected.
Diffstat (limited to 'gladeui/glade-design-layout.c')
-rw-r--r-- | gladeui/glade-design-layout.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gladeui/glade-design-layout.c b/gladeui/glade-design-layout.c index 81863cd6..56d9ec0d 100644 --- a/gladeui/glade-design-layout.c +++ b/gladeui/glade-design-layout.c @@ -589,7 +589,8 @@ glade_design_layout_button_press_event (GtkWidget *widget, GdkEventButton *ev) GtkWidget *child; gint x, y; - if (ev->button != 1 || ev->type != GDK_BUTTON_PRESS || + if (ev->button != 1 || + (ev->type != GDK_BUTTON_PRESS && ev->type != GDK_2BUTTON_PRESS) || (child = gtk_bin_get_child (GTK_BIN (widget))) == NULL) return FALSE; @@ -694,8 +695,9 @@ glade_design_layout_button_press_event (GtkWidget *widget, GdkEventButton *ev) priv->dx = x - (child_allocation.x + child_allocation.width + priv->child_offset); priv->dy = y - (child_allocation.y + child_allocation.height + priv->child_offset); - if (activity != ACTIVITY_NONE && - !glade_project_is_toplevel_active (priv->project, child)) + if (activity != ACTIVITY_NONE && + (!glade_project_is_toplevel_active (priv->project, child) || + ev->type == GDK_2BUTTON_PRESS)) { _glade_design_view_freeze (priv->view); glade_project_selection_set (priv->project, G_OBJECT (child), TRUE); @@ -704,7 +706,6 @@ glade_design_layout_button_press_event (GtkWidget *widget, GdkEventButton *ev) return FALSE; } - static gboolean glade_design_layout_button_release_event (GtkWidget *widget, GdkEventButton *ev) |