Ejemplo n.º 1
0
 def test_parse_xml_desktop_type(self):
     test_file = os.path.join(tests_dir, 'wallpapoz_example_desktop_type.xml')
     files, conf = parse_wallpapoz_file(test_file)
     self.assertEqual(files, ['/home/sky/Pictures/wallpapers/naruto.jpg',
                              '/home/sky/Pictures/wallpapers/bleach.jpg',
                              '/home/sky/Pictures/wallpapers/lands_cape.gif',
                              '/home/sky/Pictures/wallpapers/cameron-highland.gif',
                              '/home/sky/wallpapers with space/paris.jpg',
                              '/home/sky/wallpapers with space/café.jpg',
                              '/home/sky/unicode/漢語.png',
                              '/home/sky/unicode/日本語.png'])
Ejemplo n.º 2
0
 def test_parse_xml_workspaces_type(self):
     workspaces, conf = parse_wallpapoz_file(tests_dir + sep + 'wallpapoz_example_workspace_type.xml')
     self.assertEqual(workspaces, {
         'workspace1': ['/home/sky/Pictures/wallpapers/naruto.jpg',
                        '/home/sky/Pictures/wallpapers/bleach.jpg'],
         'workspace_2': ['/home/sky/Pictures/wallpapers/lands_cape.gif',
                         '/home/sky/Pictures/wallpapers/cameron-highland.gif'],
         'workspace 3': ['/home/sky/wallpapers with space/paris.jpg',
                         '/home/sky/wallpapers with space/café.jpg'],
         'workspaceчетири': ['/home/sky/unicode/漢語.png',
                             '/home/sky/unicode/日本語.png'],
     })
Ejemplo n.º 3
0
 def test_parse_xml_desktop_type(self):
     test_file = os.path.join(tests_dir,
                              'wallpapoz_example_desktop_type.xml')
     files, conf = parse_wallpapoz_file(test_file)
     self.assertEqual(files, [
         '/home/sky/Pictures/wallpapers/naruto.jpg',
         '/home/sky/Pictures/wallpapers/bleach.jpg',
         '/home/sky/Pictures/wallpapers/lands_cape.gif',
         '/home/sky/Pictures/wallpapers/cameron-highland.gif',
         '/home/sky/wallpapers with space/paris.jpg',
         '/home/sky/wallpapers with space/café.jpg',
         '/home/sky/unicode/漢語.png', '/home/sky/unicode/日本語.png'
     ])
Ejemplo n.º 4
0
    def test_parse_xml_workspaces_type(self):
        test_file = os.path.join(tests_dir, 'wallpapoz_example_workspace_type.xml')

        workspaces, conf = parse_wallpapoz_file(test_file)
        self.assertEqual(workspaces, [
            ('workspace1', ['/home/sky/Pictures/wallpapers/naruto.jpg',
                            '/home/sky/Pictures/wallpapers/bleach.jpg']),
            ('workspace_2', ['/home/sky/Pictures/wallpapers/lands_cape.gif',
                             '/home/sky/Pictures/wallpapers/cameron-highland.gif']),
            ('workspace 3', ['/home/sky/wallpapers with space/paris.jpg',
                             '/home/sky/wallpapers with space/café.jpg']),
            ('workspaceчетири', ['/home/sky/unicode/漢語.png',
                                 '/home/sky/unicode/日本語.png'])
        ])
Ejemplo n.º 5
0
    def test_parse_xml_workspaces_type(self):
        test_file = os.path.join(tests_dir,
                                 'wallpapoz_example_workspace_type.xml')

        workspaces, conf = parse_wallpapoz_file(test_file)
        self.assertEqual(
            workspaces,
            [('workspace1', [
                '/home/sky/Pictures/wallpapers/naruto.jpg',
                '/home/sky/Pictures/wallpapers/bleach.jpg'
            ]),
             ('workspace_2', [
                 '/home/sky/Pictures/wallpapers/lands_cape.gif',
                 '/home/sky/Pictures/wallpapers/cameron-highland.gif'
             ]),
             ('workspace 3', [
                 '/home/sky/wallpapers with space/paris.jpg',
                 '/home/sky/wallpapers with space/café.jpg'
             ]),
             ('workspaceчетири',
              ['/home/sky/unicode/漢語.png', '/home/sky/unicode/日本語.png'])])
Ejemplo n.º 6
0
#   You should have received a copy of the GNU General Public License
#   along with this program; if not, write to the Free Software
#   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
#=============================================================================
from tkinter import Tk
from os.path import expanduser
from os.path import sep

from wallpapoz_gui.wallpapoz_menu import makemenu
from wallpapoz_gui.wallpapoz_main_window import makemainwindow
from lib.xml_parser import parse_wallpapoz_file

# Get the wallpapoz configuration file
home = expanduser('~')
wallpapoz_conf_dir = home + sep + '.wallpapoz'
wallpapoz_conf_file = wallpapoz_conf_dir + sep + 'wallpapoz.xml'

WALLPAPOZ_CONF_FILE = wallpapoz_conf_file


if __name__ == '__main__':
    root = Tk()
    root.title("Wallpapoz")

    makemenu(root)
    wallpapers, conf = parse_wallpapoz_file(WALLPAPOZ_CONF_FILE)
    makemainwindow(root, wallpapers, conf)

    root.mainloop()
Ejemplo n.º 7
0
#
#   You should have received a copy of the GNU General Public License
#   along with this program; if not, write to the Free Software
#   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
#=============================================================================
from tkinter import Tk
from os.path import expanduser
from os.path import sep

from wallpapoz_gui.wallpapoz_menu import makemenu
from wallpapoz_gui.wallpapoz_main_window import makemainwindow
from lib.xml_parser import parse_wallpapoz_file

# Get the wallpapoz configuration file
home = expanduser('~')
wallpapoz_conf_dir = home + sep + '.wallpapoz'
wallpapoz_conf_file = wallpapoz_conf_dir + sep + 'wallpapoz.xml'

WALLPAPOZ_CONF_FILE = wallpapoz_conf_file

if __name__ == '__main__':
    root = Tk()
    root.title("Wallpapoz")

    makemenu(root)
    wallpapers, conf = parse_wallpapoz_file(WALLPAPOZ_CONF_FILE)
    makemainwindow(root, wallpapers, conf)

    root.mainloop()