[maemo-commits] [maemo-commits] r8419 - in projects/haf/trunk/maemo-af-desktop: . hildon-navigator

From: www-data at stage.maemo.org www-data at stage.maemo.org
Date: Tue Nov 28 18:27:30 EET 2006
Author: moimart
Date: 2006-11-28 18:27:29 +0200 (Tue, 28 Nov 2006)
New Revision: 8419

Modified:
   projects/haf/trunk/maemo-af-desktop/ChangeLog
   projects/haf/trunk/maemo-af-desktop/hildon-navigator/hildon-navigator-window.c
   projects/haf/trunk/maemo-af-desktop/hildon-navigator/hn-wm.c
Log:

	* hildon-navigator/hn-wm.c
        * hildon-navigator/hildon-navigator-window.c: Set all the items in
        TaskNavigator focusable.
	* ChangeLog updated.



Modified: projects/haf/trunk/maemo-af-desktop/ChangeLog
===================================================================
--- projects/haf/trunk/maemo-af-desktop/ChangeLog	2006-11-28 15:26:05 UTC (rev 8418)
+++ projects/haf/trunk/maemo-af-desktop/ChangeLog	2006-11-28 16:27:29 UTC (rev 8419)
@@ -1,3 +1,9 @@
+2006-11-28  Moises Martinez <moises.martinzes at nokia.com>
+
+	* hildon-navigator/hn-wm.c
+	* hildon-navigator/hildon-navigator-window.c: Set all the items in 
+	TaskNavigator focusable.
+
 2006-11-28  Johan Bilien <johan.bilien at nokia.com>
 
 	* hildon-navigator/hn-app-menu-item.c,

Modified: projects/haf/trunk/maemo-af-desktop/hildon-navigator/hildon-navigator-window.c
===================================================================
--- projects/haf/trunk/maemo-af-desktop/hildon-navigator/hildon-navigator-window.c	2006-11-28 15:26:05 UTC (rev 8418)
+++ projects/haf/trunk/maemo-af-desktop/hildon-navigator/hildon-navigator-window.c	2006-11-28 16:27:29 UTC (rev 8419)
@@ -136,7 +136,7 @@
 static void
 set_focus_forall_cb (GtkWidget *widget, gpointer data)
 {
-  gboolean focus = GPOINTER_TO_INT(data);
+  gboolean focus = TRUE;
   static int depth = 0;
 
   depth++;
@@ -201,7 +201,9 @@
   gchar *config_file;
   const char *home_dir;
   HildonNavigatorPanel *panel = HILDON_NAVIGATOR_PANEL (panelptr);
-
+  HildonNavigatorWindowPrivate *priv = HILDON_NAVIGATOR_WINDOW_GET_PRIVATE (window);
+  gboolean focus = TRUE;
+  
   home_dir = getenv ("HOME");
   
   config_file = g_strdup_printf  ("%s%s", home_dir, NAVIGATOR_USER_PLUGINS);
@@ -212,6 +214,10 @@
   else
     hn_panel_load_plugins_from_file (panel, NAVIGATOR_FACTORY_PLUGINS);
 
+  gtk_container_forall (GTK_CONTAINER (priv->panel), 
+			set_focus_forall_cb,
+                        GINT_TO_POINTER (focus));
+
   g_free (config_file);
 }
 
@@ -261,7 +267,6 @@
 		          priv->panel);
    
   priv->others_button = hn_others_button_new ();
-  
   if (priv->others_button)
     hn_panel_add_button ( HILDON_NAVIGATOR_PANEL (priv->panel),
 			  priv->others_button);
@@ -384,12 +389,6 @@
 
   gtk_window_set_accept_focus (GTK_WINDOW (window), focus);
 
-#ifndef TN_ALWAYS_FOCUSABLE
-  gtk_container_forall (GTK_CONTAINER (priv->panel), 
-			set_focus_forall_cb,
-                        GINT_TO_POINTER (focus));
-#endif
-
   if (focus)
     gtk_window_present   (GTK_WINDOW (window));
   else
@@ -442,6 +441,10 @@
 
   priv = HILDON_NAVIGATOR_WINDOW_GET_PRIVATE (window);
 
+  plugins = 
+   hn_panel_peek_plugins (HILDON_NAVIGATOR_PANEL (priv->panel));
+
+
   switch (what)
   {
     case HN_TN_ACTIVATE_OTHERS_MENU:
@@ -449,16 +452,17 @@
      break;
     case HN_TN_ACTIVATE_MAIN_MENU:
      break;
-    default:
-     plugins = 
-       hn_panel_peek_plugins (HILDON_NAVIGATOR_PANEL (priv->panel));
-
+    case HN_TN_ACTIVATE_PLUGIN1_MENU:
      if (plugins)
-       ret = GTK_WIDGET (plugins->data);
-
-     g_list_free (plugins);
+       ret = GTK_BIN (plugins->data)->child;
      break;
+    case HN_TN_ACTIVATE_PLUGIN2_MENU:
+     if (plugins && plugins->next)
+       ret = GTK_BIN ((plugins->next)->data)->child;
+     break;
   }
+     
+  g_list_free (plugins);
 
   return ret;
 }

Modified: projects/haf/trunk/maemo-af-desktop/hildon-navigator/hn-wm.c
===================================================================
--- projects/haf/trunk/maemo-af-desktop/hildon-navigator/hn-wm.c	2006-11-28 15:26:05 UTC (rev 8418)
+++ projects/haf/trunk/maemo-af-desktop/hildon-navigator/hn-wm.c	2006-11-28 16:27:29 UTC (rev 8419)
@@ -1283,6 +1283,8 @@
             gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
             g_signal_emit_by_name(button, "toggled");
         }
+	hnwm.has_focus = TRUE;
+        hn_window_set_focus (tasknav,TRUE);
     }
 }
 


More information about the maemo-commits mailing list