[maemo-commits] [maemo-commits] r12117 - in projects/haf/trunk/hildon-desktop: . libhildondesktop

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue Jun 5 22:12:27 EEST 2007
Author: moimart
Date: 2007-06-05 22:12:25 +0300 (Tue, 05 Jun 2007)
New Revision: 12117

Modified:
   projects/haf/trunk/hildon-desktop/ChangeLog
   projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-item.h
   projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-panel.c
   projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-panel.h
Log:
2007-06-05  Moises Martinez  <moises.martinez at nokia.com>

        * libhildondesktop/hildon-desktop-item.h:
        - Fixed prototype.
        * libhildondesktop/hildon-desktop-panel.[ch]:
        - Added method to refresh information of possible status bar items
        inside panel containers
	* ChangeLog updated.



Modified: projects/haf/trunk/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-desktop/ChangeLog	2007-06-05 14:28:59 UTC (rev 12116)
+++ projects/haf/trunk/hildon-desktop/ChangeLog	2007-06-05 19:12:25 UTC (rev 12117)
@@ -1,5 +1,13 @@
 2007-06-05  Moises Martinez  <moises.martinez at nokia.com>
 
+	* libhildondesktop/hildon-desktop-item.h:
+	- Fixed prototype.
+	* libhildondesktop/hildon-desktop-panel.[ch]:
+	- Added method to refresh information of possible status bar items
+	inside panel containers
+
+2007-06-05  Moises Martinez  <moises.martinez at nokia.com>
+
 	* libhildondesktop/hildon-desktop-panel-expandable.c:
 	- Added implementation of container remove that just decreases items
 	counter.

Modified: projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-item.h
===================================================================
--- projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-item.h	2007-06-05 14:28:59 UTC (rev 12116)
+++ projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-item.h	2007-06-05 19:12:25 UTC (rev 12117)
@@ -70,7 +70,7 @@
 gint          hildon_desktop_item_find_by_id  (HildonDesktopItem *item,
                                                const gchar *id);
 
-GtkWidget    *hildon_desktop_item_settings_dialog (HildonDesktopItem *item);
+typedef GtkWidget  *(*HildonDesktopItemSettingsDialog) (HildonDesktopItem *item);
 
 G_END_DECLS
 

Modified: projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-panel.c
===================================================================
--- projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-panel.c	2007-06-05 14:28:59 UTC (rev 12116)
+++ projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-panel.c	2007-06-05 19:12:25 UTC (rev 12117)
@@ -25,6 +25,7 @@
 
 #include "hildon-desktop-panel.h"
 #include "hildon-desktop-panel-item.h"
+#include "statusbar-item.h"
 
 #include <gtk/gtkhbox.h>
 #include <gtk/gtkvbox.h>
@@ -84,7 +85,6 @@
 
 static GtkWidgetClass *hildon_desktop_panel_get_widget_class (HildonDesktopPanel *panel);
 
-
 static void 
 hildon_desktop_panel_class_init (HildonDesktopPanelClass *panel_class)
 {
@@ -395,11 +395,8 @@
 hildon_desktop_panel_set_orientation (HildonDesktopPanel *panel, GtkOrientation orientation)
 {
   g_return_if_fail (panel && HILDON_DESKTOP_IS_PANEL (panel));
-#ifndef PERFORMANCE
-  g_object_set (G_OBJECT (panel),"orientation",orientation,NULL);
-#else
+  
   panel->orient = orientation;
-#endif
 
   gtk_widget_queue_resize (GTK_WIDGET (panel));
 }
@@ -408,29 +405,35 @@
 hildon_desktop_panel_get_orientation (HildonDesktopPanel *panel)
 {
   g_assert (panel && HILDON_DESKTOP_IS_PANEL (panel));
-#ifndef PERFORMANCE
-  GtkOrientation orientation;
-  
-  g_object_get (G_OBJECT (panel), "orientation", &orientation,NULL);
-
-  return orientation;
-#else
- return panel->orient;
-#endif
+ 
+  return panel->orient;
 }
 
 void 
 hildon_desktop_panel_flip (HildonDesktopPanel *panel)
 {
   g_return_if_fail (panel && HILDON_DESKTOP_IS_PANEL (panel));
-#ifndef PERFORMANCE
-  GtkOrientation orientation;
 
-  g_object_get (G_OBJECT (panel), "orientation", &orientation, NULL);
-  g_object_set (G_OBJECT (panel), "orientation", !orientation, NULL);
-#else
-  panel->orient = !priv->orient;
-#endif
+  panel->orient = !panel->orient;
 
   gtk_widget_queue_resize (GTK_WIDGET (panel));
 }
+
+void 
+hildon_desktop_panel_refresh_items_status (HildonDesktopPanel *panel)
+{
+  GList *children = NULL, *l;
+
+  g_return_if_fail (panel && HILDON_DESKTOP_IS_PANEL (panel));
+ 
+  children = gtk_container_get_children (GTK_CONTAINER (panel));
+
+  for (l = children; l != NULL; l = g_list_next (l))
+  {	  
+    if (STATUSBAR_IS_ITEM (l->data))
+      g_object_notify (G_OBJECT (l->data), "condition");	     
+  }
+
+  g_list_free (children);
+}	
+

Modified: projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-panel.h
===================================================================
--- projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-panel.h	2007-06-05 14:28:59 UTC (rev 12116)
+++ projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-panel.h	2007-06-05 19:12:25 UTC (rev 12117)
@@ -82,6 +82,8 @@
 
 void            hildon_desktop_panel_flip             (HildonDesktopPanel *panel);
 
+void		hildon_desktop_panel_refresh_items_status   (HildonDesktopPanel *panel);
+
 G_END_DECLS
 
 #endif /* __HILDON_DESKTOP_PANEL_H__ */ 


More information about the maemo-commits mailing list