Subversion Repositories basico

Compare Revisions

Ignore whitespace Rev 128 → Rev 129

/branches/BR-0.3/basico/callbacks.py
80,7 → 80,8
def actions_other_delete(self, *args):
db = self.get_service('DB')
sapnoteview = self.gui.get_widget('viewmenu')
sapnotes = sapnoteview.get_selected_notes()
visor = self.gui.get_widget('visor')
sapnotes = visor.get_toggled()
sapnotes.sort()
winroot = self.gui.get_widget('mainwindow')
 
95,7 → 96,8
response = dialog.run()
if response == Gtk.ResponseType.OK:
db = self.get_service('DB')
sapnotes = sapnoteview.get_selected_notes()
visor = self.gui.get_widget('visor')
sapnotes = visor.get_toggled()
for sapnote in sapnotes:
db.delete(sapnote)
self.search_notes()
211,7 → 213,8
def actions_manage_tasks(self, *args):
#~ sapnoteview = self.gui.get_widget('viewmenu')
#~ try:
#~ sapnotes = sapnoteview.get_selected_notes()
#~ visor = self.gui.get_widget('visor')
#~ sapnotes = visor.get_toggled()
#~ except:
#~ sapnote = ''
self.tasks.show_window(active=True)
219,7 → 222,8
 
def link_tasks_to_sapnotes(self, *args):
sapnoteview = self.gui.get_widget('viewmenu')
sapnotes = sapnoteview.get_selected_notes()
visor = self.gui.get_widget('visor')
sapnotes = visor.get_toggled()
tasks = self.tasks.get_selected()
self.sap.link_to_task(sapnotes, tasks)
 
226,7 → 230,8
def actions_bookmark(self, *args):
db = self.get_service('DB')
sapnoteview = self.gui.get_widget('viewmenu')
sapnotes = sapnoteview.get_selected_notes()
visor = self.gui.get_widget('visor')
sapnotes = visor.get_toggled()
self.log.debug("Action bookmark triggered for SAP Notes: %s" % sapnotes)
view = sapnoteview.get_view()
self.sap.set_bookmark(sapnotes)
238,7 → 243,8
def actions_unbookmark(self, *args):
db = self.get_service('DB')
sapnoteview = self.gui.get_widget('viewmenu')
sapnotes = sapnoteview.get_selected_notes()
visor = self.gui.get_widget('visor')
sapnotes = visor.get_toggled()
self.log.debug("Action unbookmark triggered for SAP Notes: %s" % sapnotes)
self.sap.set_no_bookmark(sapnotes)
db.save_notes()
257,7 → 263,8
db = self.get_service('DB')
winroot = self.gui.get_widget('mainwndow')
sapnoteview = self.gui.get_widget('viewmenu')
sapnotes = sapnoteview.get_selected_notes()
visor = self.gui.get_widget('visor')
sapnotes = visor.get_toggled()
dialog = Gtk.FileChooserDialog("Save file", winroot,
Gtk.FileChooserAction.SAVE,
(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
297,7 → 304,8
def actions_export_txt(self, *args):
rootwin = self.gui.get_widget('mainwndow')
sapnoteview = self.gui.get_widget('viewmenu')
sapnotes = sapnoteview.get_selected_notes()
visor = self.gui.get_widget('visor')
sapnotes = visor.get_toggled()
dialog = Gtk.FileChooserDialog("Save file", rootwin,
Gtk.FileChooserAction.SAVE,
(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
321,7 → 329,8
db = self.get_service('DB')
rootwin = self.gui.get_widget('mainwndow')
sapnoteview = self.gui.get_widget('viewmenu')
sapnotes = sapnoteview.get_selected_notes()
visor = self.gui.get_widget('visor')
sapnotes = visor.get_toggled()
dialog = Gtk.FileChooserDialog("Save file", rootwin,
Gtk.FileChooserAction.SELECT_FOLDER,
(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
351,7 → 360,8
#~ db = self.get_service('DB')
#~ rootwin = self.gui.get_widget('mainwndow')
#~ sapnoteview = self.gui.get_widget('viewmenu')
#~ sapnotes = sapnoteview.get_selected_notes()
#~ visor = self.gui.get_widget('visor')
#~ sapnotes = visor.get_toggled()
#~ dialog = Gtk.FileChooserDialog("Select Basico JSON file", rootwin,
#~ Gtk.FileChooserAction.OPEN,
#~ (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,