~ubuntu-branches/ubuntu/oneiric/xpad/oneiric

« back to all changes in this revision

Viewing changes to src/xpad-pad-group.c

  • Committer: Bazaar Package Importer
  • Author(s): Bart Martens
  • Date: 2007-12-10 22:52:37 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20071210225237-llvwje5iwbbi5adw
Tags: 2.13-1
* New upstream release.
* debian/patches/01_workspaces.diff: Removed.
* debian/menu: Updated.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**
2
 
 * Copyright (c) 2004 Michael Terry
 
2
 * Copyright (c) 2004-2007 Michael Terry
3
3
 * 
4
4
 * This program is free software; you can redistribute it and/or modify
5
5
 * it under the terms of the GNU General Public License as published by
112
112
xpad_pad_group_add (XpadPadGroup *group, GtkWidget *pad)
113
113
{
114
114
        g_object_ref(pad);
115
 
        gtk_object_sink(GTK_OBJECT(pad));
 
115
        g_object_ref_sink(GTK_OBJECT(pad));
116
116
        
117
117
        group->priv->pads = g_slist_append (group->priv->pads, XPAD_PAD (pad));
118
118
        g_signal_connect_swapped (pad, "destroy", G_CALLBACK (xpad_pad_group_remove), group);
141
141
        g_slist_free (group->priv->pads);
142
142
        group->priv->pads = NULL;
143
143
}
 
144
 
 
145
 
 
146
gint
 
147
xpad_pad_group_num_visible_pads (XpadPadGroup *group)
 
148
{
 
149
        gint num = 0;
 
150
        if (group)
 
151
        {
 
152
                GSList *i;
 
153
                for (i = group->priv->pads; i; i = i->next)
 
154
                {
 
155
                        if (GTK_WIDGET_VISIBLE(GTK_WIDGET(i->data)))
 
156
                                num ++;
 
157
                }
 
158
        }
 
159
        return num;
 
160
}
 
161
 
 
162
 
 
163
void
 
164
xpad_pad_group_close_all (XpadPadGroup *group)
 
165
{
 
166
        if (group)
 
167
                g_slist_foreach (group->priv->pads, (GFunc) xpad_pad_close, NULL);
 
168
}
 
169
 
 
170
 
 
171
void
 
172
xpad_pad_group_show_all (XpadPadGroup *group)
 
173
{
 
174
        if (group)
 
175
                g_slist_foreach (group->priv->pads, (GFunc) gtk_widget_show, NULL);
 
176
}
 
177