[maemo-commits] [maemo-commits] r10236 - in projects/haf/branches/hildon-control-panel/refactoring: . debian src
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Wed Feb 28 10:10:21 EET 2007
- Previous message: [maemo-commits] r10234 - in projects/haf/trunk/hildon-theme-layout-4: . data
- Next message: [maemo-commits] r10237 - projects/haf/branches/hildon-control-panel/refactoring/debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: lucasr Date: 2007-02-28 10:10:20 +0200 (Wed, 28 Feb 2007) New Revision: 10236 Modified: projects/haf/branches/hildon-control-panel/refactoring/ChangeLog projects/haf/branches/hildon-control-panel/refactoring/configure.ac projects/haf/branches/hildon-control-panel/refactoring/debian/control projects/haf/branches/hildon-control-panel/refactoring/src/Makefile.am projects/haf/branches/hildon-control-panel/refactoring/src/hcp-app-list.c projects/haf/branches/hildon-control-panel/refactoring/src/hcp-main.c Log: 2007-02-28 Lucas Rocha <lucas.rocha at nokia.com> * configure.ac, src/Makefile.am, src/hcp-app-list.c, debian/control: get rid of hildon-base-lib dependency. Using gnome-vfs file monitoring API now. Modified: projects/haf/branches/hildon-control-panel/refactoring/ChangeLog =================================================================== --- projects/haf/branches/hildon-control-panel/refactoring/ChangeLog 2007-02-27 16:22:54 UTC (rev 10235) +++ projects/haf/branches/hildon-control-panel/refactoring/ChangeLog 2007-02-28 08:10:20 UTC (rev 10236) @@ -1,3 +1,9 @@ +2007-02-28 Lucas Rocha <lucas.rocha at nokia.com> + + * configure.ac, src/Makefile.am, src/hcp-app-list.c, debian/control: + get rid of hildon-base-lib dependency. Using gnome-vfs file monitoring + API now. + 2007-02-21 Lucas Rocha <lucas.rocha at nokia.com> * src/hcp-grid.c: fix the large icons size. Modified: projects/haf/branches/hildon-control-panel/refactoring/configure.ac =================================================================== --- projects/haf/branches/hildon-control-panel/refactoring/configure.ac 2007-02-27 16:22:54 UTC (rev 10235) +++ projects/haf/branches/hildon-control-panel/refactoring/configure.ac 2007-02-28 08:10:20 UTC (rev 10236) @@ -47,9 +47,9 @@ AC_SUBST(HILDON_LIBS) AC_SUBST(HILDON_CFLAGS) -PKG_CHECK_MODULES(HILDONBASELIB, hildon-base-lib >= 0.7.1) -AC_SUBST(HILDONBASELIB_LIBS) -AC_SUBST(HILDONBASELIB_CFLAGS) +PKG_CHECK_MODULES(GNOME_VFS, gnome-vfs-2.0 >= 2.8.3) +AC_SUBST(GNOME_VFS_CFLAGS) +AC_SUBST(GNOME_VFS_LIBS) PKG_CHECK_MODULES(LIBOSSOHELP, libossohelp >= 0.0.4) AC_SUBST(LIBOSSOHELP) Modified: projects/haf/branches/hildon-control-panel/refactoring/debian/control =================================================================== --- projects/haf/branches/hildon-control-panel/refactoring/debian/control 2007-02-27 16:22:54 UTC (rev 10235) +++ projects/haf/branches/hildon-control-panel/refactoring/debian/control 2007-02-28 08:10:20 UTC (rev 10236) @@ -2,7 +2,7 @@ Section: x11 Priority: optional Maintainer: Lucas Rocha <lucas.rocha at nokia.com> -Build-Depends: debhelper (>= 4.0.0), libhildon1-dev (>= 0.9.9), hildon-base-lib-dev, pkg-config, libosso-dev (>= 1.5), osso-af-settings, libosso-help-dev +Build-Depends: debhelper (>= 4.0.0), lbosso-gnomevfs2-dev, libhildon1-dev (>= 0.9.9), pkg-config, libosso-dev (>= 1.5), osso-af-settings, libosso-help-dev Standards-Version: 3.6.0 Package: hildon-control-panel Modified: projects/haf/branches/hildon-control-panel/refactoring/src/Makefile.am =================================================================== --- projects/haf/branches/hildon-control-panel/refactoring/src/Makefile.am 2007-02-27 16:22:54 UTC (rev 10235) +++ projects/haf/branches/hildon-control-panel/refactoring/src/Makefile.am 2007-02-28 08:10:20 UTC (rev 10236) @@ -20,11 +20,12 @@ # INCLUDES = \ - $(HILDON_CFLAGS) $(HILDONBASELIB_CFLAGS)\ + $(HILDON_CFLAGS) \ $(MAEMO_LAUNCHER_CFLAGS) \ $(OSSO_CFLAGS)\ $(LIBOSSOHELP_CFLAGS) \ $(GCONF_CFLAGS) \ + $(GNOME_VFS_CFLAGS) \ -DLOCALEDIR=\"$(localedir)\" \ -DPREFIXDIR=\"$(prefix)\" \ -DCONTROLPANEL_ENTRY_DIR=\"$(hildoncpdesktopentrydir)\" \ @@ -65,8 +66,11 @@ controlpanel_LDFLAGS = $(MAEMO_LAUNCHER_LDFLAGS) controlpanel_LDADD = \ - $(HILDON_LIBS) $(HILDONBASELIB_LIBS) $(OSSO_LIBS)\ - $(LIBOSSOHELP_LIBS) $(GCONF_LIBS) + $(HILDON_LIBS) \ + $(OSSO_LIBS) \ + $(LIBOSSOHELP_LIBS) \ + $(GCONF_LIBS) \ + $(GNOME_VFS_LIBS) hildon_cp_pluginincludeinstdir=$(includedir)/hildon-cp-plugin hildon_cp_pluginincludeinst_DATA = hildon-cp-plugin-interface.h Modified: projects/haf/branches/hildon-control-panel/refactoring/src/hcp-app-list.c =================================================================== --- projects/haf/branches/hildon-control-panel/refactoring/src/hcp-app-list.c 2007-02-27 16:22:54 UTC (rev 10235) +++ projects/haf/branches/hildon-control-panel/refactoring/src/hcp-app-list.c 2007-02-28 08:10:20 UTC (rev 10236) @@ -25,11 +25,11 @@ #include <string.h> #include <libosso.h> -#include <hildon-base-lib/hildon-base-dnotify.h> #include <gtk/gtk.h> #include <gconf/gconf-client.h> #include <glib/gi18n.h> +#include <libgnomevfs/gnome-vfs.h> #include "hcp-app-list.h" #include "hcp-app.h" @@ -57,8 +57,9 @@ struct _HCPAppListPrivate { - GHashTable *apps; - GSList *categories; + GHashTable *apps; + GSList *categories; + GnomeVFSMonitorHandle *monitor; }; #define HCP_SEPARATOR_DEFAULT _("copa_ia_extras") @@ -69,10 +70,8 @@ static int callback_pending = 0; -/* Called by dnotify_callback_f after a timeout (to prevent exessive - callbacks. */ static gboolean -hcp_dnotify_reread_desktop_entries (HCPAppList *al) +hcp_monitor_reread_desktop_entries (HCPAppList *al) { callback_pending = 0; @@ -87,42 +86,41 @@ } static void -hcp_dnotify_callback_f (char *path, HCPAppList *al) +hcp_monitor_callback_f (GnomeVFSMonitorHandle *handle, + const gchar *monitor_uri, + const gchar *info_uri, + GnomeVFSMonitorEventType event_type, + HCPAppList *al) { if (!callback_pending) { callback_pending = 1; g_timeout_add (HCP_DIR_READ_DELAY, - (GSourceFunc) hcp_dnotify_reread_desktop_entries, al); + (GSourceFunc) hcp_monitor_reread_desktop_entries, al); } } static int -hcp_init_dnotify (HCPAppList *al, const gchar *path) +hcp_init_monitor (HCPAppList *al, const gchar *path) { - hildon_return_t ret; + GnomeVFSResult ret; - g_return_val_if_fail (al, HILDON_ERR); - g_return_val_if_fail (HCP_IS_APP_LIST (al), HILDON_ERR); - g_return_val_if_fail (path, HILDON_ERR); + g_return_val_if_fail (al, GNOME_VFS_ERROR_GENERIC); + g_return_val_if_fail (HCP_IS_APP_LIST (al), GNOME_VFS_ERROR_GENERIC); + g_return_val_if_fail (path, GNOME_VFS_ERROR_GENERIC); - ret = hildon_dnotify_handler_init (); + ret = gnome_vfs_monitor_add (&al->priv->monitor, + path, + GNOME_VFS_MONITOR_DIRECTORY, + (GnomeVFSMonitorCallback) hcp_monitor_callback_f, + al); - if (ret != HILDON_OK) + if (ret != GNOME_VFS_OK) { - return ret; - } - - ret = hildon_dnotify_set_cb ((hildon_dnotify_cb_f *) hcp_dnotify_callback_f, - (gchar *) path, - al); - - if (ret != HILDON_OK) - { return ret; } - return HILDON_OK; + return GNOME_VFS_OK; } static void @@ -224,7 +222,9 @@ al->priv->categories = g_slist_append (al->priv->categories, extras_category); - hcp_init_dnotify (al, CONTROLPANEL_ENTRY_DIR); + al->priv->monitor = NULL; + + hcp_init_monitor (al, CONTROLPANEL_ENTRY_DIR); } static void @@ -285,6 +285,11 @@ g_slist_free (priv->categories); } + if (priv->monitor) + { + gnome_vfs_monitor_cancel (priv->monitor); + } + G_OBJECT_CLASS (hcp_app_list_parent_class)->finalize (object); } Modified: projects/haf/branches/hildon-control-panel/refactoring/src/hcp-main.c =================================================================== --- projects/haf/branches/hildon-control-panel/refactoring/src/hcp-main.c 2007-02-27 16:22:54 UTC (rev 10235) +++ projects/haf/branches/hildon-control-panel/refactoring/src/hcp-main.c 2007-02-28 08:10:20 UTC (rev 10236) @@ -31,6 +31,7 @@ #include <glib.h> #include <glib-object.h> #include <glib/gi18n.h> +#include <libgnomevfs/gnome-vfs.h> #include "hcp-program.h" @@ -52,6 +53,8 @@ gtk_init (&argc, &argv); + gnome_vfs_init (); + program = hcp_program_get_instance (); hcp_program_run (program);
- Previous message: [maemo-commits] r10234 - in projects/haf/trunk/hildon-theme-layout-4: . data
- Next message: [maemo-commits] r10237 - projects/haf/branches/hildon-control-panel/refactoring/debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]