2006-05-29 Luc Pionchon <luc.pionchon@nokia.com>
+ * hildon-widgets/hildon-app.c
+ (hildon_app_key_snooper): Add code to control if there is a
+ combobox activated when the menu key is pressed and prevent the
+ menu drawing.
+
+ NB#26383
+
+
+2006-05-29 Luc Pionchon <luc.pionchon@nokia.com>
+
* hildon-widgets/hildon-banner.c
(hildon_banner_set_property): Set max_width hint to -1 instead of
HILDON_BANNER_LABEL_MAX_TIMED when banner is timed to avoid. This
#include <gtk/gtkuimanager.h>
#include <gtk/gtkactiongroup.h>
#include <gtk/gtkdialog.h>
+#include <gtk/gtktogglebutton.h>
+#include <gtk/gtkcombobox.h>
#include <libintl.h>
#include <string.h>
if ( HILDON_KEYEVENT_IS_MENU_KEY (keyevent) ) {
HildonAppView *appview;
HildonAppPrivate *priv;
- GtkWidget *toplevel;
-
+ GtkWidget *toplevel;
+ GtkWidget *focus = NULL;
+
/* Don't act on modal dialogs */
toplevel = gtk_widget_get_toplevel (widget);
+ focus = gtk_window_get_focus(GTK_WINDOW(app));
+
+ /* Don't act when comboboxes are active, if a togglebutton
+ (combobox) has the focus and it is active, we deactivate the
+ combobox and do nothing */
+ if (GTK_IS_TOGGLE_BUTTON (focus))
+ {
+ GtkWidget *parent = gtk_widget_get_parent (focus);
+
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (focus)) &&
+ GTK_IS_COMBO_BOX (parent))
+ {
+ gtk_combo_box_popdown (GTK_COMBO_BOX (parent));
+ return TRUE;
+ }
+ }
+
if (GTK_IS_DIALOG (toplevel)
&& gtk_window_get_modal (GTK_WINDOW (toplevel)))
{