Merge branch 'master' of ssh://ciapino/root/zavai
authorEnrico Zini <enrico@enricozini.org>
Tue, 28 Jul 2009 17:55:02 +0000 (19:55 +0200)
committerEnrico Zini <enrico@enricozini.org>
Tue, 28 Jul 2009 17:55:02 +0000 (19:55 +0200)
configure.ac
src/Makefile.am
src/app_wm.vala

index 4b44d8b06ff7bc848b70dac7227df58f5dc42b07..cb545ae0a420487738d1c8d389658da9bd687a81 100644 (file)
@@ -35,6 +35,10 @@ PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.16.0)
 AC_SUBST(GTK_CFLAGS)
 AC_SUBST(GTK_LIBS)
 
+PKG_CHECK_MODULES(WNCK, libwnck-1.0 >= 2.26.0)
+AC_SUBST(WNCK_CFLAGS)
+AC_SUBST(WNCK_LIBS)
+
 AC_CONFIG_FILES([Makefile
            src/Makefile])
 
index defbcbd1fcd2307947b0013ef3dcaf268dfb7dc4..cc687ca3450cd337a614b8987812920c1cc5189d 100644 (file)
@@ -1,4 +1,4 @@
-VFLAGS=-g --pkg gee-1.0 --pkg dbus-glib-1 --pkg gtk+-2.0 --pkg posix
+VFLAGS=-g --pkg gee-1.0 --pkg dbus-glib-1 --pkg gtk+-2.0 --pkg posix --pkg libwnck-1.0
 
 #zavai: $(SOURCES)
 #      valac -o zavai $(VFLAGS) $^
@@ -18,7 +18,9 @@ AM_CPPFLAGS = \
        $(GLIB_CFLAGS) \
        $(DBUS_CFLAGS) \
        $(GEE_CFLAGS) \
-       $(GTK_CFLAGS)
+       $(GTK_CFLAGS) \
+       $(WNCK_CFLAGS) \
+       -DWNCK_I_KNOW_THIS_IS_UNSTABLE
 
 BUILT_SOURCES = zavai.vala.stamp
 
@@ -49,7 +51,8 @@ zavai_LDADD = \
        $(GLIB_LIBS) \
        $(DBUS_LIBS) \
        $(GEE_LIBS) \
-       $(GTK_LIBS)
+       $(GTK_LIBS) \
+       $(WNCK_LIBS)
 
 #vapidir = $(datadir)/vala/vapi
 
index 4a559178a4a4bf9c82415b92e353d9adabba835c..2100b0d32bb92a41d78044a6906fbadbf134e399 100644 (file)
@@ -121,8 +121,22 @@ public class CloseOrBack : Gtk.StatusIcon
        }
 }
 
+public class WindowList : Applet
+{
+       Wnck.Tasklist selector;
+
+       public WindowList(string label)
+       {
+               _label = label;
+               selector = new Wnck.Tasklist(Wnck.Screen.get_default());
+               pack_start(selector, true, true, 0);
+       }
+}
+
+
 RaiseIcon raise_icon;
 CloseOrBack close_or_back;
+WindowList window_list;
 
 public void init()
 {
@@ -131,6 +145,10 @@ public void init()
 
        close_or_back = new CloseOrBack();
        close_or_back.set_visible(true);
+
+       window_list = new WindowList("Current apps");
+       zavai.registry.register_applet("wm.list", window_list);
+       zavai.registry.getmenu("menu.main").add_applet("wm.list");
 }
 
 }