[maemo-commits] [maemo-commits] r14606 - in projects/haf/trunk/hail: . debian hail/hail-hildon-desktop

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Oct 25 10:16:05 EEST 2007
Author: dobrovol
Date: 2007-10-25 10:15:50 +0300 (Thu, 25 Oct 2007)
New Revision: 14606

Modified:
   projects/haf/trunk/hail/ChangeLog
   projects/haf/trunk/hail/debian/changelog
   projects/haf/trunk/hail/hail/hail-hildon-desktop/haildesktoppopupwindow.c
Log:
patched hail/hail-hildon-desktop/haildesktoppopupwindow.c with patch in bug 73797

Modified: projects/haf/trunk/hail/ChangeLog
===================================================================
--- projects/haf/trunk/hail/ChangeLog	2007-10-24 12:50:19 UTC (rev 14605)
+++ projects/haf/trunk/hail/ChangeLog	2007-10-25 07:15:50 UTC (rev 14606)
@@ -1,3 +1,12 @@
+2007-10-19 Fernando Herrera  <fernando.herrera-de-las-heras at nokia.com> 
+	* hail/hail-hildon-desktop/haildesktoppopupwindow.c
+	Correct a mistmatch with the extra panes. This popup windows is a 
+	gtkwindow, so only have one children. His extra panes aren't directly
+	his children, so can't be accessed using gtk_container_for_all. This
+	causes crashes on hildon-desktop in some cases. 
+
+	Fixes NB#73797
+	
 2007-09-03 Fernando Herrera  <fernando.herrera-de-las-heras at nokia.com> 
 
 	* configure.in: Release 1.2.3

Modified: projects/haf/trunk/hail/debian/changelog
===================================================================
--- projects/haf/trunk/hail/debian/changelog	2007-10-24 12:50:19 UTC (rev 14605)
+++ projects/haf/trunk/hail/debian/changelog	2007-10-25 07:15:50 UTC (rev 14606)
@@ -1,3 +1,10 @@
+hail (1.2.3-2) unstable; urgency=low
+
+  * patched hail/hail-hildon-desktop/haildesktoppopupwindow.c with patch
+    in bug 73797
+
+ -- Shivakumar <ext-shivakumar.manishankar at nokia.com>  Wed, 24 Oct 2007 17:14:03 +0300
+
 hail (1.2.3-1) unstable; urgency=low
 
   * Release 1.2.3

Modified: projects/haf/trunk/hail/hail/hail-hildon-desktop/haildesktoppopupwindow.c
===================================================================
--- projects/haf/trunk/hail/hail/hail-hildon-desktop/haildesktoppopupwindow.c	2007-10-24 12:50:19 UTC (rev 14605)
+++ projects/haf/trunk/hail/hail/hail-hildon-desktop/haildesktoppopupwindow.c	2007-10-25 07:15:50 UTC (rev 14606)
@@ -49,8 +49,6 @@
 
 static void       hail_desktop_popup_window_real_initialize(AtkObject *obj,
 							    gpointer data);
-static void       add_internal_widgets                     (GtkWidget *widget,
-							    gpointer data);
 
 #define HAIL_DESKTOP_POPUP_WINDOW_DEFAULT_NAME "Hildon Desktop Popup Window"
 #define HAIL_DESKTOP_POPUP_WINDOW_DEFAULT_DESCRIPTION "The window which shows the popup menus"
@@ -60,7 +58,6 @@
 {
   AtkObject **extra_panes;   /* the widgets */
   guint	      n_extra_panes; /* number of widget */
-  guint	      index;         /* index to scan the array */
 };
 
 #define HAIL_DESKTOP_POPUP_WINDOW_GET_PRIVATE(o)  \
@@ -145,7 +142,6 @@
 
   priv->extra_panes = NULL;
   priv->n_extra_panes = 0;
-  priv->index = 0;
 }
 
 static void
@@ -335,6 +331,8 @@
 {
   GtkWidget *popup_window = NULL;
   HailDesktopPopupWindowPrivate *priv  = NULL;
+  GtkWidget *current_widget = NULL;
+  gint i = 0;
 
   g_return_if_fail (HAIL_IS_DESKTOP_POPUP_WINDOW (obj));
   priv = HAIL_DESKTOP_POPUP_WINDOW_GET_PRIVATE (obj);
@@ -346,34 +344,19 @@
 
   if (HILDON_DESKTOP_IS_POPUP_WINDOW (popup_window))
     {
-      gint panes = 0;
-
       g_object_get(G_OBJECT (popup_window),
 		   "n-panes", &priv->n_extra_panes,
 		   NULL);
 
       priv->extra_panes = g_new0 (AtkObject *, priv->n_extra_panes);
-      priv->index = 0;
 
-      gtk_container_forall(GTK_CONTAINER(popup_window),
-			   add_internal_widgets, obj);
+      for ( i = 0 ; i < priv->n_extra_panes; i++) 
+	{	  
+	  current_widget = hildon_desktop_popup_window_get_pane
+	    (HILDON_DESKTOP_POPUP_WINDOW(popup_window), i);
+
+	  priv->extra_panes[i] = gtk_widget_get_accessible (current_widget);
+	}
     }
 }
 
-/*
- * callback for gtk_container_forall.
- * It's used from atk object initialize to get the references
- * to the AtkObjects of the internal widgets.
- */
-static void
-add_internal_widgets (GtkWidget *widget, gpointer data)
-{
-  HailDesktopPopupWindow *popup_window = NULL;
-  HailDesktopPopupWindowPrivate *priv  = NULL;
-
-  popup_window = HAIL_DESKTOP_POPUP_WINDOW (data);
-  priv = HAIL_DESKTOP_POPUP_WINDOW_GET_PRIVATE (popup_window);
-
-  priv->extra_panes[priv->index] = gtk_widget_get_accessible (widget);
-  priv->index++;
-}


More information about the maemo-commits mailing list