Ejemplo n.º 1
0
#!/usr/bin/env python3

import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
import os
from utils import localization, instance
from services import data
from dialogs.settings_dialog import services_list
import json

CONFIG_PATH = os.path.join(os.path.expanduser('~'), '.config', 'gis-weather')
CONFIG_PATH_FILE = os.path.join(CONFIG_PATH, instance.get_config_file())

url = None
example = None
code = None
dict_weather_lang = None
weather_lang_list = None
gw_config = None
loading = False
grid_appid = None
entrybox_appid = None


def Save_Config():
    json.dump(gw_config,
              open(CONFIG_PATH_FILE, "w"),
              sort_keys=True,
              indent=4,
              separators=(', ', ': '))
Ejemplo n.º 2
0
from gi.repository import Gtk, Pango, Gdk
from utils import autorun, localization, desktop, instance
import os
import json
import sys
from services import data
from services.data import services_list
import re

if sys.platform.startswith("win"):
    WIN = True
else:
    WIN = False

CONFIG_PATH = os.path.join(os.path.expanduser('~'), '.config', 'gis-weather')
CONFIG_PATH_FILE = os.path.join(CONFIG_PATH, instance.get_config_file())
ICONS_USER_PATH = os.path.join(CONFIG_PATH, 'icons')
BGS_USER_PATH = os.path.join(CONFIG_PATH, 'backgrounds')
INSTANCE_NO = instance.count()

work_path = os.path.abspath(os.path.dirname(__file__))

gw_config_default_set = {}
gw_config_set = {}
drawing_area_set = None
state_lock = True
App_gw = None
icons_list_set = []
backgrounds_list_set = []
BGS_PATH_SET = None
ICONS_PATH_SET = None