[glade] Made double click on the toplevel border select the widget even if there is a child selected.
- From: Juan Pablo Ugarte <jpu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade] Made double click on the toplevel border select the widget even if there is a child selected.
- Date: Mon, 1 Jul 2013 20:23:22 +0000 (UTC)
commit 19ebe3e7401112ad9f3f6b91e6c53fd622601232
Author: Juan Pablo Ugarte <juanpablougarte gmail com>
Date: Mon Jul 1 17:12:45 2013 -0300
Made double click on the toplevel border select the widget even if there is a child selected.
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 81863cd..56d9ec0 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]