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

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue Sep 4 15:09:59 EEST 2007
Author: moimart
Date: 2007-09-04 15:09:57 +0300 (Tue, 04 Sep 2007)
New Revision: 13572

Modified:
   projects/haf/trunk/hildon-desktop/ChangeLog
   projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-panel-expandable.c
   projects/haf/trunk/hildon-desktop/libhildonwm/hd-keys.c
Log:
2007-09-04  Moises Martinez  <moises.martinez at nokia.com>

        * libhildondesktop/hildon-desktop-panel-expandable.c:
        (hildon_desktop_panel_expandable_init),
        (hildon_desktop_panel_expandable_add_button),
        (hildon_desktop_panel_expandable_add_in_extension),
        (hildon_desktop_panel_expandable_arrange_items),
        (hildon_desktop_x_event_filter),
        (hildon_desktop_panel_remove_embed):
        - Add systray icons at the beginning.
        - Only add systray icons in the first panel. Added a limit of
        systray icons items_p_row - 1
        Fixes: NB#64602
        * libhildonwm/hd-keys.c: (hd_keys_launch_application):
        - Launch osso-global-seach instead of unexisting "application"
        isearch-applet.
        Fixes: NB#57374
	* ChangeLog updated.



Modified: projects/haf/trunk/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-desktop/ChangeLog	2007-09-04 11:58:29 UTC (rev 13571)
+++ projects/haf/trunk/hildon-desktop/ChangeLog	2007-09-04 12:09:57 UTC (rev 13572)
@@ -1,3 +1,21 @@
+2007-09-04  Moises Martinez  <moises.martinez at nokia.com>
+
+	* libhildondesktop/hildon-desktop-panel-expandable.c:
+	(hildon_desktop_panel_expandable_init),
+	(hildon_desktop_panel_expandable_add_button),
+	(hildon_desktop_panel_expandable_add_in_extension),
+	(hildon_desktop_panel_expandable_arrange_items),
+	(hildon_desktop_x_event_filter),
+	(hildon_desktop_panel_remove_embed):
+	- Add systray icons at the beginning.
+	- Only add systray icons in the first panel. Added a limit of 
+	systray icons items_p_row - 1
+	Fixes: NB#64602
+	* libhildonwm/hd-keys.c: (hd_keys_launch_application):
+	- Launch osso-global-seach instead of unexisting "application" 
+	isearch-applet.
+	Fixes: NB#57374
+
 2007-09-04 Johan Bilien  <johan.bilien at nokia.com>
 
 	* libhildondesktop/hildon-desktop-panel-window-dialog.c:

Modified: projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-panel-expandable.c
===================================================================
--- projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-panel-expandable.c	2007-09-04 11:58:29 UTC (rev 13571)
+++ projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-panel-expandable.c	2007-09-04 12:09:57 UTC (rev 13572)
@@ -92,6 +92,7 @@
   Atom 	      tray_opcode;
   GtkWidget  *invisible;
   gboolean    filter_added;
+  guint	      n_systray_applets;
 #endif
 };
 
@@ -224,6 +225,7 @@
   panel->priv->extension_table = NULL;
 #ifdef SYSTRAY_SUPPORT
   panel->priv->filter_added = FALSE;
+  panel->priv->n_systray_applets = 0;
 #endif
 }
 
@@ -577,9 +579,20 @@
   /* gtk_widget_set_size_request (button, item_width, item_height);*/
   if (GTK_IS_BIN (button) && GTK_IS_WIDGET (GTK_BIN (button)->child))
     gtk_widget_set_size_request (GTK_BIN (button)->child, item_width, item_height);
-  
-  g_object_set (G_OBJECT (item), "position", ex_panel->priv->current_position++, NULL);
-  
+ 
+  if (!STATUSBAR_IS_ITEM_SOCKET (button)) 
+    g_object_set (G_OBJECT (item), "position", ex_panel->priv->current_position++, NULL);
+
+  if (STATUSBAR_IS_ITEM_SOCKET (button))  
+  {	 
+    if (GTK_WIDGET (button)->parent == NULL)
+    {
+      HILDON_DESKTOP_PANEL_CLASS (hildon_desktop_panel_expandable_parent_class)->add_button (panel,button);
+      sb_debug ("adding at the beginnning");
+    }  
+    ex_panel->priv->n_items++;
+  }
+  else 
   if ((ex_panel->priv->n_items+2) > ex_panel->priv->items_p_row && (ex_panel->priv->n_items+1) != ex_panel->priv->items_p_row)
   { 
     if (STATUSBAR_IS_ITEM (button) && !STATUSBAR_ITEM (button)->condition)
@@ -596,7 +609,7 @@
       
           HILDON_DESKTOP_PANEL_CLASS (hildon_desktop_panel_expandable_parent_class)->add_button (panel,arrow);
       
-           ex_panel->priv->arrow = arrow;
+          ex_panel->priv->arrow = arrow;
         }
 	
 	hildon_desktop_panel_expandable_add_in_extension (ex_panel, item);
@@ -606,8 +619,6 @@
         hildon_desktop_panel_expandable_add_in_extension (ex_panel, item);
       }
     }
-
-     
   }
   else
   {
@@ -662,7 +673,6 @@
 
   division = ((guint)((n_items+1) / panel->priv->items_p_row));
 
-g_debug ("fivision is %d and n_items is %d", division, n_items);
   n_rows = division + (((n_items+1) % panel->priv->items_p_row) != 0) ? 1 : 0;
   
   g_object_get (panel->priv->extension_table, "n-rows", &table_rows, NULL);
@@ -766,7 +776,7 @@
       panel->priv->arrow = NULL;
 
     if (!STATUSBAR_IS_ITEM_SOCKET (l->data))
-      gtk_container_parent_remove (GTK_CONTAINER (panel), GTK_WIDGET (l->data));
+      gtk_container_remove (GTK_CONTAINER (panel), GTK_WIDGET (l->data));
   }
 
   for (l = children_table ; l ; l = g_list_next (l))
@@ -1034,8 +1044,10 @@
       }
 
       g_free (id);
+
+      if (panel->priv->n_systray_applets <= (panel->priv->items_p_row - 1))
+        hildon_desktop_panel_embed_applet (panel,(Window)e->xclient.data.l[2]);
       
-      hildon_desktop_panel_embed_applet (panel,(Window)e->xclient.data.l[2]);
       return GDK_FILTER_CONTINUE;
     }
   }
@@ -1059,6 +1071,8 @@
 
   panel->priv->n_items--;
 
+  panel->priv->n_systray_applets--;
+
   gtk_container_remove (GTK_CONTAINER (panel), parent);
 
   hildon_desktop_panel_expandable_arrange_items (panel);

Modified: projects/haf/trunk/hildon-desktop/libhildonwm/hd-keys.c
===================================================================
--- projects/haf/trunk/hildon-desktop/libhildonwm/hd-keys.c	2007-09-04 11:58:29 UTC (rev 13571)
+++ projects/haf/trunk/hildon-desktop/libhildonwm/hd-keys.c	2007-09-04 12:09:57 UTC (rev 13572)
@@ -170,7 +170,7 @@
 hd_keys_launch_application (HDKeysConfig *keys,
 			    gpointer     *user_data)
 {
-  hd_wm_activate_service ("isearch-applet.desktop", NULL);
+  hd_wm_activate_service ("com.nokia.osso_global_search", NULL);
 }
 
 static void 
@@ -257,14 +257,11 @@
     hd_keys_switch_window, GINT_TO_POINTER (TRUE) },
   { HD_KEYS_GCONF_PATH "/application_close",    HD_KEY_ACTION_APPLICATION_CLOSE,
     hd_keys_action_application_close, NULL},
-  { HD_KEYS_GCONF_PATH "/global/isearch_applet", HD_KEY_ACTION_APPLICATION,
+  { HD_KEYS_GCONF_PATH "/global/osso-global-search", HD_KEY_ACTION_APPLICATION,
     hd_keys_launch_application, NULL },
   { NULL, 0, NULL, NULL }
 };
 
-
-     	
-
 static gboolean
 hd_keys_keysym_needs_shift (KeySym keysym)
 {


More information about the maemo-commits mailing list