mirror of
https://github.com/gryf/pygtktalog.git
synced 2025-12-18 03:50:25 +01:00
* Fixed bug with no-displayed preferences window.
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
# This Python file uses the following encoding: utf-8
|
||||
import utils._importer
|
||||
import utils.globals
|
||||
from gtkmvc import Model
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
||||
from ConfigParser import ConfigParser
|
||||
|
||||
class Ini(object):
|
||||
@@ -22,9 +27,11 @@ class Ini(object):
|
||||
def show(self):
|
||||
return "\n".join(self.ini)
|
||||
|
||||
class ConfigModel(object):
|
||||
class ConfigModel(Model):
|
||||
ini = Ini()
|
||||
|
||||
__properties__ = {}
|
||||
|
||||
confd = {
|
||||
'savewin' : True,
|
||||
'savepan' : True,
|
||||
@@ -87,7 +94,7 @@ class ConfigModel(object):
|
||||
path = "/tmp"
|
||||
|
||||
def __init__(self):
|
||||
pass
|
||||
Model.__init__(self)
|
||||
|
||||
def save(self):
|
||||
try:
|
||||
|
||||
@@ -4,6 +4,8 @@ import utils._importer
|
||||
import utils.globals
|
||||
from gtkmvc import Model
|
||||
|
||||
from models.m_config import ConfigModel
|
||||
|
||||
class MainModel(Model):
|
||||
"""Our model contains a numeric counter and a numeric value that
|
||||
holds the value that the counter must be assigned to when we the
|
||||
@@ -13,6 +15,8 @@ class MainModel(Model):
|
||||
|
||||
def __init__(self):
|
||||
Model.__init__(self)
|
||||
self.config = ConfigModel()
|
||||
self.config.load()
|
||||
return
|
||||
|
||||
pass # end of class
|
||||
|
||||
Reference in New Issue
Block a user