[maemo-commits] [maemo-commits] r8754 - in projects/haf/trunk/maemo-af-desktop: . hildon-home hildon-navigator

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Dec 14 14:56:30 EET 2006
Author: jobi
Date: 2006-12-14 14:56:29 +0200 (Thu, 14 Dec 2006)
New Revision: 8754

Modified:
   projects/haf/trunk/maemo-af-desktop/ChangeLog
   projects/haf/trunk/maemo-af-desktop/hildon-home/hildon-plugin-list.c
   projects/haf/trunk/maemo-af-desktop/hildon-navigator/hildon-navigator-window.c
   projects/haf/trunk/maemo-af-desktop/maemo-af-desktop-main.c
Log:

2006-12-14  Johan Bilien <johan.bilien at nokia.com>

	* maemo-af-desktop-main.c: Initialize dnotify stuff here
	* hildon-navigator/hildon-navigator-window.c: Do not
	initialize dnotify stuff here
	Fixes: NB#49753, NB#37765



Modified: projects/haf/trunk/maemo-af-desktop/ChangeLog
===================================================================
--- projects/haf/trunk/maemo-af-desktop/ChangeLog	2006-12-14 12:31:57 UTC (rev 8753)
+++ projects/haf/trunk/maemo-af-desktop/ChangeLog	2006-12-14 12:56:29 UTC (rev 8754)
@@ -1,3 +1,10 @@
+2006-12-14  Johan Bilien <johan.bilien at nokia.com>
+
+	* maemo-af-desktop-main.c: Initialize dnotify stuff here
+	* hildon-navigator/hildon-navigator-window.c: Do not
+	initialize dnotify stuff here
+	Fixes: NB#49753, NB#37765
+
 2006-12-07  Johan Bilien <johan.bilien at nokia.com>
 
 	* configure.ac: 2.9.99.15

Modified: projects/haf/trunk/maemo-af-desktop/hildon-home/hildon-plugin-list.c
===================================================================
--- projects/haf/trunk/maemo-af-desktop/hildon-home/hildon-plugin-list.c	2006-12-14 12:31:57 UTC (rev 8753)
+++ projects/haf/trunk/maemo-af-desktop/hildon-home/hildon-plugin-list.c	2006-12-14 12:56:29 UTC (rev 8754)
@@ -423,6 +423,7 @@
       (!directory && priv->directory) ||
       strcmp (directory, priv->directory))
     {
+      hildon_return_t ret;
       g_object_notify (G_OBJECT (list), "directory");
 
       if (priv->directory)
@@ -430,11 +431,14 @@
       
       g_free (priv->directory);
       priv->directory = g_strdup (directory);
-      hildon_dnotify_set_cb ((hildon_dnotify_cb_f *)
+      ret = hildon_dnotify_set_cb ((hildon_dnotify_cb_f *)
                                 hildon_plugin_list_dnotify_callback,
                              priv->directory,
                              list);
 
+      if (ret != HILDON_OK)
+        g_warning ("Could not add dnotify watch on %s", priv->directory);
+
       g_signal_emit_by_name (G_OBJECT (list), "directory-changed");
     }
 }

Modified: projects/haf/trunk/maemo-af-desktop/hildon-navigator/hildon-navigator-window.c
===================================================================
--- projects/haf/trunk/maemo-af-desktop/hildon-navigator/hildon-navigator-window.c	2006-12-14 12:31:57 UTC (rev 8753)
+++ projects/haf/trunk/maemo-af-desktop/hildon-navigator/hildon-navigator-window.c	2006-12-14 12:56:29 UTC (rev 8754)
@@ -246,7 +246,6 @@
   gchar *plugin_dir;
   const char *home_dir;
   gboolean dnotify_ret;
-  hildon_return_t dnotify_status;
 
   self = G_OBJECT_CLASS (parent_class)->constructor (gtype,
                                                      n_params,
@@ -267,9 +266,6 @@
   gtk_container_add (GTK_CONTAINER (window),GTK_WIDGET (priv->panel));
 
   plugin_dir  = g_build_filename (home_dir, NAVIGATOR_USER_DIR, NULL);
-
-  /* Initialize this before any plugin or whatever */
-  dnotify_status = hildon_dnotify_handler_init();
   
   hn_panel_load_dummy_buttons (HILDON_NAVIGATOR_PANEL (priv->panel));
 
@@ -297,19 +293,14 @@
   if (!g_file_test(plugin_dir, G_FILE_TEST_IS_DIR))
     g_mkdir(plugin_dir, 0755); /* THIS WILL CHANGE! CREATE IT ANYWAY! */
 
-  if (dnotify_status == HILDON_OK)
-  { 
-    dnotify_ret =
+  dnotify_ret =
       hildon_dnotify_set_cb ((hildon_dnotify_cb_f *)configuration_changed,
-		            plugin_dir,
-			    priv->panel);
-      
-    hn_others_button_dnotify_register (HN_OTHERS_BUTTON (priv->others_button));
+                             plugin_dir,
+                             priv->panel);
 
-    hn_wm_dnotify_register ();
-  }
-  else
-    g_debug ("failed to initialize dnotify");
+  hn_others_button_dnotify_register (HN_OTHERS_BUTTON (priv->others_button));
+
+  hn_wm_dnotify_register ();
  
   /* cleanup */
   g_free (plugin_dir);

Modified: projects/haf/trunk/maemo-af-desktop/maemo-af-desktop-main.c
===================================================================
--- projects/haf/trunk/maemo-af-desktop/maemo-af-desktop-main.c	2006-12-14 12:31:57 UTC (rev 8753)
+++ projects/haf/trunk/maemo-af-desktop/maemo-af-desktop-main.c	2006-12-14 12:56:29 UTC (rev 8754)
@@ -80,8 +80,8 @@
 #include <hildon-widgets/gtk-infoprint.h>
 #include <hildon-widgets/hildon-note.h>
 
-#include <libmb/mbutil.h>
-#include "libmb/mbdotdesktop.h"
+#include <hildon-base-lib/hildon-base-dnotify.h>
+
 /* log include */
 #include <log-functions.h>
 
@@ -249,6 +249,10 @@
     }
     
 
+    /* Initialize hildon-base-lib (for dnotify) */
+    if (hildon_dnotify_handler_init () != HILDON_OK)
+      g_warning ("Could not initialize hildon-base-lib dnotify handler");
+
     keysnooper_id = 0;
     keysnooper_id=hildon_home_main();
 


More information about the maemo-commits mailing list