]> Dogcows Code - chaz/openbox/blobdiff - openbox/client_list_menu.c
1) translate all of openbox's output
[chaz/openbox] / openbox / client_list_menu.c
index 9f4e786e07cc4ae723696dc3529ef27fe2f2c0af..5fbb3a631f9bd3cfd1c36b7a559ce2317a26d72f 100644 (file)
@@ -2,7 +2,7 @@
 
    client_list_menu.c for the Openbox window manager
    Copyright (c) 2006        Mikael Magnusson
-   Copyright (c) 2003        Ben Jansens
+   Copyright (c) 2003-2007   Dana Jansens
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -49,9 +49,11 @@ static void desk_menu_update(ObMenuFrame *frame, gpointer data)
 
     menu_clear_entries(menu);
 
-    for (it = focus_order[d->desktop], i = 0; it; it = g_list_next(it), ++i) {
+    for (it = focus_order, i = 0; it; it = g_list_next(it), ++i) {
         ObClient *c = it->data;
-        if (client_normal(c) && (!c->skip_taskbar || c->iconic)) {
+        if (client_normal(c) && (!c->skip_taskbar || c->iconic) &&
+            (c->desktop == d->desktop || c->desktop == DESKTOP_ALL))
+        {
             GSList *acts = NULL;
             ObAction* act;
             ObMenuEntry *e;
@@ -61,7 +63,7 @@ static void desk_menu_update(ObMenuFrame *frame, gpointer data)
 
             if (!icons && c->iconic) {
                 icons = TRUE;
-                menu_add_separator(menu, -1);
+                menu_add_separator(menu, -1, NULL);
             }
 
             act = action_from_string("Activate",
@@ -75,7 +77,8 @@ static void desk_menu_update(ObMenuFrame *frame, gpointer data)
             e = menu_add_normal(menu, i,
                                 (c->iconic ? c->icon_title : c->title), acts);
 
-            if (config_menu_client_list_icons && (icon = client_icon(c, 32, 32))) {
+            if (config_menu_client_list_icons
+                && (icon = client_icon(c, 32, 32))) {
                 e->data.normal.icon_width = icon->width;
                 e->data.normal.icon_height = icon->height;
                 e->data.normal.icon_data = icon->data;
@@ -101,13 +104,14 @@ static void desk_menu_update(ObMenuFrame *frame, gpointer data)
 
 /* executes it using the client in the actions, since we set that
    when we make the actions! */
-static void desk_menu_execute(ObMenuEntry *self, guint state, gpointer data)
+static void desk_menu_execute(ObMenuEntry *self, guint state, gpointer data,
+                              Time time)
 {
     ObAction *a;
 
     if (self->data.normal.actions) {
         a = self->data.normal.actions->data;
-        action_run(self->data.normal.actions, a->data.any.c, state);
+        action_run(self->data.normal.actions, a->data.any.c, state, time);
     }
 }
 
This page took 0.022373 seconds and 4 git commands to generate.