[maemo-commits] [maemo-commits] r13519 - in projects/haf/trunk/hildon-desktop: . libhildonwm

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Fri Aug 31 15:06:46 EEST 2007
Author: jobi
Date: 2007-08-31 15:06:44 +0300 (Fri, 31 Aug 2007)
New Revision: 13519

Modified:
   projects/haf/trunk/hildon-desktop/ChangeLog
   projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm.c
   projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm.h
Log:

2007-08-31 Johan Bilien  <johan.bilien at nokia.com>

	* libhildonwm/hd-wm.[ch]: Bring back the startup notification
	DBus method. Fixes: NB#55837



Modified: projects/haf/trunk/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-desktop/ChangeLog	2007-08-31 11:41:43 UTC (rev 13518)
+++ projects/haf/trunk/hildon-desktop/ChangeLog	2007-08-31 12:06:44 UTC (rev 13519)
@@ -1,3 +1,8 @@
+2007-08-31 Johan Bilien  <johan.bilien at nokia.com>
+
+	* libhildonwm/hd-wm.[ch]: Bring back the startup notification
+	DBus method. Fixes: NB#55837
+
 2007-08-30  Lucas Rocha  <lucas.rocha at nokia.com>
 
 	* src/hn-app-button.c (hn_app_button_create_menu): do not attach the

Modified: projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm.c
===================================================================
--- projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm.c	2007-08-31 11:41:43 UTC (rev 13518)
+++ projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm.c	2007-08-31 12:06:44 UTC (rev 13519)
@@ -561,6 +561,43 @@
 {
   HDWM *hdwm = HD_WM (data);
 
+  g_debug ("message matched");
+
+  if (dbus_message_is_method_call (msg,
+                                   HDWM_STARTUP_NOTIFICATION_IFACE,
+                                   HDWM_STARTUP_NOTIFICATION_STARTING))
+  {
+    HDWMApplication    *app;
+    gchar              *service;
+    DBusError           err;
+
+    dbus_error_init(&err);
+    dbus_message_get_args(msg, &err,
+			  DBUS_TYPE_STRING, &service,
+			  DBUS_TYPE_INVALID);
+
+    if (dbus_error_is_set (&err))
+    {
+	g_warning ("Error getting message args: %s\n",
+                   err.message);
+        dbus_error_free (&err);
+	return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+    }
+
+    g_debug ("application starting: %s", service);
+
+    app = hd_wm_lookup_application_via_service (service);
+
+    if (app)
+    {
+      g_signal_emit_by_name (hdwm,
+                             "application-starting",
+                             app);
+    }
+
+    return DBUS_HANDLER_RESULT_HANDLED;
+
+  }
   if (dbus_message_is_signal(msg, MAEMO_LAUNCHER_SIGNAL_IFACE,
 				  APP_DIED_SIGNAL_NAME))
   {
@@ -785,6 +822,11 @@
     dbus_bus_add_match (connection, "type='signal', interface='"
                         MAEMO_LAUNCHER_SIGNAL_IFACE "'", NULL);
 
+    dbus_bus_add_match (connection,
+                        "type='method_call', "
+                        "interface='"HDWM_STARTUP_NOTIFICATION_IFACE"'",
+                        NULL);
+
     dbus_connection_add_filter (connection, hd_wm_dbus_signal_handler,
                                 hdwm, NULL);
 
@@ -1278,7 +1320,7 @@
   {
     if ((wapp = hd_wm_lookup_application_via_service (service)) != NULL)
     {
-      if (hd_wm_application_has_startup_notify (wapp) && 
+      if (hd_wm_application_has_startup_notify (wapp) &&
 	  hdwm->priv->lowmem_banner_timeout >= 0 &&
 	  !hd_wm_application_has_windows (wapp))
       { 

Modified: projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm.h
===================================================================
--- projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm.h	2007-08-31 11:41:43 UTC (rev 13518)
+++ projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm.h	2007-08-31 12:06:44 UTC (rev 13519)
@@ -101,6 +101,10 @@
 #define APPKILLER_SIGNAL_PATH      "/com/nokia/osso_app_killer"
 #define APPKILLER_SIGNAL_NAME      "exit"
 
+#define HDWM_STARTUP_NOTIFICATION_IFACE "com.nokia.hildon.hdwm.startupnotification"
+#define HDWM_OBJECT_PATH                "/com/nokia/hildon/hdwm"
+#define HDWM_STARTUP_NOTIFICATION_STARTING  "starting"
+
 #define SAVE_METHOD      "save"
 #define KILL_APPS_METHOD "kill_app"
 


More information about the maemo-commits mailing list