def _create_bindings(self, wnd):
		BaseFrame._create_bindings(self, wnd)
		wnd.Bind(wx.EVT_LISTBOX, self._on_folders_listbox, self._lb_folders)
		wnd.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self._on_pages_list_activated,
				self._lb_pages)
		wnd.Bind(wx.EVT_LIST_COL_CLICK, self._on_pages_list_col_click)
		publisher.subscribe(self._on_notebook_update, ('notebook', 'update'))
		publisher.subscribe(self._on_notebook_update, ('notebook', 'delete'))
Exemple #2
0
	def _load_controls(self):
		# pylint: disable=W0201
		BaseFrame._load_controls(self)
		tasklist_panel = self['panel_tasks']
		self._items_list_ctrl = TLC.TaskListControl(tasklist_panel)
		box = wx.BoxSizer()
		box.Add(self._items_list_ctrl, 1, wx.EXPAND)
		self['panel_tasks'].SetSizer(box)
		self._searchbox = self['sc_search']
	def _load_controls(self):
		# pylint: disable=W0201
		BaseFrame._load_controls(self)
		# filter tree ctrl
		self._lb_folders = self['lb_folders']
		self._lb_pages = wx.ListCtrl(self['pages_panel'], -1, style=wx.LC_REPORT)

		box = wx.BoxSizer()
		box.Add(self._lb_pages, 1, wx.EXPAND | wx.ALL, 12)
		self['pages_panel'].SetSizer(box)
Exemple #4
0
	def _create_bindings(self, wnd):
		BaseFrame._create_bindings(self, wnd)
		#self.wnd.Bind(wx.EVT_TEXT, self._on_search, self._searchbox)
		self.wnd.Bind(wx.EVT_SEARCHCTRL_SEARCH_BTN, self._on_search,
				self._searchbox)
		self.wnd.Bind(wx.EVT_SEARCHCTRL_CANCEL_BTN, self._on_search_cancel,
				self._searchbox)
		self.wnd.Bind(wx.EVT_TEXT_ENTER, self._on_search, self._searchbox)
		self.wnd.Bind(wx.EVT_BUTTON, self._on_search, id=wx.ID_FIND)
		wnd.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self._on_items_list_activated,
				self._items_list_ctrl)
Exemple #5
0
	def _create_bindings(self, wnd):
		BaseFrame._create_bindings(self, wnd)

		self._create_menu_bind('menu_file_load', self._on_menu_file_load)
		self._create_menu_bind('menu_file_save', self._on_menu_file_save)
		self._create_menu_bind('menu_file_exit', self._on_menu_file_exit)
		self._create_menu_bind('menu_file_sync', self._on_menu_file_sync)
		self._create_menu_bind('menu_file_export_tasks',
				self._on_menu_file_export_tasks)
		self._create_menu_bind('menu_help_about', self._on_menu_help_about)
		self._create_menu_bind('menu_task_new', self._on_menu_task_new)
		self._create_menu_bind('menu_task_quick', self._on_menu_task_quick)
		self._create_menu_bind('menu_task_edit', self._on_menu_task_edit)
		self._create_menu_bind('menu_task_delete', self._on_menu_task_delete)
		self._create_menu_bind('menu_task_clone', self._on_menu_task_clone)
		self._create_menu_bind('menu_notebook_open', self._on_menu_notebook_open)
		self._create_menu_bind('menu_task_complete', self._on_menu_task_complete)
		self._create_menu_bind('menu_task_starred', self._on_menu_task_starred)
		self._create_menu_bind('menu_search_task', self._on_menu_search_task)
		self._create_menu_bind('menu_sett_tags', self._on_menu_sett_tags)
		self._create_menu_bind('menu_sett_goals', self._on_menu_sett_goals)
		self._create_menu_bind('menu_sett_folders', self._on_menu_sett_folders)
		self._create_menu_bind('menu_sett_contexts', self._on_menu_sett_contexts)
		self._create_menu_bind('menu_sett_preferences',
				self._on_menu_sett_preferences)

		wnd.Bind(wx.EVT_TREE_ITEM_ACTIVATED, self._on_filter_tree_item_activated,
				self._filter_tree_ctrl)
		wnd.Bind(CT.EVT_TREE_ITEM_CHECKED, self._on_filter_tree_item_selected,
				self._filter_tree_ctrl)
		wnd.Bind(wx.EVT_RADIOBOX, self._on_rb_show_selection,
				self['rb_show_selection'])
		wnd.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self._on_items_list_activated,
				self._items_list_ctrl)
		self._items_list_ctrl.Bind(wx.EVT_COMMAND_RIGHT_CLICK,
				self._on_items_list_right_click)
		self._items_list_ctrl.Bind(wx.EVT_RIGHT_UP,
				self._on_items_list_right_click)
		self._items_list_ctrl.Bind(TLC.EVT_DRAG_TASK, self._on_item_drag)
		wnd.Bind(wx.EVT_BUTTON, self._on_btn_path_back, id=wx.ID_UP)
		wnd.Bind(wx.EVT_BUTTON, self._on_btn_edit_parent,
				self['btn_parent_edit'])
		wnd.Bind(wx.EVT_TIMER, self._on_timer)
		wnd.Bind(wx.EVT_ICONIZE, self._on_window_iconze)

		publisher.subscribe(self._on_tasks_update, ('task', 'update'))
		publisher.subscribe(self._on_tasks_update, ('task', 'delete'))
		publisher.subscribe(self._on_frame_messsage, ('gui', 'frame_main'))

		self._create_popup_menu_bindings(wnd)
Exemple #6
0
	def _on_close(self, event):
		appconfig = self._appconfig
		if appconfig.get('sync', 'sync_on_exit'):
			self._autosync(False)
		appconfig.set('main', 'show_finished', self._btn_show_finished.GetValue())
		appconfig.set('main', 'show_subtask', self._btn_show_subtasks.GetValue())
		appconfig.set('main', 'show_hide_until', self._btn_hide_until.GetValue())
		sel_group = self['rb_show_selection'].GetSelection()
		if sel_group == queries.QUERY_TRASH:
			sel_group = 0
		appconfig.set('main', 'selected_group', sel_group)
		appconfig.set(self._window_name, 'splitter_pos',
			self['window_2'].GetSashPosition())
		self._filter_tree_ctrl.save_last_settings()
		self._tbicon.Destroy()
		BaseFrame._on_close(self, event)
Exemple #7
0
	def _on_close(self, event):
		FrameSeach._instance = None
		self._session.close()
		BaseFrame._on_close(self, event)
Exemple #8
0
	def __init__(self, parent):
		BaseFrame.__init__(self, parent)
		self._setup()
	def __init__(self):
		BaseFrame.__init__(self)
		self._setup()
	def _on_close(self, event):
		self._appconfig.set('frame_notebook', 'win1', self['window_1']
				.GetSashPosition())
		FrameNotebook._instance = None
		BaseFrame._on_close(self, event)
	def _set_size_pos(self):
		BaseFrame._set_size_pos(self)
		self['window_1'].SetSashGravity(0.0)
		self['window_1'].SetMinimumPaneSize(20)
		self['window_1'].SetSashPosition(self._appconfig.get('frame_notebooks',
				'win1', 200))
Exemple #12
0
	def __init__(self):
		self._all_loaded = False
		BaseFrame.__init__(self)
		self._setup()
		wx.CallAfter(self._on_all_loaded)
Exemple #13
0
	def _set_size_pos(self):
		self['window_2'].SetSashPosition(self._appconfig.get(self._window_name,
				'splitter_pos', 150))
		BaseFrame._set_size_pos(self)