[gnumeric] Fixed autofilter popup grab. [#657036]
- From: Jean BrÃfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Fixed autofilter popup grab. [#657036]
- Date: Sat, 10 Sep 2011 20:51:49 +0000 (UTC)
commit 8b48efdea169cc7730c0e7327c2fb603554004e8
Author: Jean Brefort <jean brefort normalesup org>
Date: Sat Sep 10 22:56:09 2011 +0200
Fixed autofilter popup grab. [#657036]
src/dialogs/autofilter-top10.ui | 27 +++------------------------
src/widgets/ChangeLog | 4 ++++
src/widgets/gnm-cell-combo-view.c | 24 ++++++++++++++++++------
3 files changed, 25 insertions(+), 30 deletions(-)
---
diff --git a/src/dialogs/autofilter-top10.ui b/src/dialogs/autofilter-top10.ui
index c465bf6..f15116c 100644
--- a/src/dialogs/autofilter-top10.ui
+++ b/src/dialogs/autofilter-top10.ui
@@ -97,32 +97,16 @@
<object class="GtkRadioButton" id="items-largest">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="receives_default">False</property>
<property name="border_width">6</property>
- <property name="spacing">12</property>
+ <property name="use_action_appearance">False</property>
+ <property name="draw_indicator">False</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Count or percentage:</property>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="item_count">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="adjustment">adjustment1</property>
- <property name="climb_rate">1</property>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
</child>
</object>
<packing>
@@ -183,11 +167,6 @@
<object class="GtkBox" id="hbox1">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">items-largest</property>
</object>
<packing>
<property name="expand">False</property>
diff --git a/src/widgets/ChangeLog b/src/widgets/ChangeLog
index 64a81a4..1cfe506 100644
--- a/src/widgets/ChangeLog
+++ b/src/widgets/ChangeLog
@@ -1,3 +1,7 @@
+2011-09-10 Jean Brefort <jean brefort normalesup org>
+
+ * gnm-cell-combo-view.c (gnm_cell_combo_view_popdown): fixed grab. [#657036]
+
2011-08-23 Andreas J. Guelzow <aguelzow pyrshep ca>
* gnm-format-sel.c (gnm_format_sel_new): use go_format_sel_new_full
diff --git a/src/widgets/gnm-cell-combo-view.c b/src/widgets/gnm-cell-combo-view.c
index 2ce768c..deed3fe 100644
--- a/src/widgets/gnm-cell-combo-view.c
+++ b/src/widgets/gnm-cell-combo-view.c
@@ -281,6 +281,7 @@ gnm_cell_combo_view_popdown (SheetObjectView *sov, guint32 activate_time)
GtkRequisition req;
GtkWindow *toplevel = wbcg_toplevel (scg_wbcg (scg));
GdkWindow *popup_window;
+ GdkDevice *device;
popup = gtk_window_new (GTK_WINDOW_POPUP);
@@ -395,12 +396,23 @@ gnm_cell_combo_view_popdown (SheetObjectView *sov, guint32 activate_time)
popup_window = gtk_widget_get_window (popup);
- gdk_device_grab (gtk_get_current_event_device (), popup_window,
- GDK_OWNERSHIP_APPLICATION, TRUE,
- GDK_BUTTON_PRESS_MASK |
- GDK_BUTTON_RELEASE_MASK |
- GDK_POINTER_MOTION_MASK,
- NULL, activate_time);
+ device = gtk_get_current_event_device ();
+ if (0 == gdk_device_grab (device, popup_window,
+ GDK_OWNERSHIP_APPLICATION, TRUE,
+ GDK_BUTTON_PRESS_MASK |
+ GDK_BUTTON_RELEASE_MASK |
+ GDK_POINTER_MOTION_MASK,
+ NULL, activate_time)) {
+ if (0 == gdk_device_grab (gdk_device_get_associated_device (device),
+ popup_window,
+ GDK_OWNERSHIP_APPLICATION, TRUE,
+ GDK_KEY_PRESS_MASK |
+ GDK_KEY_RELEASE_MASK,
+ NULL, activate_time))
+ gtk_grab_add (popup);
+ else
+ gdk_device_ungrab (device, activate_time);
+ }
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]