[maemo-commits] [maemo-commits] r8689 - in projects/haf/branches/maemo-af-desktop/hildon-desktop: . libhildondesktop

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Fri Dec 8 15:52:29 EET 2006
Author: moimart
Date: 2006-12-08 15:52:28 +0200 (Fri, 08 Dec 2006)
New Revision: 8689

Modified:
   projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog
   projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/desktop-panel-window.c
   projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/desktop-panel.c
Log:

	* libhildondesktop/desktop-panel.c:
          - Set a default size for widgets.
        * libhildondesktop/desktop-panel-window.c:
          - Show the container!!!!
	* ChangeLog updated.



Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog	2006-12-08 13:46:04 UTC (rev 8688)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog	2006-12-08 13:52:28 UTC (rev 8689)
@@ -1,5 +1,12 @@
 2006-12-08  Moises Martinez  <moises.martinzes at nokia.com>
 
+	* libhildondesktop/desktop-panel.c:
+	  - Set a default size for widgets.
+	* libhildondesktop/desktop-panel-window.c:
+	  - Show the container!!!!
+
+2006-12-08  Moises Martinez  <moises.martinzes at nokia.com>
+
 	* libhildondesktop/desktop-panel-window.[ch]: Fixed partially dragging
 	of window.
 

Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/desktop-panel-window.c
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/desktop-panel-window.c	2006-12-08 13:46:04 UTC (rev 8688)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/desktop-panel-window.c	2006-12-08 13:52:28 UTC (rev 8689)
@@ -354,6 +354,7 @@
   
   gtk_container_add (GTK_CONTAINER (window),
 		     GTK_WIDGET (HILDON_DESKTOP_WINDOW (window)->container));
+  gtk_widget_show (GTK_WIDGET (HILDON_DESKTOP_WINDOW (window)->container));
 
   gtk_widget_pop_composite_child ();
 

Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/desktop-panel.c
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/desktop-panel.c	2006-12-08 13:46:04 UTC (rev 8688)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/desktop-panel.c	2006-12-08 13:52:28 UTC (rev 8689)
@@ -26,6 +26,9 @@
 #include "desktop-panel.h"
 #include "hildon-desktop-item.h"
 
+#define PANEL_WIDGET_DEFAULT_WIDTH  80
+#define PANEL_WIDGET_DEFAULT_HEIGHT 80
+
 #define DESKTOP_PANEL_GET_PRIVATE(object) \
         (G_TYPE_INSTANCE_GET_PRIVATE ((object), DESKTOP_TYPE_PANEL, DesktopPanel))
 
@@ -714,7 +717,7 @@
 {
   /* FIXME: Please, implement me smoothly and very optimized */
 	
-  /* FIXME: This is not that smooth implementation, this only add the item*/ 	
+  /* FIXME: This is not that smooth implementation, this only add the item*/
   gtk_box_pack_start (GTK_BOX (panel), GTK_WIDGET (item),FALSE,FALSE,0);
   gtk_widget_show    (GTK_WIDGET (item)); 
 }
@@ -725,7 +728,6 @@
 desktop_panel_add_button (DesktopPanel *panel, GtkWidget *widget)
 {
   GtkWidget *panel_widget;
-  GtkRequisition requisition;
 
   g_return_if_fail (panel &&
                     widget && 
@@ -734,26 +736,18 @@
 
   panel_widget = GTK_WIDGET (panel);
 
-  if (panel->item_width == 0 || panel->item_height == 0) 
-  {
-  
-    gtk_widget_size_request (widget,&requisition);
-
-    if (panel->orient & GTK_ORIENTATION_HORIZONTAL)
-      requisition.height = panel_widget->allocation.height;
-    else
-      requisition.width  = panel_widget->allocation.width;
-
-    gtk_widget_set_size_request (widget,
-			         requisition.width,
-			         requisition.height);
-  }
-  else
+  if (panel->item_width != 0 && panel->item_height != 0) 
   { 
     gtk_widget_set_size_request (widget,
 			         panel->item_width,
 			         panel->item_height);
   }
+  else
+  {
+    gtk_widget_set_size_request (widget,
+		    		 PANEL_WIDGET_DEFAULT_WIDTH,
+				 PANEL_WIDGET_DEFAULT_HEIGHT);
+  }
 
   if (HILDON_DESKTOP_IS_ITEM (widget))
     desktop_panel_calc_positions (panel,HILDON_DESKTOP_ITEM (widget));/*FIXME: Do this! */


More information about the maemo-commits mailing list