~ubuntu-branches/ubuntu/oneiric/gnome-panel/oneiric

« back to all changes in this revision

Viewing changes to applets/wncklet/window-list.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher, Sebastien Bacher, Jeremy Bicha
  • Date: 2011-05-30 11:04:49 UTC
  • mfrom: (1.13.10 upstream) (2.2.5 experimental)
  • Revision ID: james.westby@ubuntu.com-20110530110449-hinl17kxkcefjw6x
Tags: 1:3.0.2-0ubuntu1
[ Sebastien Bacher ]
* New upstream version
* debian/control.in:
  - the new libgweather version is in oneiric, use it
  - drop the python and python-gconf depends, 
    they were added for gnome-panel-add which is still using gconf and buggy
* debian/gnome-panel-data.install:
  - don't install the apport hook, it's only getting gconf datas which 
    doesn't work since gnome-panel uses gsettings
* debian/patches/90_build_fixes.patch:
  - restore build fix from git not applied in the new serie
* debian/patches/01_panel_submenus.patch:
  - don't take that Debian diff, the .menus use the upstream naming in Ubuntu
* debian/patches/06_no_resize_grip.patch:
  - dropped, the issue is fixed in the new version
* debian/patches/50_fix-potfiles.patch:
  - dropped, the issue is fixed in the new version
* debian/watch:
  - track unstable series as well

Drop those delta, since gnome-panel is not the default Ubuntu session now we
can go back to an experience closer to the upstream one: 
* debian/control.in:
  - drop the indicators recommends, unity-2d is the ubuntu fallback session
    so we can get back to use an upstream config for gnome-panel and reduce
    the delta we carry
* debian/patches/04_default_panel_config.patch:
  - don't modify the upstream layout
* debian/patches/05_no_session_delay.patch:
  - no need to tweak the upstream session to optimize it
* debian/patches/16_compiz_workspace_switcher.patch:
  - go back to the upstream switcher behaviour    
* debian/patches/25_dynamic_fusa_detection.patch:
  - not needed since we use the upstream layout, could be ported if someone
    is wanting to do the work though
* debian/patches/30_disable-initial-animation.patch, debian/rules:
  - drop the --disable-initial-animation, that was some login optimization
    but since it's not the default desktop you should go back to the 
    upstream behaviour

[ Jeremy Bicha ]   
* New upstream version
* Merge from Debian experimental, remaining Ubuntu changes:
* debian/control:
  - Recommends gnome-settings-daemon which has the timezone polkit service
* debian/rules:
  - Update translations template.
* debian/gnome-panel-data.install:
  - Install apport hook
  - Install the "About Ubuntu" menu item.
* debian/patches/01_layout.patch:
  - Disabled, Help & About Ubuntu don't fit as well in Gnome Panel 3
* debian/patches/01_panel_submenus.patch.
  - Dropped
* debian/patches/03_dnd_places_link.patch:
  - Disabled, when using Drag'n'Drop from Places menu, install a link launcher
    (.desktop file) instead of copying the entire directory.
* debian/patches/17_about-ubuntu-translation.patch:
  - List ubuntu-about.desktop for translation.
* debian/patches/40_unset_menuproxy.patch:
  - Make sure gnome-panel and the applets don't pick up menu proxies.
* debian/patches/50_fix-potfiles.patch
  - Fix i18n
* debian/patches/85_disable_shutdown_on_ltsp.patch:
  - Suppress the shutdown option in the panel if LTSP_CLIENT is set.
* debian/patches/71_change_bookmark_submenu_limit_value.patch
  - Dropped, picked up by Debian
* debian/patches/18_lockdown_lock_editor.patch:
* debian/patches/90_git_wnck_show_realize.patch:
* debian/patches/90_fix_linking_DSO_link.patch:
* debian/patches/91_gir_annotations.patch
* debian/patches/92_git_calendar_day.patch
* debian/patches/92_git_fix_applets_in_multiscreen.patch:
  - Dropped, applied upstream
* debian/watch:
  - watch unstable versions

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 *
9
9
 */
10
10
 
11
 
#define WNCK_I_KNOW_THIS_IS_UNSTABLE 1
 
11
#define WNCK_I_KNOW_THIS_IS_NOT_UPSTREAM 1
12
12
 
13
13
#ifdef HAVE_CONFIG_H
14
14
#include <config.h>
17
17
#include <string.h>
18
18
 
19
19
#include <panel-applet.h>
20
 
#include <panel-applet-gconf.h>
21
20
 
22
21
#include <glib/gi18n.h>
23
22
#include <gtk/gtk.h>
24
23
#include <libwnck/libwnck.h>
25
 
#include <gconf/gconf-client.h>
26
24
 
27
25
#include "wncklet.h"
28
26
#include "window-list.h"
53
51
        GtkWidget *move_minimized_radio;
54
52
        GtkWidget *change_workspace_radio;
55
53
 
56
 
        GtkWidget *about;
57
 
 
58
 
        /* gconf listeners id */
59
 
        guint listeners [3];
 
54
        GSettings *settings;
60
55
} TasklistData;
61
56
 
62
57
static void display_properties_dialog (GtkAction    *action,
63
58
                                       TasklistData *tasklist);
64
 
static void display_help_dialog       (GtkAction    *action,
65
 
                                       TasklistData *tasklist);
66
 
static void display_about_dialog      (GtkAction    *action,
67
 
                                       TasklistData *tasklist);
68
59
 
69
60
static void
70
61
tasklist_update (TasklistData *tasklist)
127
118
                return;
128
119
  
129
120
        tasklist->orientation = new_orient;
130
 
 
 
121
        wnck_tasklist_set_orientation (tasklist->tasklist, new_orient);
131
122
        tasklist_update (tasklist);
132
123
}
133
124
 
134
125
static void
135
 
applet_change_background (PanelApplet               *applet,
136
 
                          PanelAppletBackgroundType  type,
137
 
                          GdkColor                  *color,
138
 
                          GdkPixmap                 *pixmap,
139
 
                          TasklistData              *tasklist)
 
126
applet_change_background (PanelApplet     *applet,
 
127
                          cairo_pattern_t *pattern,
 
128
                          TasklistData    *tasklist)
140
129
{
141
 
        switch (type) {
142
 
        case PANEL_NO_BACKGROUND:
143
 
                wnck_tasklist_set_button_relief (WNCK_TASKLIST (tasklist->tasklist),
144
 
                                                 GTK_RELIEF_NORMAL);
145
 
                break;
146
 
        case PANEL_COLOR_BACKGROUND:
147
 
        case PANEL_PIXMAP_BACKGROUND:
148
 
                wnck_tasklist_set_button_relief (WNCK_TASKLIST (tasklist->tasklist),
149
 
                                                 GTK_RELIEF_NONE);
150
 
                break;
151
 
        }
 
130
        wnck_tasklist_set_button_relief (WNCK_TASKLIST (tasklist->tasklist),
 
131
                                         pattern != NULL ? GTK_RELIEF_NONE
 
132
                                                         : GTK_RELIEF_NORMAL);
152
133
}
153
134
 
154
135
static void
167
148
static void
168
149
destroy_tasklist(GtkWidget * widget, TasklistData *tasklist)
169
150
{
170
 
        GConfClient *client = gconf_client_get_default ();
171
 
 
172
 
        gconf_client_notify_remove (client, tasklist->listeners[0]);
173
 
        gconf_client_notify_remove (client, tasklist->listeners[1]);
174
 
        gconf_client_notify_remove (client, tasklist->listeners[2]);
175
 
 
176
 
        g_object_unref (G_OBJECT (client));
177
 
        
178
 
        tasklist->listeners[0] = 0;
179
 
        tasklist->listeners[1] = 0;
180
 
        tasklist->listeners[2] = 0;
 
151
        g_object_unref (tasklist->settings);
 
152
        tasklist->settings = NULL;
181
153
 
182
154
        if (tasklist->properties_dialog)
183
155
                gtk_widget_destroy (tasklist->properties_dialog);
184
156
 
185
 
        if (tasklist->about)
186
 
                gtk_widget_destroy (tasklist->about);
187
 
 
188
157
        g_free (tasklist);
189
158
}
190
159
 
191
160
static const GtkActionEntry tasklist_menu_actions [] = {
192
161
        { "TasklistPreferences", GTK_STOCK_PROPERTIES, N_("_Preferences"),
193
162
          NULL, NULL,
194
 
          G_CALLBACK (display_properties_dialog) },
195
 
        { "TasklistHelp", GTK_STOCK_HELP, N_("_Help"),
196
 
          NULL, NULL,
197
 
          G_CALLBACK (display_help_dialog) },
198
 
        { "TasklistAbout", GTK_STOCK_ABOUT, N_("_About"),
199
 
          NULL, NULL,
200
 
          G_CALLBACK (display_about_dialog) }
 
163
          G_CALLBACK (display_properties_dialog) }
201
164
};
202
165
 
203
166
static void
226
189
}
227
190
 
228
191
static void
229
 
display_all_workspaces_changed (GConfClient  *client,
230
 
                                guint         cnxn_id,
231
 
                                GConfEntry   *entry,
232
 
                                TasklistData *tasklist)
 
192
display_all_workspaces_changed (GSettings    *settings,
 
193
                                const gchar  *key,
 
194
                                TasklistData *tasklist)
233
195
{
234
196
        gboolean value;
235
197
 
236
 
        if (!entry->value || entry->value->type != GCONF_VALUE_BOOL)
237
 
                return;
238
 
        
239
 
        value = gconf_value_get_bool (entry->value);
240
 
        
 
198
        value = g_settings_get_boolean (settings, key);
 
199
 
241
200
        tasklist->include_all_workspaces = (value != 0);
242
201
        tasklist_update (tasklist);
243
202
 
244
203
        tasklist_properties_update_content_radio (tasklist);
245
204
}
246
205
 
247
 
static WnckTasklistGroupingType
248
 
get_grouping_type (GConfValue *value)
249
 
{
250
 
        WnckTasklistGroupingType type = -1;
251
 
        const char *str;
252
 
 
253
 
        g_assert (value != NULL);
254
 
 
255
 
        /* Backwards compat for old type: */
256
 
        if (value->type == GCONF_VALUE_BOOL) {
257
 
                type = (gconf_value_get_bool (value)) ? WNCK_TASKLIST_AUTO_GROUP:WNCK_TASKLIST_NEVER_GROUP;
258
 
 
259
 
        } else if (value->type == GCONF_VALUE_STRING) {
260
 
                str = gconf_value_get_string (value);
261
 
                if (g_ascii_strcasecmp (str, "never") == 0) {
262
 
                        type = WNCK_TASKLIST_NEVER_GROUP;
263
 
                } else if (g_ascii_strcasecmp (str, "auto") == 0) {
264
 
                        type = WNCK_TASKLIST_AUTO_GROUP;
265
 
                } else if (g_ascii_strcasecmp (str, "always") == 0) {
266
 
                        type = WNCK_TASKLIST_ALWAYS_GROUP;
267
 
                }
268
 
        }
269
 
 
270
 
        return type;
271
 
}
272
 
 
273
206
static GtkWidget *
274
207
get_grouping_button (TasklistData *tasklist,
275
208
                     WnckTasklistGroupingType type)
289
222
}
290
223
 
291
224
static void
292
 
group_windows_changed (GConfClient  *client,
293
 
                       guint         cnxn_id,
294
 
                       GConfEntry   *entry,
 
225
group_windows_changed (GSettings    *settings,
 
226
                       const gchar  *key,
295
227
                       TasklistData *tasklist)
296
228
{
297
 
        WnckTasklistGroupingType type;
298
229
        GtkWidget *button;
299
230
 
300
 
        if (!entry->value ||
301
 
            (entry->value->type != GCONF_VALUE_BOOL &&
302
 
             entry->value->type != GCONF_VALUE_STRING))
303
 
                return;
304
 
 
305
 
        type = get_grouping_type (entry->value);
306
 
        if (type == -1) {
307
 
                g_warning ("tasklist: Unknown value for GConf key 'group_windows'");
308
 
                return;
309
 
        }
310
 
                
311
 
        tasklist->grouping = type;
 
231
        tasklist->grouping = g_settings_get_enum (settings, key);
312
232
        tasklist_update (tasklist);
313
233
 
314
 
        button = get_grouping_button (tasklist, type);
 
234
        button = get_grouping_button (tasklist, tasklist->grouping);
315
235
        if (button &&
316
236
            !gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button))) {
317
237
                gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
338
258
 
339
259
 
340
260
static void
341
 
move_unminimized_windows_changed (GConfClient  *client,
342
 
                                  guint         cnxn_id,
343
 
                                  GConfEntry   *entry,
 
261
move_unminimized_windows_changed (GSettings    *settings,
 
262
                                  const gchar  *key,
344
263
                                  TasklistData *tasklist)
345
264
{
346
265
        gboolean value;
347
266
        
348
 
        if (!entry->value || entry->value->type != GCONF_VALUE_BOOL)
349
 
                return;
350
 
 
351
 
        value = gconf_value_get_bool (entry->value);
 
267
        value = g_settings_get_boolean (settings, key);
352
268
        
353
269
        tasklist->move_unminimized_windows = (value != 0);
354
270
        tasklist_update (tasklist);
359
275
static void
360
276
setup_gconf (TasklistData *tasklist)
361
277
{
362
 
        GConfClient *client;
363
 
        char *key;
364
 
 
365
 
        client = gconf_client_get_default ();
366
 
 
367
 
        key = panel_applet_gconf_get_full_key (PANEL_APPLET (tasklist->applet),
368
 
                                               "display_all_workspaces");
369
 
        tasklist->listeners[0] = gconf_client_notify_add(client, key,
370
 
                                (GConfClientNotifyFunc)display_all_workspaces_changed,
371
 
                                tasklist,
372
 
                                NULL, NULL);
373
 
        g_free (key);
374
 
 
375
 
        key = panel_applet_gconf_get_full_key (PANEL_APPLET (tasklist->applet),
376
 
                                               "group_windows");
377
 
        tasklist->listeners[1] = gconf_client_notify_add(client, key,
378
 
                                (GConfClientNotifyFunc)group_windows_changed,
379
 
                                tasklist,
380
 
                                NULL, NULL);
381
 
        g_free (key);
382
 
 
383
 
        key = panel_applet_gconf_get_full_key (PANEL_APPLET (tasklist->applet),
384
 
                                               "move_unminimized_windows");
385
 
        tasklist->listeners[2] = gconf_client_notify_add(client, key,
386
 
                                (GConfClientNotifyFunc)move_unminimized_windows_changed,
387
 
                                tasklist,
388
 
                                NULL, NULL);
389
 
        g_free (key);
390
 
 
391
 
        g_object_unref (G_OBJECT (client));
 
278
        tasklist->settings =
 
279
          panel_applet_settings_new (PANEL_APPLET (tasklist->applet),
 
280
                                     "org.gnome.gnome-panel.applet.window-list");
 
281
 
 
282
        g_signal_connect (tasklist->settings, "changed::display-all-workspaces",
 
283
                          G_CALLBACK (display_all_workspaces_changed), tasklist);
 
284
 
 
285
        g_signal_connect (tasklist->settings, "changed::group-windows",
 
286
                          G_CALLBACK (group_windows_changed), tasklist);
 
287
 
 
288
        g_signal_connect (tasklist->settings, "changed::move-unminimized-windows",
 
289
                          G_CALLBACK (move_unminimized_windows_changed), tasklist);
392
290
}
393
291
 
394
292
static void
395
 
applet_size_request (GtkWidget      *widget,
396
 
                     GtkRequisition *requisition,
397
 
                     TasklistData   *tasklist)
 
293
applet_size_allocate (GtkWidget      *widget,
 
294
                      GtkAllocation  *allocation,
 
295
                      TasklistData   *tasklist)
398
296
{
399
297
        int len;
400
298
        const int *size_hints;
401
 
        GtkRequisition child_req;
402
 
        WnckTasklist *wncktl = WNCK_TASKLIST (tasklist->tasklist);
403
 
 
404
 
        gtk_widget_get_child_requisition (tasklist->applet, &child_req);
405
 
 
406
 
        size_hints = wnck_tasklist_get_size_hint_list (wncktl, &len);
 
299
 
 
300
        size_hints = wnck_tasklist_get_size_hint_list (WNCK_TASKLIST (tasklist->tasklist), &len);
407
301
        g_assert (len % 2 == 0);
408
302
 
409
303
        panel_applet_set_size_hints (PANEL_APPLET (tasklist->applet),
465
359
{
466
360
        TasklistData *tasklist;
467
361
        GtkActionGroup *action_group;
 
362
        GtkAction *action;
468
363
        gchar *ui_path;
469
 
        GError *error;
470
 
        GConfValue *value;
471
364
 
472
365
        tasklist = g_new0 (TasklistData, 1);
473
366
 
482
375
 
483
376
        setup_gconf (tasklist);
484
377
 
485
 
        error = NULL;
486
 
        tasklist->include_all_workspaces = panel_applet_gconf_get_bool (applet, "display_all_workspaces", &error);
487
 
        if (error) {
488
 
                g_error_free (error);
489
 
                tasklist->include_all_workspaces = FALSE; /* Default value */
490
 
        }
491
 
 
492
 
        error = NULL;
493
 
        tasklist->grouping = -1;
494
 
        value = panel_applet_gconf_get_value (applet, "group_windows", &error);
495
 
        if (error) {
496
 
                g_error_free (error);
497
 
        } else if (value) {
498
 
                tasklist->grouping = get_grouping_type (value);
499
 
                gconf_value_free (value);
500
 
        }
501
 
        if (tasklist->grouping < 0)
502
 
                tasklist->grouping = WNCK_TASKLIST_AUTO_GROUP; /* Default value */
503
 
        
504
 
        error = NULL;
505
 
        tasklist->move_unminimized_windows = panel_applet_gconf_get_bool (applet, "move_unminimized_windows", &error);
506
 
        if (error) {
507
 
                g_error_free (error);
508
 
                tasklist->move_unminimized_windows = TRUE; /* Default value */
509
 
        }
 
378
        tasklist->include_all_workspaces = g_settings_get_boolean (tasklist->settings, "display-all-workspaces");
 
379
        tasklist->grouping = g_settings_get_enum (tasklist->settings, "group-windows");
 
380
        tasklist->move_unminimized_windows = g_settings_get_boolean (tasklist->settings, "move-unminimized-windows");
510
381
 
511
382
        tasklist->size = panel_applet_get_size (applet);
512
383
        switch (panel_applet_get_orient (applet)) {
521
392
                break;
522
393
        }
523
394
 
524
 
        tasklist->tasklist = wnck_tasklist_new (NULL);
 
395
        tasklist->tasklist = wnck_tasklist_new ();
 
396
 
 
397
        wnck_tasklist_set_orientation (tasklist->tasklist, tasklist->orientation);
525
398
 
526
399
        wnck_tasklist_set_icon_loader (WNCK_TASKLIST (tasklist->tasklist),
527
400
                                       icon_loader_func,
531
404
        g_signal_connect (G_OBJECT (tasklist->tasklist), "destroy",
532
405
                          G_CALLBACK (destroy_tasklist),
533
406
                          tasklist);
534
 
 
535
 
        g_signal_connect (G_OBJECT (tasklist->applet), "size_request",
536
 
                          G_CALLBACK (applet_size_request),
 
407
        g_signal_connect (G_OBJECT (tasklist->applet), "size_allocate",
 
408
                          G_CALLBACK (applet_size_allocate),
537
409
                          tasklist);
538
410
        tasklist_update (tasklist);
539
411
        gtk_widget_show (tasklist->tasklist);
571
443
                                           ui_path, action_group);
572
444
        g_free (ui_path);
573
445
 
574
 
        if (panel_applet_get_locked_down (PANEL_APPLET (tasklist->applet))) {
575
 
                GtkAction *action;
 
446
        action = gtk_action_group_get_action (action_group, "TasklistPreferences");
 
447
        g_object_bind_property (tasklist->applet, "locked-down",
 
448
                                action, "visible",
 
449
                                G_BINDING_DEFAULT|G_BINDING_INVERT_BOOLEAN|G_BINDING_SYNC_CREATE);
576
450
 
577
 
                action = gtk_action_group_get_action (action_group, "TasklistPreferences");
578
 
                gtk_action_set_visible (action, FALSE);
579
 
        }
580
451
        g_object_unref (action_group);
581
452
 
582
453
        gtk_widget_show (tasklist->applet);
584
455
        return TRUE;
585
456
}
586
457
 
587
 
 
588
 
static void
589
 
display_help_dialog (GtkAction    *action,
590
 
                     TasklistData *tasklist)
591
 
{
592
 
        wncklet_display_help (tasklist->applet, "user-guide",
593
 
                              "windowlist", WINDOW_LIST_ICON);
594
 
}
595
 
 
596
 
static void
597
 
display_about_dialog (GtkAction    *action,
598
 
                      TasklistData *tasklist)
599
 
{
600
 
        static const gchar *authors[] =
601
 
        {
602
 
                "Alexander Larsson <alla@lysator.liu.se>",
603
 
                NULL
604
 
        };
605
 
        const char *documenters [] = {
606
 
                "Sun GNOME Documentation Team <gdocteam@sun.com>",
607
 
                NULL
608
 
        };
609
 
        const char *translator_credits = _("translator-credits");
610
 
 
611
 
        wncklet_display_about (tasklist->applet, &tasklist->about,
612
 
                               _("Window List"),
613
 
                               "Copyright \xc2\xa9 2001-2002 Red Hat, Inc.",
614
 
                               _("The Window List shows a list of all windows in a set of buttons and lets you browse them."),
615
 
                               authors,
616
 
                               documenters,
617
 
                               translator_credits,
618
 
                               WINDOW_LIST_ICON,
619
 
                               "tasklist",
620
 
                               "Tasklist");
621
 
}
622
 
 
623
458
static void
624
459
group_windows_toggled (GtkToggleButton *button,
625
460
                       TasklistData    *tasklist)
627
462
        if (gtk_toggle_button_get_active (button)) {
628
463
                char *str;
629
464
                str = g_object_get_data (G_OBJECT (button), "group_value");
630
 
                panel_applet_gconf_set_string (PANEL_APPLET (tasklist->applet),
631
 
                                               "group_windows", str,
632
 
                                               NULL);
 
465
                g_settings_set_string (tasklist->settings, "group-windows", str);
633
466
        }
634
467
}
 
468
 
635
469
static void
636
470
move_minimized_toggled (GtkToggleButton *button,
637
471
                        TasklistData    *tasklist)
638
472
{
639
 
        panel_applet_gconf_set_bool (PANEL_APPLET (tasklist->applet),
640
 
                                     "move_unminimized_windows",
641
 
                                     gtk_toggle_button_get_active (button),
642
 
                                     NULL);
 
473
        g_settings_set_boolean (tasklist->settings, "move-unminimized-windows",
 
474
                                gtk_toggle_button_get_active (button));
643
475
}
 
476
 
644
477
static void
645
478
display_all_workspaces_toggled (GtkToggleButton *button,
646
479
                                TasklistData    *tasklist)
647
480
{
648
 
        panel_applet_gconf_set_bool (PANEL_APPLET (tasklist->applet),
649
 
                                     "display_all_workspaces",
650
 
                                     gtk_toggle_button_get_active (button),
651
 
                                     NULL);
 
481
        g_settings_set_boolean (tasklist->settings, "display-all-workspaces",
 
482
                                gtk_toggle_button_get_active (button));
652
483
}
653
484
 
654
485
#define WID(s) GTK_WIDGET (gtk_builder_get_object (builder, s))
655
486
 
656
487
static void
657
488
setup_sensitivity (TasklistData *tasklist,
658
 
                   GConfClient *client,
659
489
                   GtkBuilder *builder,
660
490
                   const char *wid1,
661
491
                   const char *wid2,
662
492
                   const char *wid3,
663
493
                   const char *key)
664
494
{
665
 
        PanelApplet *applet = PANEL_APPLET (tasklist->applet);
666
 
        char *fullkey;
667
495
        GtkWidget *w;
668
496
 
669
 
        fullkey = panel_applet_gconf_get_full_key (applet, key);
670
 
 
671
 
        if (gconf_client_key_is_writable (client, fullkey, NULL)) {
672
 
                g_free (fullkey);
 
497
        if (g_settings_is_writable (tasklist->settings, key)) {
673
498
                return;
674
499
        }
675
 
        g_free (fullkey);
676
500
 
677
501
        w = WID (wid1);
678
502
        g_assert (w != NULL);
695
519
setup_dialog (GtkBuilder   *builder,
696
520
              TasklistData *tasklist)
697
521
{
698
 
        GConfClient *client;
699
522
        GtkWidget *button;
700
523
        
701
 
        client = gconf_client_get_default ();
702
 
 
703
524
        tasklist->show_current_radio = WID ("show_current_radio");
704
525
        tasklist->show_all_radio = WID ("show_all_radio");
705
526
 
706
 
        setup_sensitivity (tasklist, client, builder,
 
527
        setup_sensitivity (tasklist, builder,
707
528
                           "show_current_radio",
708
529
                           "show_all_radio",
709
530
                           NULL,
710
 
                           "display_all_workspaces" /* key */);
 
531
                           "display-all-workspaces" /* key */);
711
532
 
712
533
        tasklist->never_group_radio = WID ("never_group_radio");
713
534
        tasklist->auto_group_radio = WID ("auto_group_radio");
714
535
        tasklist->always_group_radio = WID ("always_group_radio");
715
536
 
716
 
        setup_sensitivity (tasklist, client, builder,
 
537
        setup_sensitivity (tasklist, builder,
717
538
                           "never_group_radio",
718
539
                           "auto_group_radio",
719
540
                           "always_group_radio",
720
 
                           "group_windows" /* key */);
 
541
                           "group-windows" /* key */);
721
542
 
722
543
        tasklist->minimized_windows_label = WID ("minimized_windows_label");
723
544
        tasklist->move_minimized_radio = WID ("move_minimized_radio");
724
545
        tasklist->change_workspace_radio = WID ("change_workspace_radio");
725
546
 
726
 
        setup_sensitivity (tasklist, client, builder,
 
547
        setup_sensitivity (tasklist, builder,
727
548
                           "move_minimized_radio",
728
549
                           "change_workspace_radio",
729
550
                           NULL,
730
 
                           "move_unminimized_windows" /* key */);
 
551
                           "move-unminimized-windows" /* key */);
731
552
 
732
553
        /* Window grouping: */
733
554
        button = get_grouping_button (tasklist, tasklist->grouping);
734
555
        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
735
556
        g_object_set_data (G_OBJECT (tasklist->never_group_radio),
736
 
                           "group_value", "never");
 
557
                           "group_value", "never-group");
737
558
        g_object_set_data (G_OBJECT (tasklist->auto_group_radio),
738
 
                           "group_value", "auto");
 
559
                           "group_value", "auto-group");
739
560
        g_object_set_data (G_OBJECT (tasklist->always_group_radio),
740
 
                           "group_value", "always");
 
561
                           "group_value", "always-group");
741
562
 
742
563
        g_signal_connect (G_OBJECT (tasklist->never_group_radio), "toggled",
743
564
                          (GCallback) group_windows_toggled, tasklist);
762
583
        g_signal_connect (tasklist->properties_dialog, "response",
763
584
                          G_CALLBACK (response_cb),
764
585
                          tasklist);
765
 
 
766
 
        g_object_unref (G_OBJECT (client));
767
586
}
768
587
 
769
588