[maemo-commits] [maemo-commits] r9070 - in projects/haf/branches/maemo-af-desktop/hildon-desktop: . libhildonwm src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Jan 11 17:19:10 EET 2007
Author: moimart
Date: 2007-01-11 17:19:09 +0200 (Thu, 11 Jan 2007)
New Revision: 9070

Modified:
   projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog
   projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.c
   projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.h
   projects/haf/branches/maemo-af-desktop/hildon-desktop/src/hd-plugin-loader-builtin.c
   projects/haf/branches/maemo-af-desktop/hildon-desktop/src/hn-app-button.c
   projects/haf/branches/maemo-af-desktop/hildon-desktop/src/hn-app-switcher.c
Log:

	* src/hn-app-switcher.c:
        - Fixed position of main menu.
        * src/hn-app-button.c:
        - Fixed focusing on buttons.
        * src/hd-plugin-loader-builtin.c:
        - Fixed not initializing GError to NULL.
        * libhildonwm/hd-wm.[ch]:
        - Changed usage of hd_wm_activate_window from GtkWindow to
          GdkWindow
	* ChangeLog updated.



Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog	2007-01-11 15:12:24 UTC (rev 9069)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog	2007-01-11 15:19:09 UTC (rev 9070)
@@ -1,6 +1,18 @@
 2007-01-11  Moises Martinez  <moises.martinez at nokia.com>
 
+	* src/hn-app-switcher.c:
+	- Fixed position of main menu.
+	* src/hn-app-button.c:
+	- Fixed focusing on buttons.
+	* src/hd-plugin-loader-builtin.c:
+	- Fixed not initializing GError to NULL.
 	* libhildonwm/hd-wm.[ch]:
+	- Changed usage of hd_wm_activate_window from GtkWindow to 
+	  GdkWindow
+
+2007-01-11  Moises Martinez  <moises.martinez at nokia.com>
+
+	* libhildonwm/hd-wm.[ch]:
 	- (hd_wm_update_client_list): New method for updating the client list.
 	- (hd_wm_close_application): Close the children views as well.
 	* test/test7.c: Test updated.

Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.c
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.c	2007-01-11 15:12:24 UTC (rev 9069)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.c	2007-01-11 15:19:09 UTC (rev 9070)
@@ -1903,16 +1903,13 @@
 }
 
 static void 
-hd_wm_set_window_focus (GtkWindow *window, gboolean focus)
+hd_wm_set_window_focus (GdkWindow *window, gboolean focus)
 {
-  g_assert (window && GTK_IS_WINDOW (window));
-	
-  gtk_window_set_accept_focus (window, focus);
+  g_assert (window && GDK_IS_WINDOW (window));
 
-  if (focus)
-    gtk_window_present   (window);
-  else
-    gtk_window_set_focus (window, NULL);
+  gdk_window_focus (window,GDK_CURRENT_TIME);
+  gdk_window_raise (window);
+  gdk_window_set_accept_focus (window,focus);
 }
 
 void 
@@ -2023,7 +2020,7 @@
 }
 
 void
-hd_wm_activate_window (guint32 what, GtkWindow *window)
+hd_wm_activate_window (guint32 what, GdkWindow *window)
 {
   /*GtkWidget * button = NULL;*/
   HDWM *hdwm = hd_wm_get_singleton ();

Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.h
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.h	2007-01-11 15:12:24 UTC (rev 9069)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.h	2007-01-11 15:19:09 UTC (rev 9070)
@@ -224,7 +224,7 @@
 /* keyboard handling functions */
 
 void
-hd_wm_activate_window (guint32 what, GtkWindow *window);
+hd_wm_activate_window (guint32 what, GdkWindow *window);
 
 #define hd_wm_activate(what) hd_wm_activate_window (what,NULL)
 

Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/src/hd-plugin-loader-builtin.c
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/src/hd-plugin-loader-builtin.c	2007-01-11 15:12:24 UTC (rev 9069)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/src/hd-plugin-loader-builtin.c	2007-01-11 15:19:09 UTC (rev 9070)
@@ -43,7 +43,7 @@
   GList *objects = NULL;
   GKeyFile *keyfile;
   gchar *path;
-  GError *keyfile_error;
+  GError *keyfile_error = NULL;
   
   g_return_val_if_fail (loader, NULL);
  
@@ -64,7 +64,7 @@
                                 HD_PLUGIN_CONFIG_GROUP, 
                                 HD_PLUGIN_CONFIG_KEY_PATH,
                                 &keyfile_error);
-
+  g_debug ("path %s",path);
   if (keyfile_error)
   {
     g_propagate_error (error, keyfile_error);

Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/src/hn-app-button.c
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/src/hn-app-button.c	2007-01-11 15:12:24 UTC (rev 9069)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/src/hn-app-button.c	2007-01-11 15:19:09 UTC (rev 9070)
@@ -824,7 +824,8 @@
   /* remember which button was used to press this button */
   HN_DBG("App button pressed using button %d", event->button);
 
-  g_debug ("%s: %d, hd_wm_activate(HN_TN_DEACTIVATE_KEY_FOCUS);",__FILE__,__LINE__);
+  hd_wm_activate_window (HD_TN_DEACTIVATE_KEY_FOCUS,
+		         gtk_widget_get_parent_window (widget));
 
   if (event->button == APP_BUTTON_THUMBABLE)
     priv->is_thumbable = TRUE;

Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/src/hn-app-switcher.c
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/src/hn-app-switcher.c	2007-01-11 15:12:24 UTC (rev 9069)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/src/hn-app-switcher.c	2007-01-11 15:19:09 UTC (rev 9070)
@@ -601,7 +601,6 @@
 			 gpointer  data)
 {
   GtkWidget *widget = GTK_WIDGET (data);
-  GdkScreen *screen = gtk_widget_get_screen (widget);
   GtkRequisition req;
 
   if (!GTK_WIDGET_REALIZED (widget))
@@ -614,7 +613,9 @@
     *x += widget->allocation.width;
 
   gtk_widget_size_request (GTK_WIDGET (menu), &req);
-  *y = gdk_screen_get_height (screen) - req.height;
+  *y = *y + widget->allocation.y - req.height;
+
+  g_debug ("y position: %d",*y);
   
   *push_in = FALSE;
 }
@@ -847,10 +848,6 @@
   gtk_widget_set_sensitive (button, FALSE);
   gtk_widget_set_size_request (button, -1, AS_MENU_BUTTON_HEIGHT);
 
-  g_object_set (G_OBJECT (button),
-                "can-focus", TN_DEFAULT_FOCUS,
-                NULL);
-  
   pixbuf = hn_app_switcher_get_icon_from_theme (app_switcher, AS_MENU_BUTTON_ICON, -1);
   icon = gtk_image_new_from_pixbuf (pixbuf);
   gtk_container_add (GTK_CONTAINER (button), icon);
@@ -1268,9 +1265,6 @@
   }
   
   gtk_widget_set_sensitive (priv->buttons[pos], TRUE);
-  g_object_set (G_OBJECT (priv->buttons[pos]),
-                "can-focus", TRUE,
-                NULL);
 }
 
 static gboolean


More information about the maemo-commits mailing list