~vcs-imports/ristretto/trunk

« back to all changes in this revision

Viewing changes to src/main_window.c

  • Committer: Stephan Arts
  • Date: 2010-07-13 22:25:52 UTC
  • Revision ID: git-v1:bfe534260e0229c1f927179de22ee93c73ddd71d
Add check for nautilus to set the wallpaper under gnome

Show diffs side-by-side

added added

removed removed

Lines of Context:
381
381
    GtkWidget       *main_vbox = gtk_vbox_new (FALSE, 0);
382
382
    GtkRecentFilter *recent_filter;
383
383
    guint            window_width, window_height;
 
384
    RsttoWallpaperManager *wallpaper_manager = NULL;
384
385
 
385
386
    GClosure        *leave_fullscreen_closure = g_cclosure_new_swap ((GCallback)gtk_window_unfullscreen, window, NULL);
386
387
    GClosure        *next_image_closure = g_cclosure_new ((GCallback)cb_rstto_main_window_next_image, window, NULL);
391
392
    gtk_window_set_title (GTK_WINDOW (window), RISTRETTO_APP_TITLE);
392
393
 
393
394
    window->priv = g_new0(RsttoMainWindowPriv, 1);
394
 
    window->priv->wallpaper_manager = RSTTO_WALLPAPER_MANAGER (rstto_xfce_wallpaper_manager_new());
 
395
    wallpaper_manager = RSTTO_WALLPAPER_MANAGER (rstto_gnome_wallpaper_manager_new());
 
396
    if (rstto_wallpaper_manager_check_running (wallpaper_manager) == FALSE)
 
397
    {
 
398
        g_object_unref (wallpaper_manager);
 
399
        wallpaper_manager = NULL;
 
400
    }
 
401
 
 
402
    wallpaper_manager = RSTTO_WALLPAPER_MANAGER (rstto_xfce_wallpaper_manager_new());
 
403
    if (rstto_wallpaper_manager_check_running (wallpaper_manager) == FALSE)
 
404
    {
 
405
        g_object_unref (wallpaper_manager);
 
406
        wallpaper_manager = NULL;
 
407
    }
 
408
    window->priv->wallpaper_manager = wallpaper_manager;
395
409
 
396
410
    window->priv->iter = NULL;
397
411
 
930
944
            
931
945
 
932
946
            /* View Menu */
933
 
            if (rstto_wallpaper_manager_check_running (window->priv->wallpaper_manager))
 
947
            if (window->priv->wallpaper_manager)
934
948
            {
935
949
                gtk_widget_set_sensitive (gtk_ui_manager_get_widget (window->priv->ui_manager, "/main-menu/view-menu/set-as-wallpaper"), TRUE);
936
950
            }
978
992
            
979
993
 
980
994
            /* View Menu */
981
 
            if (rstto_wallpaper_manager_check_running (window->priv->wallpaper_manager))
 
995
            if (window->priv->wallpaper_manager)
982
996
            {
983
997
                gtk_widget_set_sensitive (gtk_ui_manager_get_widget (window->priv->ui_manager, "/main-menu/view-menu/set-as-wallpaper"), TRUE);
984
998
            }
1262
1276
        image = rstto_image_list_iter_get_image (window->priv->iter);
1263
1277
    g_return_if_fail (image);
1264
1278
 
1265
 
    if (rstto_wallpaper_manager_check_running (window->priv->wallpaper_manager))
 
1279
    if (window->priv->wallpaper_manager)
1266
1280
    {
1267
1281
        if (rstto_wallpaper_manager_configure_dialog_run (window->priv->wallpaper_manager, image) == GTK_RESPONSE_OK)
1268
1282
        {