~muktupavels/compiz/add-gwd-application

« back to all changes in this revision

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

  • Committer: Alberts Muktupāvels
  • Date: 2016-05-20 20:23:01 UTC
  • Revision ID: alberts.muktupavels@gmail.com-20160520202301-la11x2capltoluv9
Update metacity theme loading.

Show diffs side-by-side

added added

removed removed

Lines of Context:
221
221
gwd_theme_new (GWDThemeType  type,
222
222
               GWDSettings  *settings)
223
223
{
224
 
    GType object_type;
225
 
 
226
 
    object_type = GWD_TYPE_THEME_CAIRO;
227
 
 
228
224
#ifdef USE_METACITY
229
 
    if (type == GWD_THEME_TYPE_METACITY)
230
 
        object_type = GWD_TYPE_THEME_METACITY;
 
225
    if (type == GWD_THEME_TYPE_METACITY) {
 
226
        GWDTheme *theme;
 
227
 
 
228
        theme = g_object_new (GWD_TYPE_THEME_METACITY,
 
229
                              "settings", settings,
 
230
                              NULL);
 
231
 
 
232
        if (gwd_theme_metacity_is_valid (GWD_THEME_METACITY (theme)))
 
233
            return theme;
 
234
        else
 
235
            g_object_unref (theme);
 
236
    }
231
237
#endif
232
238
 
233
 
    return g_object_new (object_type,
 
239
    return g_object_new (GWD_TYPE_THEME_CAIRO,
234
240
                         "settings", settings,
235
241
                         NULL);
236
242
}