[maemo-commits] [maemo-commits] r19287 - in projects/haf/trunk/hildon-control-panel: . debian src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Sep 3 13:01:36 EEST 2009
Author: paradi
Date: 2009-09-03 13:01:19 +0300 (Thu, 03 Sep 2009)
New Revision: 19287

Modified:
   projects/haf/trunk/hildon-control-panel/ChangeLog
   projects/haf/trunk/hildon-control-panel/debian/changelog
   projects/haf/trunk/hildon-control-panel/src/hcp-app-view.c
   projects/haf/trunk/hildon-control-panel/src/hcp-grid.c
Log:
   * Fixes: NB#131500 - Control panel layout incorrect 


Modified: projects/haf/trunk/hildon-control-panel/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-control-panel/ChangeLog	2009-09-02 14:29:25 UTC (rev 19286)
+++ projects/haf/trunk/hildon-control-panel/ChangeLog	2009-09-03 10:01:19 UTC (rev 19287)
@@ -1,3 +1,9 @@
+2009-09-03 Peter Aradi <peter.aradi at maemo.org>
+
+	* src/hcp-app-view.c:
+	* src/hcp-grid.c:
+	Updated layout.
+
 2009-08-25 Peter Aradi <peter.aradi at maemo.org>
 
 	Reverted David's changes.

Modified: projects/haf/trunk/hildon-control-panel/debian/changelog
===================================================================
--- projects/haf/trunk/hildon-control-panel/debian/changelog	2009-09-02 14:29:25 UTC (rev 19286)
+++ projects/haf/trunk/hildon-control-panel/debian/changelog	2009-09-03 10:01:19 UTC (rev 19287)
@@ -1,7 +1,13 @@
+hildon-control-panel (1:2.2.16-1) unstable; urgency=low
+
+  * Fixes: NB#131500 - Control panel layout incorrect
+
+ -- Peter Aradi <peter.aradi at maemo.org>  Thu, 03 Sep 2009 11:57:26 +0100
+
 hildon-control-panel (1:2.2.15-1) unstable; urgency=low
 
   Reverted changes since 2.2.12-1.
-  * Fixes: NB#131500 - Control panel layout incorrect
+  * Fixes: NB 131500 - Control panel layout incorrect
 
  -- Peter Aradi <peter.aradi at maemo.org>  Tue, 25 Aug 2009 09:30:14 +0100
 

Modified: projects/haf/trunk/hildon-control-panel/src/hcp-app-view.c
===================================================================
--- projects/haf/trunk/hildon-control-panel/src/hcp-app-view.c	2009-09-02 14:29:25 UTC (rev 19286)
+++ projects/haf/trunk/hildon-control-panel/src/hcp-app-view.c	2009-09-03 10:01:19 UTC (rev 19287)
@@ -34,6 +34,8 @@
 #include "hcp-grid.h"
 #include "hcp-marshalers.h"
 #include <hildon/hildon-gtk.h>
+#include <hildon/hildon-helper.h>
+
 #define HCP_APP_VIEW_GET_PRIVATE(object) \
         (G_TYPE_INSTANCE_GET_PRIVATE ((object), HCP_TYPE_APP_VIEW, HCPAppViewPrivate))
 
@@ -90,7 +92,7 @@
   GtkWidget *separator_1 = gtk_hseparator_new ();
   GtkWidget *separator_2 = gtk_hseparator_new ();
   GtkWidget *label_1 = gtk_label_new (label);
-  gtk_widget_set_size_request (hbox, -1, 35);
+  gtk_widget_set_size_request (hbox, 768, 35);
 
   gtk_widget_set_name (separator_1, "hildon-control-panel-separator");
   gtk_widget_set_name (separator_2, "hildon-control-panel-separator");
@@ -204,11 +206,18 @@
     separator = hcp_app_view_create_separator (_(category->name));
 
     /* Pack the separator and the corresponding grid to the vbox */
-    gtk_box_pack_start (GTK_BOX (view), separator, FALSE, FALSE, 0);
-    GtkWidget *align = gtk_alignment_new (0,0,0,0);
-    gtk_alignment_set_padding (GTK_ALIGNMENT(align),0,35,0,0);
-    gtk_container_add (GTK_CONTAINER(align), GTK_WIDGET(grid));
-    gtk_box_pack_start (GTK_BOX (view), align, FALSE, FALSE, 0);
+	if (!view->priv->first_grid)
+	{
+      /* first group */
+      GtkWidget *align = gtk_alignment_new (0,0,0,0);
+	  gtk_alignment_set_padding (GTK_ALIGNMENT(align),HILDON_MARGIN_DEFAULT,0,0,0);
+      gtk_container_add (GTK_CONTAINER (align), separator);
+      gtk_box_pack_start (GTK_BOX (view), align, FALSE, FALSE, 0);
+ 	} else {
+      gtk_box_pack_start (GTK_BOX (view), separator, FALSE, FALSE, 0);
+	} 
+   	
+	gtk_box_pack_start (GTK_BOX (view), GTK_WIDGET(grid), FALSE, FALSE, 0);
 
     gtk_container_get_focus_chain (GTK_CONTAINER (view), &focus_chain);
     focus_chain = g_list_append (focus_chain, grid);
@@ -222,8 +231,9 @@
                      (GFunc) hcp_app_view_add_app,
                      grid);
 
-  hcp_grid_refresh_icons (HCP_GRID(grid));
+    hcp_grid_refresh_icons (HCP_GRID(grid));
 
+    /* first group */
     if (!view->priv->first_grid)
       view->priv->first_grid = grid;
   }

Modified: projects/haf/trunk/hildon-control-panel/src/hcp-grid.c
===================================================================
--- projects/haf/trunk/hildon-control-panel/src/hcp-grid.c	2009-09-02 14:29:25 UTC (rev 19286)
+++ projects/haf/trunk/hildon-control-panel/src/hcp-grid.c	2009-09-03 10:01:19 UTC (rev 19287)
@@ -141,6 +141,8 @@
   grid->priv->icon_size = HCP_ICON_SIZE;
 
   grid->priv->pixbuf_cell = gtk_cell_renderer_pixbuf_new ();
+  gtk_cell_renderer_set_fixed_size (grid->priv->pixbuf_cell,
+									HCP_ICON_SIZE+2*HCP_GRID_X_PADDING , -1);
 
   gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (grid), 
 		  	      grid->priv->pixbuf_cell, 
@@ -157,13 +159,11 @@
                                   NULL);
 
   grid->priv->text_cell = gtk_cell_renderer_text_new ();
-  gtk_cell_renderer_set_fixed_size (grid->priv->text_cell, 300 ,-1);
+  gtk_cell_renderer_set_fixed_size (grid->priv->text_cell, 300 , 60);
 
   /* NOTE: it seems that text truncation only works with GtkLabel */
   g_object_set (G_OBJECT(grid->priv->text_cell), "ellipsize", PANGO_ELLIPSIZE_END, NULL);
 
-  gtk_cell_renderer_text_set_fixed_height_from_font (GTK_CELL_RENDERER_TEXT(grid->priv->text_cell),1);
-
   gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (grid), 
 		  	      grid->priv->text_cell, 
 			      FALSE);

More information about the maemo-commits mailing list