Subversion Repositories basico

Compare Revisions

Ignore whitespace Rev 295 → Rev 296

15,8 → 15,6
class Service(object):
# ~ logger = None
Service class is the base class for those modules acting as services.
Different modules (GUI, Database, Ask, etc...) share same methods
0,0 → 1,43
# -*- coding: utf-8 -*-
# File:
# Author: Tomás Vírseda
# License: GPL v3
# Description: Basico Widget Base class
import sys
import traceback as tb
from basico.core.mod_env import FILE
from basico.core.mod_log import get_logger
class BasicoWidget(object):
Service class is the base class for Basico widgets.
def __init__(self, app, logname):
"""Initialize Service instance
@type app: Basico instance
@param app: current Basico instance reference
if app is not None: = app
self.log = get_logger(logname)
def init_section(self, name):
"""Check if section exists in config. If not, create it"""
self.srvstg ='Settings')
config = self.srvstg.load()
config['Widgets'] = {}
self.log.debug("Section '%s' initialized in config file" % section)
679,7 → 679,7
def setup_stack_about(self):
box = Gtk.VBox()
about = self.srvgui.add_widget('widget_about', About())
about = self.srvgui.add_widget('widget_about', About(self.controller))
box.pack_start(about, True, True, 0)
return box
13,15 → 13,18
gi.require_version('Gdk', '3.0')
from gi.repository import Gtk
from gi.repository import Pango
from basico.core.mod_wdg import BasicoWidget
from basico.core.mod_env import APP
class About(Gtk.ScrolledWindow):
class About(BasicoWidget, Gtk.ScrolledWindow):
About class
def __init__(self):
def __init__(self, app):
super().__init__(app, __class__.__name__)
self.log.debug("Loading About Widget")
self.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)