~muktupavels/compiz/gwd-improve-settings-storage

« back to all changes in this revision

Viewing changes to gtk/window-decorator/gtk-window-decorator.c

  • Committer: CI Train Bot
  • Author(s): Alberts Muktupāvels
  • Date: 2016-05-25 14:20:28 UTC
  • mfrom: (4010.20.7 gwd-remove-settings-writable)
  • Revision ID: ci-train-bot@canonical.com-20160525142028-6pu2qyxof8ji4uds
Remove GWDSettingsWritable.
Approved by: Sam Spilsbury

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
#include "gtk-window-decorator.h"
27
27
#include "gwd-metacity-window-decoration-util.h"
28
 
#include "gwd-settings-writable-interface.h"
29
28
#include "gwd-settings.h"
30
29
 
31
 
GWDSettingsWritable *writable;
32
30
GWDSettings         *settings;
33
31
GWDTheme *gwd_theme;
34
32
 
195
193
    decor_frame_t *bare_p, *switcher_p;
196
194
 
197
195
    const char *option_meta_theme = NULL;
198
 
    gint       option_blur_type = 0;
 
196
    gint       option_blur_type = BLUR_TYPE_UNSET;
199
197
 
200
198
    program_name = argv[0];
201
199
 
324
322
 
325
323
    initialize_decorations ();
326
324
 
327
 
    writable = GWD_SETTINGS_WRITABLE_INTERFACE (gwd_settings_new (option_blur_type != BLUR_TYPE_NONE ? &option_blur_type : NULL,
328
 
                                                                  option_meta_theme ? &option_meta_theme : NULL));
 
325
    settings = gwd_settings_new (option_blur_type, option_meta_theme);
329
326
 
330
 
    if (!writable)
 
327
    if (!settings)
331
328
        return 1;
332
329
 
333
 
    settings = GWD_SETTINGS (writable);
334
 
 
335
330
    g_signal_connect (settings, "update-decorations",
336
331
                      G_CALLBACK (update_decorations_cb), NULL);
337
332
    g_signal_connect (settings, "update-frames",
339
334
    g_signal_connect (settings, "update-metacity-theme",
340
335
                      G_CALLBACK (update_metacity_theme_cb), NULL);
341
336
 
342
 
    gwd_settings_writable_freeze_updates (writable);
 
337
    gwd_settings_freeze_updates (settings);
343
338
 
344
 
    init_settings (writable);
 
339
    init_settings (settings);
345
340
 
346
341
    for (i = 0; i < 3; ++i)
347
342
    {
360
355
 
361
356
    if (!create_tooltip_window ())
362
357
    {
363
 
        g_object_unref (writable);
 
358
        g_object_unref (settings);
364
359
 
365
 
        free (settings);
366
360
        fprintf (stderr, "%s, Couldn't create tooltip window\n", argv[0]);
367
361
        return 1;
368
362
    }
410
404
                             WINDOW_DECORATION_TYPE_WINDOW);
411
405
 
412
406
    /* Update the decorations based on the settings */
413
 
    gwd_settings_writable_thaw_updates (writable);
 
407
    gwd_settings_thaw_updates (settings);
414
408
 
415
409
    /* Keep the default, bare and switcher decorations around
416
410
     * since otherwise they will be spuriously recreated */