예제 #1
0
파일: add_todo.py 프로젝트: flachica/tasker
 def __init__(self, title, todo_item=None):
     """TODO: to be defined. """
     BaseDialog.__init__(self,
                         title,
                         None,
                         ok_button=True,
                         cancel_button=True)
     self.todo_item = todo_item
     if todo_item:
         self.text.set_text(todo_item.text)
         if todo_item.priority:
             select_value_in_combo(self.priority,
                                   ord(todo_item.priority) - 65)
         else:
             select_value_in_combo(self.priority, -1)
         if todo_item.projects:
             self.projects.set_active_items(todo_item.projects)
         if todo_item.contexts:
             self.contexts.set_active_items(todo_item.contexts)
         for key in todo_item.tags:
             for tag_widget in self.tags:
                 if tag_widget.name == key:
                     if type(tag_widget) == CheckCalendar:
                         tag_widget.set_date(todo_item.tags[key])
                     elif type(tag_widget) == Gtk.CheckButton:
                         tag_widget.set_active(
                             string2bool(todo_item.tags[key]))
                     else:
                         tag_widget.set_text(todo_item.tags[key])
                     break
     else:
         select_value_in_combo(self.priority, -1)
 def __init__(self, lat=39.36873, lon=-2.417274645879):
     self.lat = lat
     self.lon = lon
     BaseDialog.__init__(self,
                         _('Forecast'),
                         ok_button=False,
                         cancel_button=False)
예제 #3
0
 def __init__(self):
     """TODO: to be defined. """
     BaseDialog.__init__(self,
                         _('Add Context'),
                         None,
                         ok_button=True,
                         cancel_button=True)
예제 #4
0
 def __init__(self, contributors=[]):
     BaseDialog.__init__(self,
                         _('List of contributors'),
                         None,
                         ok_button=True,
                         cancel_button=True)
     self.load(contributors)
예제 #5
0
 def __init__(self):
     BaseDialog.__init__(self,
                         _('Preferences'),
                         None,
                         ok_button=True,
                         cancel_button=True)
     self.load()
예제 #6
0
 def __init__(self):
     """TODO: to be defined. """
     BaseDialog.__init__(self,
                         _("Add Project"),
                         None,
                         ok_button=True,
                         cancel_button=True)
예제 #7
0
 def __init__(self):
     BaseDialog.__init__(self,
                         _('List of tasks'),
                         None,
                         ok_button=True,
                         cancel_button=True)
     self.load()
예제 #8
0
 def __init__(self):
     BaseDialog.__init__(
         self,
         _("Waiting for keybind"),
         None,
         ok_button=True,
         cancel_button=True,
     )
예제 #9
0
 def __init__(self):
     """TODO: to be defined. """
     BaseDialog.__init__(self,
                         _('Add Tag'),
                         None,
                         ok_button=True,
                         cancel_button=True)
     select_value_in_combo(self.type, 'string')
예제 #10
0
 def __init__(self):
     """TODO: to be defined. """
     BaseDialog.__init__(self,
                         _('Readme Maker. Create README'),
                         None,
                         ok_button=False,
                         cancel_button=False)
     self.filename = None
예제 #11
0
 def __init__(self, hook):
     self.hook = hook
     self.changed = False
     BaseDialog.__init__(self,
                         _("List of tasks"),
                         None,
                         ok_button=True,
                         cancel_button=True)
     self.load()
예제 #12
0
 def __init__(self, title='', subtitle=''):
     self.title = _(title)
     self.configuration = Configuration()
     preferences = self.configuration.get('preferences')
     todo_file = Path(os.path.expanduser(preferences['todo-file']))
     self.todo_file = todo_file.as_posix()
     self.subtitle = _(subtitle)
     BaseDialog.__init__(self, title, None, ok_button=False,
                         cancel_button=False)
예제 #13
0
 def __init__(self, contributor=None):
     """TODO: to be defined. """
     BaseDialog.__init__(self,
                         _('Add task'),
                         None,
                         ok_button=True,
                         cancel_button=True)
     self.contributor = contributor
     if contributor:
         self.nickname.set_text(self.contributor.get_nickname())
         self.name.set_text(self.contributor.get_name())
         self.url.set_text(self.contributor.get_url())
         self.avatar_url.set_text(self.contributor.get_avatar_url())
         select_in_combo(self.role, self.contributor.get_role())
     else:
         select_in_combo(self.role, -1)
예제 #14
0
파일: graph.py 프로젝트: kpuljek/habits
 def __init__(self,
              title='',
              subtitle='',
              days='',
              distance='',
              clics='',
              keys=''):
     self.title = title
     self.subtitle = subtitle
     self.days = days
     self.distance = distance
     self.clics = clics
     self.keys = keys
     BaseDialog.__init__(self,
                         title,
                         None,
                         ok_button=False,
                         cancel_button=False)
예제 #15
0
 def __init__(self,
              title='',
              subtitle='',
              currencies=[],
              days=[],
              c0=[],
              c1=[],
              c2=[],
              c3=[],
              c4=[]):
     self.title = title
     self.subtitle = subtitle
     self.currencies = currencies
     self.days = days
     self.c0 = c0
     self.c1 = c1
     self.c2 = c2
     self.c3 = c3
     self.c4 = c4
     BaseDialog.__init__(self,
                         title,
                         None,
                         ok_button=False,
                         cancel_button=False)
예제 #16
0
 def __init__(self, parent=None, location=None, latitude=0, longitude=0):
     self.latitude = latitude
     self.longitude = longitude
     self.location = location
     BaseDialog.__init__(self, 'my-weather-indicator | ' + _('Where Am I'),
                         parent)
예제 #17
0
 def __init__(self, title='', filename=None, window=None):
     BaseDialog.__init__(self, title, filename, window)
 def __init__(self, adate=None):
     title = comun.APPNAME + ' | ' + _('Moon phases')
     self.adate = adate
     BaseDialog.__init__(self, title, ok_button=False, cancel_button=False)
예제 #19
0
 def __init__(self, location, ws, weather):
     title = comun.APPNAME + ' | ' + _('Forecast')
     self.location = location
     self.ws = ws
     self.weather = weather
     BaseDialog.__init__(self, title, ok_button=False, cancel_button=False)
예제 #20
0
 def __init__(self, app):
     self.app = app
     BaseDialog.__init__(self, app)