[maemo-commits] [maemo-commits] r9697 - in projects/haf/branches/maemo-af-desktop/hildon-desktop: . libhildonwm

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue Feb 6 18:50:22 EET 2007
Author: jobi
Date: 2007-02-06 18:50:20 +0200 (Tue, 06 Feb 2007)
New Revision: 9697

Modified:
   projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog
   projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watchable-app.c
   projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watchable-app.h
   projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.c
   projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.h
Log:

2007-02-06  Johan Bilien  <johan.bilien at nokia.com>

	* libhildonwm/hd-wm.[ch]
	- created application-starting signal to which the launch-bannering
	should be connected
	- do not launch the banner from the window manager code



Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog	2007-02-06 16:47:04 UTC (rev 9696)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog	2007-02-06 16:50:20 UTC (rev 9697)
@@ -1,3 +1,10 @@
+2007-02-06  Johan Bilien  <johan.bilien at nokia.com>
+
+	* libhildonwm/hd-wm.[ch]
+	- created application-starting signal to which the launch-bannering
+	should be connected
+	- do not launch the banner from the window manager code
+
 2007-02-06  Moises Martinez  <moises.martinez at nokia.com>
 
 	* src/hd-panel-window-dialog.c:

Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watchable-app.c
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watchable-app.c	2007-02-06 16:47:04 UTC (rev 9696)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watchable-app.c	2007-02-06 16:50:20 UTC (rev 9697)
@@ -449,6 +449,13 @@
 }
 
 const gchar*
+hd_wm_watchable_app_get_localized_name (HDWMWatchableApp *app)
+{
+  return (app->text_domain?dgettext(app->text_domain,app->app_name):
+                           dgettext("maemo-af-desktop", app->app_name));
+}
+
+const gchar*
 hd_wm_watchable_app_get_icon_name (HDWMWatchableApp *app)
 {
   return app->icon_name;
@@ -560,7 +567,7 @@
                                 APP_LAUNCH_BANNER_MSG_LOADING ),
                               lapp_name ? _(lapp_name) : "" );
         
-  info->banner = GTK_WIDGET(hildon_banner_show_animation(NULL, NULL, info->msg));
+  info->banner = hildon_banner_show_animation(NULL, NULL, info->msg);
   gdk_error_trap_pop();
 
   g_timeout_add(interval, hd_wm_watchable_app_launch_banner_timeout, info);

Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watchable-app.h
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watchable-app.h	2007-02-06 16:47:04 UTC (rev 9696)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watchable-app.h	2007-02-06 16:50:20 UTC (rev 9697)
@@ -89,6 +89,19 @@
 hd_wm_watchable_app_get_name (HDWMWatchableApp *app);
 
 /** 
+ * Get the localized name field set via .desktop file of
+ * an HDWMWatchableApp instance. If X-Text-Domain is not set,
+ * it uses the maemo-af-desktop text domain.
+ * You should not free the result.
+ * 
+ * @param app HDWMWatchableApp instance
+ * 
+ * @return name field value
+ */
+const gchar*
+hd_wm_watchable_app_get_localized_name (HDWMWatchableApp *app);
+
+/** 
  * Get the icon field set via .desktop file of an HDWMWatchableApp instance. 
  * You should not free the result.
  * 

Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.c
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.c	2007-02-06 16:47:04 UTC (rev 9696)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.c	2007-02-06 16:50:20 UTC (rev 9697)
@@ -113,6 +113,7 @@
   HDWM_ENTRY_INFO_STACK_CHANGED_SIGNAL,
   HDWM_WORK_AREA_CHANGED_SIGNAL,
   HDWM_SHOW_A_MENU_SIGNAL,
+  HDWM_APPLICATION_STARTING_SIGNAL,
   HDWM_SIGNALS
 };
 
@@ -412,12 +413,9 @@
 	  hdwm->priv->lowmem_banner_timeout > 0 &&
 	  !hd_wm_watchable_app_has_windows (app))
       {
-        g_debug ("Showing Launchbanner...");
-        /*
-	 * This function takes care of the distinction between the Loading
-	 * and Resuming banners, hence we no longer test for hibernation
-	 */
-	hd_wm_watchable_app_launch_banner_show (app);
+        g_signal_emit_by_name (hdwm,
+                               "application-starting",
+                               hd_wm_watchable_app_get_localized_name (app));
       }
     }
   }
@@ -705,6 +703,17 @@
 		     NULL, NULL,
 		     g_cclosure_marshal_VOID__VOID,
 		     G_TYPE_NONE, 0);
+  
+  hdwm_signals[HDWM_APPLICATION_STARTING_SIGNAL] = 
+	g_signal_new("application_starting",
+		     G_OBJECT_CLASS_TYPE(object_class),
+		     G_SIGNAL_RUN_LAST,
+		     G_STRUCT_OFFSET (HDWMClass,application_starting),
+		     NULL, NULL,
+		     g_cclosure_marshal_VOID__STRING,
+		     G_TYPE_NONE,
+                     1,
+                     G_TYPE_STRING);
 
 }
 

Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.h
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.h	2007-02-06 16:47:04 UTC (rev 9696)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.h	2007-02-06 16:50:20 UTC (rev 9697)
@@ -146,6 +146,7 @@
   void (*entry_info_stack_changed) (HDWM *hdwm,HDEntryInfo *info);
   void (*work_area_changed)        (HDWM *hdwm,GdkRectangle *work_area);
   void (*show_menu)		   (HDWM *hdwm);
+  void (*application_starting)     (HDWM *hdwm, gchar *application);
   /* */
 };
 


More information about the maemo-commits mailing list