[maemo-commits] [maemo-commits] r10883 - in projects/haf/trunk/hildon-desktop: . libhildondesktop src
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Mon Apr 2 12:11:45 EEST 2007
- Previous message: [maemo-commits] r10882 - projects/haf/hafbuildbot
- Next message: [maemo-commits] r10884 - in projects/haf/trunk/hildon-desktop: . debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: jobi Date: 2007-04-02 12:11:42 +0300 (Mon, 02 Apr 2007) New Revision: 10883 Modified: projects/haf/trunk/hildon-desktop/ChangeLog projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-home-area.c projects/haf/trunk/hildon-desktop/src/hd-desktop.c Log: 2007-04-02 Johan Bilien <johan.bilien at nokia.com> * libhildondesktop/hildon-home-area.c: - Sort the region before using for placement * src/hd-desktop.c: - Fixed the path used to load the containers Modified: projects/haf/trunk/hildon-desktop/ChangeLog =================================================================== --- projects/haf/trunk/hildon-desktop/ChangeLog 2007-04-02 07:54:26 UTC (rev 10882) +++ projects/haf/trunk/hildon-desktop/ChangeLog 2007-04-02 09:11:42 UTC (rev 10883) @@ -1,6 +1,13 @@ 2007-04-02 Johan Bilien <johan.bilien at nokia.com> * libhildondesktop/hildon-home-area.c: + - Sort the region before using for placement + * src/hd-desktop.c: + - Fixed the path used to load the containers + +2007-04-02 Johan Bilien <johan.bilien at nokia.com> + + * libhildondesktop/hildon-home-area.c: - added applet-padding property which specifies the padding between newly added applets - re-implemented auto-arrange without using GdkRegion, whose Modified: projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-home-area.c =================================================================== --- projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-home-area.c 2007-04-02 07:54:26 UTC (rev 10882) +++ projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-home-area.c 2007-04-02 09:11:42 UTC (rev 10883) @@ -621,15 +621,7 @@ return r; } -#if 0 static void -print_rectangle (GdkRectangle *rect) -{ - g_print ("(%i,%i)\t %ix%i\n", rect->x, rect->y, rect->width, rect->height); -} -#endif - -static void substract_rectangle (GdkRectangle *original, GdkRectangle *rectangle, GList **result) @@ -746,11 +738,14 @@ GdkRectangle r = {0}; gint x, y; gint padding; + const gchar *name; gtk_container_child_get (GTK_CONTAINER (widget->parent), widget, "x", &x, "y", &y, NULL); + g_object_get (widget, "id", &name, NULL); + g_debug ("Removing %s", name); g_object_get (widget->parent, "applet-padding", &padding, @@ -774,6 +769,16 @@ substract_rectangle_from_region (region, &r); } +/* Sorts top - left first */ +static gint +sort_rectangles (GdkRectangle *r1, GdkRectangle *r2) +{ + return (r1->y - r2->y)? + r1->y - r2->y: + r1->x - r2->x; + +} + static void hildon_home_area_batch_add (HildonHomeArea *area) { @@ -808,6 +813,7 @@ (GtkCallback)remove_widget, region); + region = g_list_sort (region, (GCompareFunc)sort_rectangles); i = priv->to_add; while (i) @@ -867,6 +873,7 @@ } substract_rectangle_from_region (region, layout); + region = g_list_sort (region, (GCompareFunc)sort_rectangles); break; } Modified: projects/haf/trunk/hildon-desktop/src/hd-desktop.c =================================================================== --- projects/haf/trunk/hildon-desktop/src/hd-desktop.c 2007-04-02 07:54:26 UTC (rev 10882) +++ projects/haf/trunk/hildon-desktop/src/hd-desktop.c 2007-04-02 09:11:42 UTC (rev 10883) @@ -235,7 +235,7 @@ if (error) { - g_warning ("Error loading container configuration file: %s", error->message); + g_warning ("Error loading container configuration file %s: %s", config_file, error->message); g_error_free (error); return NULL; @@ -259,6 +259,7 @@ HDDesktopPrivate *priv; HDDesktopContainerInfo *info; GList *plugin_list; + gchar *config_file_path; g_return_if_fail (user_data != NULL); @@ -268,7 +269,9 @@ priv = info->desktop->priv; - plugin_list = hd_desktop_plugin_list_from_conf (info->config_file); + config_file_path = hd_desktop_get_conf_file_path (info->config_file); + plugin_list = hd_desktop_plugin_list_from_conf (config_file_path); + g_free (config_file_path); hd_plugin_manager_sync (HD_PLUGIN_MANAGER (priv->pm), plugin_list,
- Previous message: [maemo-commits] r10882 - projects/haf/hafbuildbot
- Next message: [maemo-commits] r10884 - in projects/haf/trunk/hildon-desktop: . debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]