~ubuntu-branches/debian/experimental/xfdesktop4/experimental

« back to all changes in this revision

Viewing changes to src/xfdesktop-window-icon-manager.c

  • Committer: Bazaar Package Importer
  • Author(s): Yves-Alexis Perez, Yves-Alexis Perez, Lionel Le Folgoc
  • Date: 2011-02-07 00:17:47 UTC
  • mfrom: (1.4.9 upstream) (5.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110207001747-htl6rhaglfhhik8g
Tags: 4.8.1-1
[ Yves-Alexis Perez ]
* New upstream development release.
* debian/control:
  - update standards version to 3.9.1.
  - refresh build-deps for Xfce 4.7.
  - add build dep on libxfce4ui-1-dev.
  - drop xfce4-panel build-dep since we don't build any plugin anymore.
  - add build-dep on hardening-includes.
* Switch to 3.0 (quilt) source format.
* debian/rules:
  - pick {C,LD}FLAGS from dpkg-buildflags.
  - drop --libexecdir, --disable-rpath and --enable-final from configure args.
  - drop usr/lib from chrpath call, it doesn't exist anymore.
  - don't rename generic terminal .desktop file, it's gone too.
  - pass docdir to configure.
  - add hardening flags to {C,LD}FLAGS
* debian/xfdesktop4-data.install:
  - drop usr/share/desktop-directories from install file.
* debian/xfdesktop4.install:
  - drop etc/ no menu is installed anymore.
  - drop usr/ too, no more desktop menu module nor panel plugin. 
* debian/copyright updated for new upstream release.

[ Lionel Le Folgoc ]
* New upstream bugfix release.
* debian/control: clean up build-deps since xfdesktop has been ported to gio,
  exo-1 and garcon.
* Refresh build-deps for Xfce 4.8.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 *  xfdesktop - xfce4's desktop manager
3
3
 *
4
4
 *  Copyright (c) 2006 Brian Tarricone, <bjt23@cornell.edu>
 
5
 *  Copyright (c) 2010 Jannis Pohlmann, <jannis@xfce.org>
5
6
 *
6
7
 *  This program is free software; you can redistribute it and/or modify
7
8
 *  it under the terms of the GNU General Public License as published by
28
29
 
29
30
#include <glib-object.h>
30
31
 
31
 
#include <libxfcegui4/libxfcegui4.h>
32
32
#include <libwnck/libwnck.h>
33
33
 
 
34
#include <libxfce4util/libxfce4util.h>
 
35
 
 
36
#include <libxfce4ui/libxfce4ui.h>
 
37
 
34
38
#include "xfdesktop-icon-view.h"
35
39
#include "xfdesktop-window-icon.h"
36
40
#include "xfdesktop-window-icon-manager.h"
37
41
#include "xfce-desktop.h"
38
42
 
39
 
 
40
 
static gboolean __wnck_has_new_active_workspace_changed_signal = TRUE;
41
 
 
42
43
static void xfdesktop_window_icon_manager_set_property(GObject *object,
43
44
                                                       guint property_id,
44
45
                                                       const GValue *value,
92
93
xfdesktop_window_icon_manager_class_init(XfdesktopWindowIconManagerClass *klass)
93
94
{
94
95
    GObjectClass *gobject_class = (GObjectClass *)klass;
95
 
    guint sig_id;
96
96
    
97
97
    g_type_class_add_private(klass, sizeof(XfdesktopWindowIconManagerPrivate));
98
98
    
106
106
                                                        GDK_TYPE_SCREEN,
107
107
                                                        G_PARAM_READWRITE
108
108
                                                        | G_PARAM_CONSTRUCT_ONLY));
109
 
 
110
 
    /* make sure the class is alive; g_signal_lookup() fails otherwise */
111
 
    if(!g_type_class_peek(WNCK_TYPE_SCREEN))
112
 
        g_type_class_ref(WNCK_TYPE_SCREEN);
113
 
    sig_id = g_signal_lookup("active-workspace-changed", WNCK_TYPE_SCREEN);
114
 
    if(sig_id) {
115
 
        GSignalQuery query;
116
 
 
117
 
        g_signal_query(sig_id, &query);
118
 
        if(query.n_params == 0)
119
 
            __wnck_has_new_active_workspace_changed_signal = FALSE;
120
 
        else
121
 
            __wnck_has_new_active_workspace_changed_signal = TRUE;
122
 
        DBG("active-workspace-changed signal has %d param(s)\n", query.n_params);
123
 
    }
124
109
}
125
110
 
126
111
static void
235
220
 
236
221
static void
237
222
workspace_changed_cb(WnckScreen *wnck_screen,
238
 
                     gpointer arg1,
 
223
                     WnckWorkspace *previously_active_space,
239
224
                     gpointer user_data)
240
225
{
241
 
    XfdesktopWindowIconManager *wmanager;
 
226
    XfdesktopWindowIconManager *wmanager = XFDESKTOP_WINDOW_ICON_MANAGER(user_data);
242
227
    gint n;
243
228
    WnckWorkspace *ws;
244
229
 
245
 
    /* as of libwnck 2.20, the "active-workspace-changed" signal has
246
 
     * a new prototype with an extra argument.  previous versions don't
247
 
     * have this argument, so we fudge this here (bug 4395). */
248
 
    if(G_LIKELY(__wnck_has_new_active_workspace_changed_signal))
249
 
        wmanager = XFDESKTOP_WINDOW_ICON_MANAGER(user_data);
250
 
    else
251
 
        wmanager = XFDESKTOP_WINDOW_ICON_MANAGER(arg1);
252
 
 
253
230
    ws = wnck_screen_get_active_workspace(wmanager->priv->wnck_screen);
254
231
    if(!WNCK_IS_WORKSPACE(ws)) {
255
232
        DBG("got weird failure of wnck_screen_get_active_workspace(), bailing");
389
366
        i = 0;
390
367
        max_i = wmanager->priv->nworkspaces;
391
368
    } else {
392
 
        g_return_if_fail(ws_num != -1);
 
369
        if(ws_num == -1)
 
370
            return;
393
371
        i = ws_num;
394
372
        max_i = i + 1;
395
373
    }