[maemo-commits] [maemo-commits] r8634 - in projects/haf/branches/maemo-af-desktop/hildon-desktop: . libhildondesktop libhildonwm test

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue Dec 5 15:27:28 EET 2006
Author: moimart
Date: 2006-12-05 15:27:27 +0200 (Tue, 05 Dec 2006)
New Revision: 8634

Modified:
   projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog
   projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/hn-app-switcher.c
   projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.c
   projects/haf/branches/maemo-af-desktop/hildon-desktop/test/test4.c
Log:

	* libhildondesktop/hn_app_switcher.c: Added support for opening the
        menu from hd-wm.
        * libhildonwm/hd-wm.c: Code cleanup
        * test/test4.c: updated.
	* ChangeLog updated.



Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog	2006-12-05 13:21:46 UTC (rev 8633)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog	2006-12-05 13:27:27 UTC (rev 8634)
@@ -1,3 +1,10 @@
+2006-12-05  Moises Martinez  <moises.martinzes at nokia.com>
+
+	* libhildondesktop/hn_app_switcher.c: Added support for opening the
+	menu from hd-wm.
+	* libhildonwm/hd-wm.c: Code cleanup
+	* test/test4.c: updated.
+
 2006-12-05  Johan Bilien  <johan.bilien at nokia.com>
 
 	* debian/:
@@ -6,6 +13,13 @@
 
 2006-12-05  Moises Martinez  <moises.martinzes at nokia.com>
 
+	* libhildondesktop/hn_app_switcher.c: Added support for opening the
+	menu from hd-wm.
+	* libhildonwm/hd-wm.c: Code cleanup
+	* test/test4.c: updated.
+
+2006-12-05  Moises Martinez  <moises.martinzes at nokia.com>
+
 	* libhildonwm/hd-wm.[ch]: Added a signal for requesting appswitchers
 	open their menu.
 

Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/hn-app-switcher.c
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/hn-app-switcher.c	2006-12-05 13:21:46 UTC (rev 8633)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/hn-app-switcher.c	2006-12-05 13:27:27 UTC (rev 8634)
@@ -176,6 +176,8 @@
 static void 
 hn_app_switcher_changed_stack_cb (HDWM *hdwm, HDEntryInfo *entry_info, gpointer data);
 
+static void
+hn_app_switcher_show_menu_cb (HDWM *hdwm, gpointer data);
 
 static void
 hn_app_image_animation (GtkWidget *icon,
@@ -1083,6 +1085,14 @@
 	   gtk_widget_get_name (widget));
 }
 
+static void 
+hn_app_switcher_show_menu_cb (HDWM *hdwm, gpointer data)
+{
+  HNAppSwitcher *app_switcher = HN_APP_SWITCHER (data);
+
+  hn_app_switcher_toggle_menu_button (app_switcher);
+}
+
 static GtkWidget *
 create_app_button (HNAppSwitcher *app_switcher,
 	           gint           pos)
@@ -1181,6 +1191,11 @@
 		    "entry_info_stack_changed",
 		    G_CALLBACK (hn_app_switcher_changed_stack_cb),
 		    (gpointer)app_switcher);
+
+  g_signal_connect (app_switcher->hdwm,
+		    "show_menu",
+		    G_CALLBACK (hn_app_switcher_show_menu_cb),
+		    (gpointer)app_switcher);
  
   gtk_widget_pop_composite_child ();
 }

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	2006-12-05 13:21:46 UTC (rev 8633)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.c	2006-12-05 13:27:27 UTC (rev 8634)
@@ -142,7 +142,6 @@
    */
   GHashTable   *watched_apps;
 
-  GList	       *app_switchers;
 
   GtkWidget    *others_menu;
 

Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/test/test4.c
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/test/test4.c	2006-12-05 13:21:46 UTC (rev 8633)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/test/test4.c	2006-12-05 13:27:27 UTC (rev 8634)
@@ -1,23 +1,37 @@
 #include <libhildondesktop/hn-app-switcher.h>
 #include <libhildonwm/hd-wm.h>
 
+static void 
+show_a_menu (GtkWidget *widget, gpointer data)
+{
+  hd_wm_activate (HD_TN_ACTIVATE_MAIN_MENU);
+}
+
 int 
 main (int argc, char **argv)
 {
-  GtkWidget *win,*hbox;
+  GtkWidget *win,*hbox,*button;
 	
   gtk_init (&argc,&argv);
 
   HDWM *wm = hd_wm_get_singleton ();
 
-  win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  hbox = gtk_hbox_new (TRUE,0);
+  win    = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  hbox   = gtk_hbox_new (TRUE,0);
+  button = gtk_button_new ();
+  
   gtk_window_set_type_hint (GTK_WINDOW (win), GDK_WINDOW_TYPE_HINT_DESKTOP);
+  
   gtk_container_add (GTK_CONTAINER (win), GTK_WIDGET (hbox));
+  
   gtk_box_pack_start (GTK_BOX (hbox), hn_app_switcher_new (),TRUE,TRUE,0);
   gtk_box_pack_start (GTK_BOX (hbox), hn_app_switcher_new (),TRUE,TRUE,0);
   gtk_box_pack_start (GTK_BOX (hbox), hn_app_switcher_new (),TRUE,TRUE,0);
   gtk_box_pack_start (GTK_BOX (hbox), hn_app_switcher_new (),TRUE,TRUE,0);
+  gtk_box_pack_start (GTK_BOX (hbox), button, TRUE,TRUE,0);
+
+  g_signal_connect (button,"clicked",G_CALLBACK(show_a_menu),NULL);
+  
   gtk_widget_show_all (win);
   
   gtk_main ();


More information about the maemo-commits mailing list