[maemo-commits] [maemo-commits] r12959 - in projects/haf/trunk/hildon-desktop: . libhildondesktop src
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Tue Jul 31 16:49:52 EEST 2007
- Previous message: [maemo-commits] r12958 - in projects/haf/tags: . gtkhtml
- Next message: [maemo-commits] r12960 - in projects/haf/trunk/hildon-desktop: . src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: lucasr Date: 2007-07-31 16:49:50 +0300 (Tue, 31 Jul 2007) New Revision: 12959 Modified: projects/haf/trunk/hildon-desktop/ChangeLog projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-popup-menu.c projects/haf/trunk/hildon-desktop/src/hd-applications-menu.c Log: 2007-07-31 Lucas Rocha <lucas.rocha at nokia.com> * src/hd-applications-menu.c (hd_applications_menu_categories_motion_notify): make the motion notify handler lighter so that it doesn't bring performance problems. * libhildondesktop/hildon-desktop-popup-menu.c (hildon_desktop_popup_menu_motion_notify): propagate the motion event Modified: projects/haf/trunk/hildon-desktop/ChangeLog =================================================================== --- projects/haf/trunk/hildon-desktop/ChangeLog 2007-07-31 13:33:45 UTC (rev 12958) +++ projects/haf/trunk/hildon-desktop/ChangeLog 2007-07-31 13:49:50 UTC (rev 12959) @@ -1,3 +1,11 @@ +2007-07-31 Lucas Rocha <lucas.rocha at nokia.com> + + * src/hd-applications-menu.c + (hd_applications_menu_categories_motion_notify): make the motion + notify handler lighter so that it doesn't bring performance problems. + * libhildondesktop/hildon-desktop-popup-menu.c + (hildon_desktop_popup_menu_motion_notify): propagate the motion event + 2007-07-31 Johan Bilien <johan.bilien at nokia.com> * src/hd-app-menu-tree.c: Modified: projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-popup-menu.c =================================================================== --- projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-popup-menu.c 2007-07-31 13:33:45 UTC (rev 12958) +++ projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-popup-menu.c 2007-07-31 13:49:50 UTC (rev 12959) @@ -476,7 +476,7 @@ g_list_free (menu_items); - return TRUE; + return FALSE; } static void @@ -991,7 +991,7 @@ { do { - hildon_desktop_popup_menu_scroll_cb (menu->priv->scroll_down, menu); + hildon_desktop_popup_menu_scroll_cb (menu->priv->scroll_up, menu); position -= menu->priv->item_height; } while (position > screen_height); Modified: projects/haf/trunk/hildon-desktop/src/hd-applications-menu.c =================================================================== --- projects/haf/trunk/hildon-desktop/src/hd-applications-menu.c 2007-07-31 13:33:45 UTC (rev 12958) +++ projects/haf/trunk/hildon-desktop/src/hd-applications-menu.c 2007-07-31 13:49:50 UTC (rev 12959) @@ -814,41 +814,13 @@ GdkEventMotion *event, HDApplicationsMenu *button) { - HildonDesktopPopupMenu *menu = HILDON_DESKTOP_POPUP_MENU (widget); - GList *menu_items = NULL, *l; - gint w,h,x,y; + GtkMenuItem *selected = + hildon_desktop_popup_menu_get_selected_item (HILDON_DESKTOP_POPUP_MENU (widget)); - gtk_widget_get_pointer (GTK_WIDGET (widget), &x, &y); + button->priv->focus_applications = TRUE; - w = widget->allocation.width; - h = widget->allocation.height; + gtk_menu_item_activate (selected); - if (!((x >= 0) && (x <= w) && (y >= 0) && (y <= h))) - return TRUE; - - menu_items = - hildon_desktop_popup_menu_get_children (menu); - - for (l = menu_items; l != NULL; l = g_list_next (l)) - gtk_item_deselect (GTK_ITEM (l->data)); - - for (l = menu_items; l != NULL; l = g_list_next (l)) - { - gtk_widget_get_pointer (GTK_WIDGET (l->data), &x, &y); - - w = GTK_WIDGET (l->data)->allocation.width; - h = GTK_WIDGET (l->data)->allocation.height; - - if ((x >= 0) && (x <= w) && (y >= 0) && (y <= h)) - { - hildon_desktop_popup_menu_select_item (menu, GTK_MENU_ITEM (l->data)); - button->priv->focus_applications = TRUE; - gtk_menu_item_activate (GTK_MENU_ITEM (l->data)); - } - } - - g_list_free (menu_items); - return TRUE; } @@ -889,10 +861,10 @@ "parent", popup_window, NULL)); - g_signal_connect (G_OBJECT (button->priv->menu_categories), - "motion-notify-event", - G_CALLBACK (hd_applications_menu_categories_motion_notify), - button); + g_signal_connect_after (G_OBJECT (button->priv->menu_categories), + "motion-notify-event", + G_CALLBACK (hd_applications_menu_categories_motion_notify), + button); gtk_widget_show (GTK_WIDGET (button->priv->menu_categories)); @@ -1124,6 +1096,7 @@ GDK_CURRENT_TIME); hildon_desktop_popup_menu_select_first_item (button->priv->menu_categories); + hildon_desktop_popup_menu_scroll_to_selected (button->priv->menu_categories); menu_items = hildon_desktop_popup_menu_get_children (button->priv->menu_categories);
- Previous message: [maemo-commits] r12958 - in projects/haf/tags: . gtkhtml
- Next message: [maemo-commits] r12960 - in projects/haf/trunk/hildon-desktop: . src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]