Logo Search packages:      
Sourcecode: wallpaper-tray version File versions  Download package

bool Wallpapers::DeleteCurrent (  ) 

Delete the current wallpaper from disk.


Whether or not the wallpaper was deleted.
12-06-2006 GAF Written

Definition at line 197 of file Wallpapers.cc.

References SetRandom().

Referenced by DeleteChange().

      Glib::ustring szWpPath(m_pGconfClient->get_string("/desktop/gnome/background/picture_filename"));

      if(szWpPath.length() == 0)
            return false;
      }// end if

      // attempt to remove the file
            fs::path pathWp(szWpPath.c_str(), fs::native);

            if(fs::exists(pathWp) == false)
                  return false;
            }// end if

      }// end try
      catch(fs::filesystem_error e)
            return false;
      }// end catch

      return Wallpapers::SetRandom(true);
}// end Wallpapers::DeleteCurrent

Generated by  Doxygen 1.6.0   Back to index