gtg-contributors team mailing list archive
-
gtg-contributors team
-
Mailing list archive
-
Message #00693
[Merge] lp:~gtg-contributors/gtg/gsoc2011-joaoascenso into lp:gtg
Izidor Matušov has proposed merging lp:~gtg-contributors/gtg/gsoc2011-joaoascenso into lp:gtg.
Requested reviews:
Izidor Matušov (izidor)
For more details, see:
https://code.launchpad.net/~gtg-contributors/gtg/gsoc2011-joaoascenso/+merge/82791
The awesome work of Joao (GSoC 2011)
--
https://code.launchpad.net/~gtg-contributors/gtg/gsoc2011-joaoascenso/+merge/82791
Your team Gtg contributors is subscribed to branch lp:~gtg-contributors/gtg/gsoc2011-joaoascenso.
=== modified file 'GTG/backends/rtm/rtm.py' (properties changed: +x to -x)
=== modified file 'GTG/backends/twitter.py' (properties changed: +x to -x)
=== modified file 'GTG/core/__init__.py'
--- GTG/core/__init__.py 2011-11-14 18:20:04 +0000
+++ GTG/core/__init__.py 2011-11-19 18:35:37 +0000
@@ -134,6 +134,7 @@
ALLTASKS_TAG = "gtg-tags-all"
NOTAG_TAG = "gtg-tags-none"
SEP_TAG = "gtg-tags-sep"
+ SEARCH_TAG = "search"
def __init__(self):
if hasattr(self, 'data_dir'):
=== modified file 'GTG/core/datastore.py'
--- GTG/core/datastore.py 2011-11-14 18:06:06 +0000
+++ GTG/core/datastore.py 2011-11-19 18:35:37 +0000
@@ -66,6 +66,7 @@
self.requester = requester.Requester(self, global_conf)
self.tagfile = None
self.__tagstore = self.treefactory.get_tags_tree(self.requester)
+ self.view_params = {}
self.added_tag = {}
self.load_tag_tree()
self._backend_signals = BackendSignals()
@@ -142,8 +143,46 @@
else:
raise IndexError('tag %s was already in the datastore' % tagname)
return tag
+<<<<<<< TREE
def rename_tag(self, oldname, newname):
+=======
+
+ def new_view(self,viewname, params):
+ """Create a new view and return it or return the existing one
+ with corresponding name"""
+ def adding_view(vname,tag, params):
+ #if not self.__tagstore.get_node('search').has_node(tname):
+ if not self.__tagstore.has_node(vname):
+ self.__tasks.add_filter(vname,self.treefactory.search,parameters=params)
+ self.__tagstore.add_node(tag,'search')
+ tag.set_save_callback(self.save)
+ self.added_tag.pop(vname)
+ Log.debug("********* view added %s *******" % vname)
+ else:
+ print "Warning: Trying to add tag %s multiple times" %tname
+ #we create a new view from a name
+ vname = viewname.encode("UTF-8")
+ #if vname not in self.tags:
+ if not self.__tagstore.has_node(vname):
+ if vname not in self.added_tag:
+ tag = Tag(vname, req=self.requester)
+ #tag.set_attribute("special","searchsaved")
+ tag.set_attribute("label","<span weight='bold'>%s</span>"%(vname))
+ tag.set_attribute("icon","search")
+ self.added_tag[vname] = tag
+ adding_view(vname,tag, params)
+ #puts for save on exit
+ self.add_view_control(vname, params)
+ else:
+ #it means that we are in the process of adding the tag
+ tag = self.added_tag[tname]
+ else:
+ raise IndexError('view %s was already in the datastore' %vname)
+ return tag
+
+ def rename_tag(self,oldname,newname):
+>>>>>>> MERGE-SOURCE
print "Tag renaming not implemented yet"
def get_tag(self, tagname):
@@ -157,15 +196,38 @@
return self.__tagstore.get_node(tagname)
else:
return None
+<<<<<<< TREE
+=======
+ def remove_view(self,viewname):
+ """
+ Removes a tag from the tagtree
+ Should only be used to remove views
+ """
+ if self.__tagstore.has_node(viewname):
+ self.__tagstore.del_node(viewname)
+ self.del_view_control(viewname)
+ else:
+ raise IndexError("No view to by named %s" % viewname)
+
+>>>>>>> MERGE-SOURCE
def load_tag_tree(self):
+ """
+ Loads the tag tree from a xml file
+ """
+ def convert_to_boolean(value):
+ if value == 'True':
+ return True
+ else:
+ return False
# Loading tags
tagfile = os.path.join(CoreConfig().get_data_dir(), TAG_XMLFILE)
doc, xmlstore = cleanxml.openxmlfile(tagfile, TAG_XMLROOT)
for t in xmlstore.childNodes:
- #We should only care about tag with a name beginning with "@"
+ #We should only care about tag with a name beginning with "@", search tags and views
#Other are special tags
tagname = t.getAttribute("name")
+<<<<<<< TREE
tag = self.new_tag(tagname)
attr = t.attributes
i = 0
@@ -177,13 +239,101 @@
parent = tag.get_attribute('parent')
if parent:
tag.set_parent(parent)
+=======
+ #parent dictates what the element is
+ parent = t.getAttribute('parent')
+ #a search is linear. by the time it finds a search all the params are extracted
+ if parent == 'search':
+ self.new_view(tagname, self.view_params[tagname])
+ #if the xml finds a view
+ elif parent == 'view':
+ self.view_params[tagname] = {}
+ #iterates all elements of parameters
+ for i in t.childNodes:
+ name = i.getAttribute("name")
+ self.view_params[tagname][name] = []
+ value = []
+ #if its one of these, has two nodes
+ if name == 'tasks' or name == 'tags' or name == 'words' or name == 'literals':
+ text = []
+ sub_list = i.getElementsByTagName("text")
+ #gets the text
+ for s in sub_list :
+ text.append(str(s.childNodes[0].nodeValue))
+ #gets the values
+ sub_list = i.getElementsByTagName("value")
+ #from xml
+ for s in sub_list :
+ bool = convert_to_boolean(str(s.childNodes[0].nodeValue))
+ value.append(bool)
+ #into parameters
+ for i in range(len(text)):
+ self.view_params[tagname][name].append((value[i],text[i]))
+ else:
+ #gets the values
+ sub_list = i.getElementsByTagName("value")
+ #from xml
+ for s in sub_list :
+ bool = convert_to_boolean(str(s.childNodes[0].nodeValue))
+ value.append(bool)
+ #into parameters
+ for i in range(len(value)):
+ self.view_params[tagname][name].append(value[i])
+ else:
+ tag = self.new_tag(tagname)
+ attr = t.attributes
+ i = 0
+ while i < attr.length:
+ at_name = attr.item(i).name
+ at_val = t.getAttribute(at_name)
+ tag.set_attribute(at_name, at_val)
+ i += 1
+ #parent = tag.get_attribute('parent')
+ if parent:
+ # if self.__tagstore.has_node(parent):
+ # pnode = self.__tagstore.get_node(parent)
+ # else:
+ # pnode=self.new_tag(parent)
+ tag.set_parent(parent)
+ #self.__tagstore.add_node(tag,parent)
+>>>>>>> MERGE-SOURCE
self.tagfile = tagfile
+<<<<<<< TREE
+=======
+
+
+>>>>>>> MERGE-SOURCE
def save_tagtree(self):
+ """
+ saves the tag tree to a xml file
+ """
if self.tagfile:
doc, xmlroot = cleanxml.emptydoc(TAG_XMLROOT)
tags = self.__tagstore.get_main_view().get_all_nodes()
already_saved = [] #We avoid saving the same tag twice
+
+ #save views
+ for view in self.view_params:
+ #set name and view so it can be identified on load
+ t_xml = doc.createElement("view")
+ t_xml.setAttribute("name", view)
+ t_xml.setAttribute("parent", 'view')
+ #for each parameter
+ for el in self.view_params[view]:
+ element = doc.createElement(el)
+ element.setAttribute("name", el)
+ #a text parameter
+ if el == 'tasks' or el == 'tags' or el == 'words' or el == 'literals':
+ for i in self.view_params[view].get(el):
+ cleanxml.addTextNode(doc,element,"value",str(i[0]))
+ cleanxml.addTextNode(doc,element,"text",str(i[1]))
+ #simple parameters
+ else:
+ cleanxml.addTextNode(doc,element,"value",str(self.view_params[view].get(el)))
+ #element.setAttribute("value", str(i))
+ t_xml.appendChild(element)
+ xmlroot.appendChild(t_xml)
#we don't save tags with no attributes
#It saves space and allow the saved list growth to be controlled
for tname in tags:
@@ -200,8 +350,38 @@
if value:
t_xml.setAttribute(a, value)
xmlroot.appendChild(t_xml)
+
+ #finally, save it
cleanxml.savexml(self.tagfile, doc)
+<<<<<<< TREE
+=======
+
+ def add_view_control(self, name, params):
+ """
+ adds a view and its parameters to the control dic
+ """
+ self.view_params[name] = params
+
+ def del_view_control(self, name):
+ """
+ adds a view and its parameters to the control dic
+ """
+ del(self.view_params[name])
+
+ def get_view_control_names(self):
+ """
+ returns the names of the views
+ """
+ return self.view_params.keys()
+
+ def get_view_dic(self):
+ """
+ returns the dic of the views
+ """
+ return self.view_params
+
+>>>>>>> MERGE-SOURCE
##########################################################################
### Tasks functions
##########################################################################
=== modified file 'GTG/core/plugins/__init__.py' (properties changed: +x to -x)
=== modified file 'GTG/core/plugins/engine.py' (properties changed: +x to -x)
=== modified file 'GTG/core/requester.py'
--- GTG/core/requester.py 2011-11-14 18:36:54 +0000
+++ GTG/core/requester.py 2011-11-19 18:35:37 +0000
@@ -59,6 +59,7 @@
#TODO build filters here
self.counter_call = 0
+ self.searchActive = False
############# Signals #########################
#Used by the tasks to emit the task added/modified signal
@@ -73,7 +74,18 @@
def get_main_view(self):
return self.__basetree.get_main_view()
+<<<<<<< TREE
+=======
+
+ def get_search_tree(self,name='search',refresh=True):
+ """
+ return the search tree
+ only used by search operations to show a tree without interfering with the main
+ """
+ return self.__basetree.get_viewtree(name=name,refresh=refresh)
+
+>>>>>>> MERGE-SOURCE
# This is a FilteredTree that you have to handle yourself.
# You can apply/unapply filters on it as you wish.
# def get_custom_tasks_tree(self, name=None, refresh=True):
@@ -151,14 +163,87 @@
if task:
for tag in task.get_tags():
self.emit('tag-modified', tag.get_name())
+<<<<<<< TREE
return self.__basetree.del_node(tid, recursive=recursive)
+=======
+ return self.__basetree.del_node(tid,recursive=recursive)
+
+ def get_all_titles(self, lowercase=False):
+ """
+ Gets the titles from all tasks
+
+ if lowercase, titles are return in lowercase :)
+ """
+ titles = []
+ nodes = self.get_main_view().get_all_nodes()
+ if lowercase:
+ for x in nodes:
+ titles.append(self.get_main_view().get_node(x).get_title().lower())
+ else:
+ for x in nodes:
+ titles.append(self.get_main_view().get_node(x).get_title())
+ return titles
+
+ def task_exist(self,text, lowercase=False):
+ """
+ Checks if a task exists by its title
+
+ if lowercase, titles are not case checked :)
+ """
+ #gets all nodes
+ nodes = self.get_main_view().get_all_nodes()
+ #case insensitive
+ if lowercase:
+ for x in nodes:
+ if text.lower() == self.get_main_view().get_node(x).get_title().lower():
+ return True
+ #case sensitive
+ else:
+ for x in nodes:
+ if text == self.get_main_view().get_node(x).get_title():
+ return True
+ #if its gets here, there's no task by that name
+ return False
+
+ def get_task_id(self, text, tree='search'):
+ """
+ returns the first task from a treeview
+
+ default is a search view
+ if there's 2 tasks with the same title, opens the first it finds...
+ """
+ #lowercase
+ text = text.lower()
+ #gets nodes from requested tree
+ nodes = self.get_search_tree(tree,False).get_all_nodes()
+ for x in nodes:
+ if text == self.get_main_view().get_node(x).get_title().lower():
+ return self.get_main_view().get_node(x).get_id()
+ else:
+ raise IndexError("Task %s not in search tree" % text)
+
+>>>>>>> MERGE-SOURCE
############### Tags ##########################
###############################################
+
+ def search_is_active(self):
+ """
+ returns if there is a search active or not
+
+ used mainly for stoping certain actions before a search is done
+ """
+ return self.searchActive
+
+ def set_search_status(self, status):
+ """
+ sets the status of searches
+ """
+ self.searchActive = status
def get_tag_tree(self):
return self.ds.get_tagstore().get_viewtree(name='activetags')
-
+
def new_tag(self, tagname):
"""Create a new tag called 'tagname'.
@@ -168,7 +253,25 @@
@return: The newly-created tag.
"""
return self.ds.new_tag(tagname)
-
+
+ def new_view(self, viewname, params):
+ """
+ Similar to the above
+ Create a new view with the given name.
+ Note: this modifies the datastore.
+
+ @param viename: The name of the new view.
+ @param param: parameters of the search to save
+ @return: The newly-created view.
+ """
+ return self.ds.new_view(viewname, params)
+
+ def remove_view(self, viewname):
+ """
+ calls datastore to remove the given view
+ """
+ self.ds.remove_view(viewname)
+
def rename_tag(self, oldname, newname):
self.ds.rename_tag(oldname, newname)
@@ -186,6 +289,25 @@
l = view.get_all_nodes()
l.sort(cmp=lambda x, y: cmp(x.lower(), y.lower()))
return l
+
+ def get_all_tags(self):
+ """
+ Gets all tags from all tasks
+ """
+ tags = self.ds.get_tagstore().get_main_view().get_all_nodes()
+ return tags
+
+ def get_view_names(self):
+ """
+ returns the names of all views
+ """
+ return self.ds.get_view_control_names()
+
+ def get_view_dic(self):
+ """
+ returns the dic of all views and params
+ """
+ return self.ds.get_view_dic()
def get_all_tags(self):
tags = self.get_used_tags()
=== added file 'GTG/core/search.py'
--- GTG/core/search.py 1970-01-01 00:00:00 +0000
+++ GTG/core/search.py 2011-11-19 18:35:37 +0000
@@ -0,0 +1,450 @@
+# -*- coding: utf-8 -*-
+# -----------------------------------------------------------------------------
+# Gettings Things Gnome! - a personal organizer for the GNOME desktop
+# Copyright (c) 2008-2009 - Lionel Dricot & Bertrand Rousseau
+#
+# This program is free software: you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free Software
+# Foundation, either version 3 of the License, or (at your option) any later
+# version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program. If not, see <http://www.gnu.org/licenses/>.
+# -----------------------------------------------------------------------------
+
+import re
+
+import GTG
+from GTG.core.datastore import DataStore
+from GTG import _, info, ngettext
+from GTG.core.task import Task
+'''
+search.py - contains all search related definitions and operations
+'''
+
+class Search:
+ '''
+ This class represent a search instance in GTG.
+ '''
+
+ #usable join keyWords
+ andKeyword = _("and +")
+ #orKeyword = _("or |")
+ notKeyword = _("not -")
+
+ #usable task state keyWords
+ activeKeywords = _("active")
+ dismissedKeyword = _("dismissed")
+ doneKeyword = _("done")
+
+ #usable temporal keywords
+ beforeKeywords = _("before")
+ afterKeywords = _("after")
+ pastKeywords = _("past")
+ futureKeywords = _("future")
+ todayKeywords = _("today")
+ tomorrowKeywords = _("tomorrow")
+ nextmonthKeywords = _("nextmonth")
+ nowKeywords = _("now")
+ soonKeywords = _("soon")
+ laterKeywords = _("later")
+ nodateKeywords = _("nodate")
+ lateKeywords = _("late")
+
+ #keywords for translations
+ #translate this to add the original english and an additional language to all keywords
+ #usable join keyWords
+ andKeywordTranslation = _("")
+ #orKeywordTranslation = _("")
+ notKeywordTranslation = _("")
+
+ #usable task state keyWords
+ activeKeywordsTranslation = _("")
+ dismissedKeywordTranslation = _("")
+ doneKeywordTranslation = _("")
+
+ #usable temporal keywords
+ beforeKeywordsTranslation = _("")
+ afterKeywordsTranslation = _("")
+ pastKeywordsTranslation = _("")
+ futureKeywordsTranslation = _("")
+ todayKeywordsTranslation = _("")
+ tomorrowKeywordsTranslation = _("")
+ nextmonthKeywordsTranslation = _("")
+ nodateKeywordsTranslation = _("")
+ nowKeywordsTranslation = _("")
+ soonKeywordsTranslation = _("")
+ laterKeywordsTranslation = _("")
+ lateKeywordsTranslation = _("")
+
+ #character notations for different restrictions
+ taskNotation = '#'
+ tagNotation = '@'
+ commandNotation = '!'
+ literalNotation = '"'
+
+
+ def __init__(self, text, requester, tree):
+ '''
+ initialize the search object
+ parameter:
+ - text of the query
+ - requester
+ - task tree view
+ - tag tree view
+ '''
+ self.req = requester
+
+ self.title = ("My new search")
+ self.text = text
+ #deals with empty searches
+ if len(self.text) == 0:
+ self.empty = True
+ self.valid = True
+ else:
+ self.empty = False
+ self.valid = False
+
+ self.error = ''
+ #separate keywords in lists
+ self.dicKeyword = self._init_keywords()
+ self.tree = tree
+ self.oldFilters =[]
+ self.paramsToFilter = {}
+ #get all tags
+ self.alltags = self.req.get_all_tags()
+
+##################################private#####################################
+
+ def _my_split(self, s, delim=None):
+ """
+ string split that removes empty strings
+ useful for when there are no translations
+ """
+ return [x for x in s.split(delim) if x]
+
+ def _init_keywords(self):
+ """
+ gets all keywords, including translations and puts it in lists
+ """
+ dic = {}
+ #join Keywords including translations
+ dic["and"] = self.andKeyword.split(' ') + self._my_split(self.andKeywordTranslation, ' ')
+ dic["not"] = self.notKeyword.split(' ') + self._my_split(self.notKeywordTranslation, ' ')
+ #state keywords
+ dic["active"] = self.activeKeywords.split(' ') + self._my_split(self.activeKeywordsTranslation, ' ')
+ dic["dismissed"] = self.dismissedKeyword.split(' ') + self._my_split(self.dismissedKeywordTranslation, ' ')
+ dic["done"] = self.doneKeyword.split(' ') + self._my_split(self.doneKeywordTranslation, ' ')
+ #temporal keywords
+ dic["before"] = self.beforeKeywords.split(' ') + self._my_split(self.beforeKeywordsTranslation, ' ')
+ dic["after"] = self.afterKeywords.split(' ') + self._my_split(self.afterKeywordsTranslation, ' ')
+ dic["past"] = self.pastKeywords.split(' ') + self._my_split(self.pastKeywordsTranslation, ' ')
+ dic["future"] = self.futureKeywords.split(' ') + self._my_split(self.futureKeywordsTranslation, ' ')
+ dic["today"] = self.todayKeywords.split(' ') + self._my_split(self.todayKeywordsTranslation, ' ')
+ dic["tomorrow"] = self.tomorrowKeywords.split(' ') + self._my_split(self.tomorrowKeywordsTranslation, ' ')
+ dic["nextmonth"] = self.nextmonthKeywords.split(' ') + self._my_split(self.nextmonthKeywordsTranslation, ' ')
+ dic["nodate"] = self.nodateKeywords.split(' ') + self._my_split(self.nodateKeywordsTranslation, ' ')
+ dic["now"] = self.nowKeywords.split(' ') + self._my_split(self.nowKeywordsTranslation, ' ')
+ dic["soon"] = self.soonKeywords.split(' ') + self._my_split(self.soonKeywordsTranslation, ' ')
+ dic["later"] = self.laterKeywords.split(' ') + self._my_split(self.laterKeywordsTranslation, ' ')
+ dic["late"] = self.lateKeywords.split(' ') + self._my_split(self.lateKeywordsTranslation, ' ')
+ return dic
+
+ def build_search_tokens(self):
+ '''
+ From the text given on the builder, separate the text, check if its a valid syntax,
+ prepares the data for filters and sets flag and error message for a valid search or not
+ '''
+ value = True
+ union = False
+ sequence = -1
+ # the OR clausule is discarted for now, until i see a purpose
+ #clause = False
+ errorList=[]
+ self.error = ''
+ tempTokens = {}
+ #if its empty, is valid but returns
+ if self.empty:
+ return
+ #if the number of " is not pair, the search query is considered invalid
+ if (self.text.count('"') % 2) != 0:
+ self.error = '"'
+ self.valid = False
+ return
+ #MISSING
+ # - different date formats"
+ # - wildcard searches
+ expression = re.compile(r"""
+ (?P<command>(?<=!)\S+(?=\s)?)| # commands
+ (?P<tag>@\S+(?=\s)?) # tags
+ |(?P<task>\#.+?\#)| # tasks
+ (?P<date>[01][0-2][/\.-]?[0-3][0-9][/\.-]\d{4})| # dates - needs work
+ (?P<literal>".+?")| # literals
+ (?P<word>(?![!"#@])\S+(?=\s)?) # words
+ """, re.VERBOSE)
+ match = expression.findall(self.text)
+ #analyze the sets
+ #sets are given in a list of sub,lists
+ #each main list will have a sublist with one of 5 possible positions with text
+ for sets in match:
+ #ugly hack so i can look in future elements of the cycle
+ sequence +=1
+ for word in range(len(sets)):
+ #if the position is empty, continue
+ if sets[word] =='':
+ continue
+ #if its a command
+ if word == 0:
+ #check if there's a 'and' to retain previous expression value
+ if sets[word].lower() in self.dicKeyword.get('and'):
+ #if the last operation is false, so is the next
+ #you cannot negate !and
+ if not value:
+ self.error = sets[word]
+ self.valid = False
+ return
+ #gets the value from last entry
+ if not self.paramsToFilter.values()[(len(self.paramsToFilter.values())-1)]:
+ value = False
+ continue
+ #not
+ if sets[word].lower() in self.dicKeyword.get('not'):
+ if value:
+ value = False
+ #cannot be 2 negations in a row
+ else:
+ errorList.append(self.commandNotation)
+ errorList.append(sets[word])
+ self.error = ''.join(errorList)
+ self.valid = False
+ return
+ continue
+ #and
+ if sets[word].lower() in self.dicKeyword.get('and'):
+ continue
+ #active
+ if sets[word].lower() in self.dicKeyword.get("active"):
+ if value:
+ self.paramsToFilter["active"]= True
+ else:
+ self.paramsToFilter["active"]= False
+ value = True
+ continue
+ #dismissed
+ if sets[word].lower() in self.dicKeyword.get("dismissed"):
+ if value:
+ self.paramsToFilter["dismissed"]= True
+ else:
+ self.paramsToFilter["dismissed"]= False
+ value = True
+ continue
+ #done
+ if sets[word].lower() in self.dicKeyword.get("done"):
+ if value:
+ self.paramsToFilter["done"]= True
+ else:
+ self.paramsToFilter["done"]= False
+ value = True
+ continue
+ #now
+ if sets[word].lower() in self.dicKeyword.get("now"):
+ if value:
+ self.paramsToFilter["now"]= True
+ else:
+ self.paramsToFilter["now"]= False
+ value = True
+ continue
+ #soon
+ if sets[word].lower() in self.dicKeyword.get("soon"):
+ if value:
+ self.paramsToFilter["soon"]= True
+ else:
+ self.paramsToFilter["soon"]= False
+ value = True
+ continue
+ #later
+ if sets[word].lower() in self.dicKeyword.get("later"):
+ if value:
+ self.paramsToFilter["later"]= True
+ else:
+ self.paramsToFilter["later"]= False
+ value = True
+ continue
+ #no date defined
+ if sets[word].lower() in self.dicKeyword.get("nodate"):
+ if value:
+ self.paramsToFilter["nodate"]= True
+ else:
+ self.paramsToFilter["nodate"]= False
+ value = True
+ continue
+ #late taks ex taks that the due date already passed
+ if sets[word].lower() in self.dicKeyword.get("late"):
+ if value:
+ self.paramsToFilter["late"]= True
+ else:
+ self.paramsToFilter["late"]= False
+ value = True
+ continue
+ #taks that are due today
+ if sets[word].lower() in self.dicKeyword.get("today"):
+ if value:
+ self.paramsToFilter["today"]= True
+ else:
+ self.paramsToFilter["today"]= False
+ value = True
+ continue
+ #tasks that are due tomorrow
+ if sets[word].lower() in self.dicKeyword.get("tomorrow"):
+ if value:
+ self.paramsToFilter["tomorrow"]= True
+ else:
+ self.paramsToFilter["tomorrow"]= False
+ value = True
+ continue
+ #case the command given doens't exist, return error
+ else:
+ errorList.append(self.commandNotation)
+ errorList.append(sets[word])
+ self.error = ''.join(errorList)
+ self.valid = False
+ return
+
+ #if its a tag
+ if word == 1:
+ #verifies if the tag exists
+ #for some reason, if the @ remains the lambda function fails
+ if(sum(map(lambda x: x.lower() == sets[word].lower(), self.alltags))):
+ if 'tags' not in self.paramsToFilter:
+ self.paramsToFilter['tags'] = []
+ self.paramsToFilter['tags'].append((value, sets[word]))
+ if not value:
+ value = True
+ continue
+ else:
+ self.error = sets[word]
+ self.valid = False
+ return
+ #if its a task
+ elif word == 2:
+ #verifies if the task exists
+ taskStriped = sets[word].strip('#')
+ if(sum(map(lambda x: x.lower() == taskStriped.lower(), self.req.get_all_titles()))):
+ if 'tasks' not in self.paramsToFilter:
+ self.paramsToFilter['tasks'] = []
+ self.paramsToFilter['tasks'].append((value, taskStriped))
+ if not value:
+ value = True
+ continue
+ else:
+ self.error = sets[word]
+ self.valid = False
+ return
+ #if its a date
+ elif word == 3:
+ print("not implemented")
+ #if its a literal
+ elif word == 4:
+ literalStriped = sets[word].strip('"')
+ if 'literals' not in self.paramsToFilter:
+ self.paramsToFilter['literals'] = []
+ self.paramsToFilter['literals'].append((value, literalStriped.lower()))
+ if not value:
+ value = True
+ continue
+ #if its a word
+ elif word == 5:
+ if 'words' not in self.paramsToFilter:
+ self.paramsToFilter['words'] = []
+ self.paramsToFilter['words'].append((value, sets[word].lower()))
+ if not value:
+ value = True
+ continue
+ self.valid = True
+ if len (self.paramsToFilter) < 1:
+ self.error = 'NONE'
+ self.valid = False
+ return
+ return True
+
+ def apply_search(self):
+ """
+ apply the search to the desired tree
+
+ Return false if the search tokens are not build or are invalid
+ """
+ if not self.valid:
+ return False
+ else:
+ self.tree.reset_filters()
+ self.tree.apply_filter('search', self.paramsToFilter)
+ return True
+
+ def is_valid(self):
+ '''
+ returns true if the search tokens given are valid
+ returns false if the tokens are not yet given or are not compliant with the syntax
+ '''
+ return self.valid
+
+ def is_empty(self):
+ '''
+ return True if the search string is ''
+ '''
+ return self.empty
+
+ def return_error(self):
+ '''
+ Return the error message
+ '''
+ return self.error
+
+ def get_commands(self):
+ """
+ returns the list of commands with the ! at the beginning
+
+ except + and - at this time
+ """
+ dictlist = []
+ for item in self.dicKeyword.iteritems():
+ for key in item[1]:
+ #exceptions
+ if key in ['+', '-']:
+ continue
+ dictlist.append('!'+ key)
+ return sorted(dictlist)
+
+ def get_params(self):
+ """
+ returns the parameters from the search query
+ """
+ return self.paramsToFilter
+
+ def __str__(self):
+ '''
+ String representation of the search object
+ '''
+ s = ""
+ s = s + "Search Object\n"
+ s = s + 'valid = ' + str(self.is_valid()) + '\n'
+ s = s + self.text + "\n"
+ return s
+
+###############################################################################
+# Search Filters
+###############################################################################
+
+ """
+ The filter used for search is on treefactory.py
+
+ Its there to be inserted into filterbank when gtg starts and also to be
+ connected to the tagtree element AKA tagsidebar ^^
+
+ as such any any additional variables to the search have to go through
+ self.paramsToFilter{} as that is always passed to the filter
+ """
\ No newline at end of file
=== modified file 'GTG/core/tagstore.py'
--- GTG/core/tagstore.py 2011-11-14 18:50:22 +0000
+++ GTG/core/tagstore.py 2011-11-19 18:35:37 +0000
@@ -170,8 +170,18 @@
withfilters=['active'], include_transparent=False)
elif sp_id == "notag":
toreturn = tasktree.get_n_nodes(\
+<<<<<<< TREE
withfilters=['notag'], include_transparent=False)
elif sp_id == "sep":
+=======
+ withfilters=['notag'],include_transparent=False)
+ elif sp_id == "search" :
+ if self.req.search_is_active():
+ toreturn = (self.req.get_search_tree()).get_n_nodes(include_transparent=False)
+ else:
+ toreturn = 0
+ elif sp_id == "sep" :
+>>>>>>> MERGE-SOURCE
toreturn = 0
else:
tname = self.get_name()
=== modified file 'GTG/core/treefactory.py'
--- GTG/core/treefactory.py 2011-11-14 18:59:58 +0000
+++ GTG/core/treefactory.py 2011-11-19 18:35:37 +0000
@@ -93,20 +93,60 @@
tagtree.add_node(notag_tag)
p = {'transparent': True}
self.tasktree.add_filter(CoreConfig.NOTAG_TAG,\
+<<<<<<< TREE
self.notag, parameters=p)
+=======
+ self.notag,parameters=p)
+
+ # Build the search tag
+ search_tag = Tag(CoreConfig.SEARCH_TAG,req=req)
+ search_tag.set_attribute("special","search")
+ search_tag.set_attribute("label","<span weight='bold'>%s</span>"\
+ % _("Search"))
+ search_tag.set_attribute("icon","search")
+ search_tag.set_attribute("order",2)
+ tagtree.add_node(search_tag)
+ p = {'transparent':True}
+ self.tasktree.add_filter('search',\
+ self.search,parameters=None)
+
+>>>>>>> MERGE-SOURCE
# Build the separator
+<<<<<<< TREE
sep_tag = Tag(CoreConfig.SEP_TAG, req=req)
sep_tag.set_attribute("special", "sep")
sep_tag.set_attribute("order", 2)
+=======
+ sep_tag = Tag(CoreConfig.SEP_TAG,req=req)
+ sep_tag.set_attribute("special","sep")
+ sep_tag.set_attribute("order",3)
+>>>>>>> MERGE-SOURCE
tagtree.add_node(sep_tag)
+<<<<<<< TREE
#### Filters
tagtree.add_filter('activetag', self.actively_used_tag)
tagtree.add_filter('usedtag', self.used_tag)
activeview = tagtree.get_viewtree(name='activetags', refresh=False)
+=======
+
+
+ #### Filters
+ tagtree.add_filter('activetag',self.actively_used_tag)
+ tagtree.add_filter('usedtag',self.used_tag)
+ tagtree.add_filter('search',self.search)
+
+ activeview = tagtree.get_viewtree(name='activetags',refresh=False)
+>>>>>>> MERGE-SOURCE
activeview.apply_filter('activetag')
+<<<<<<< TREE
+=======
+
+ #searchview = tagtree.get_viewtree(name='search',refresh=True)
+ #searchview.apply_filter('search')
+>>>>>>> MERGE-SOURCE
#This view doesn't seem to be used. So it's not useful to build it now
# usedview = tagtree.get_viewtree(name='usedtags',refresh=False)
# usedview.apply_filter('usedtag')
@@ -226,3 +266,171 @@
if t.get_attribute("nonworkview") == "True":
toreturn = False
return toreturn
+
+ def search(self,task,parameters=None):
+ """
+ Single filter that has all the search parameters
+
+ parameters will have a dictionary in which keys will be a kind of filter to apply
+ the search will check for the existence of parameters, check it's negated or not
+ """
+ #escape case
+ if parameters == None:
+ return False
+ #if a task is active
+ if 'active' in parameters:
+ if parameters.get('active'):
+ if task.get_status() != Task.STA_ACTIVE:
+ return False
+ else:
+ if task.get_status() == Task.STA_ACTIVE:
+ return False
+ #if a task is Dismissed
+ if 'dismissed' in parameters:
+ if parameters.get('dismissed'):
+ if task.get_status() != Task.STA_DISMISSED:
+ return False
+ else:
+ if task.get_status() == Task.STA_DISMISSED:
+ return False
+ #if a task is Done
+ if 'done' in parameters:
+ if parameters.get('done'):
+ if task.get_status() != Task.STA_DONE:
+ return False
+ else:
+ if task.get_status() == Task.STA_DONE:
+ return False
+ #check the due date for a now
+ if 'now' in parameters:
+ #if no state is defined, it shows only active tasks
+ if 'active' not in parameters and 'done' not in parameters and 'dismissed' not in parameters:
+ if task.get_status() != Task.STA_ACTIVE:
+ return False
+ if parameters.get('now'):
+ if str(task.get_due_date()) != 'now':
+ return False
+ else:
+ if str(task.get_due_date()) == 'now':
+ return False
+ #check the due date for a soon
+ if 'soon' in parameters:
+ #if no state is defined, it shows only active tasks
+ if 'active' not in parameters and 'done' not in parameters and 'dismissed' not in parameters:
+ if task.get_status() != Task.STA_ACTIVE:
+ return False
+ if parameters.get('soon'):
+ if str(task.get_due_date()) != 'soon':
+ return False
+ else:
+ if str(task.get_due_date()) == 'soon':
+ return False
+ #check the due date for a later
+ if 'later' in parameters:
+ #if no state is defined, it shows only active tasks
+ if 'active' not in parameters and 'done' not in parameters and 'dismissed' not in parameters:
+ if task.get_status() != Task.STA_ACTIVE:
+ return False
+ if parameters.get('later'):
+ if str(task.get_due_date()) != 'later':
+ return False
+ else:
+ if str(task.get_due_date()) == 'later':
+ return False
+ #check the due date for a later
+ if 'late' in parameters:
+ #if no state is defined, it shows only active tasks
+ if 'active' not in parameters and 'done' not in parameters and 'dismissed' not in parameters:
+ if task.get_status() != Task.STA_ACTIVE:
+ return False
+ if parameters.get('late'):
+ if task.get_days_left() > -1 or task.get_days_left() == None:
+ return False
+ else:
+ if task.get_days_left() < 0 and task.get_days_left() != None:
+ return False
+ #check for tasks that have no date defined
+ if 'nodate' in parameters:
+ #if no state is defined, it shows only active tasks
+ if 'active' not in parameters and 'done' not in parameters and 'dismissed' not in parameters:
+ if task.get_status() != Task.STA_ACTIVE:
+ return False
+ if parameters.get('nodate'):
+ if str(task.get_due_date()) != '':
+ return False
+ else:
+ if str(task.get_due_date()) == '':
+ return False
+ #check for tasks that are due tomorrow
+ if 'tomorrow' in parameters:
+ #if no state is defined, it shows only active tasks
+ if 'active' not in parameters and 'done' not in parameters and 'dismissed' not in parameters:
+ if task.get_status() != Task.STA_ACTIVE:
+ return False
+ if parameters.get('tomorrow'):
+ if task.get_days_left() != 1:
+ return False
+ else:
+ if task.get_days_left() == 1:
+ return False
+ #check for tasks that are due today
+ if 'today' in parameters:
+ #if no state is defined, it shows only active tasks
+ if 'active' not in parameters and 'done' not in parameters and 'dismissed' not in parameters:
+ if task.get_status() != Task.STA_ACTIVE:
+ return False
+ if parameters.get('today'):
+ if task.get_days_left() != 0:
+ return False
+ else:
+ if task.get_days_left() == 0:
+ return False
+ #task titles
+ if 'tasks' in parameters:
+ for tasks in parameters.get('tasks'):
+ if tasks[0]:
+ if task.get_title().lower() != tasks[1]:
+ return False
+ else:
+ if task.get_title().lower() == tasks[1]:
+ return False
+ #tags
+ if 'tags' in parameters:
+ for tags in parameters.get('tags'):
+ if tags[1] not in task.get_tags_name():
+ if tags[0]:
+ return False
+ else:
+ if not tags[0]:
+ return False
+ #words
+ if 'words' in parameters:
+ #tags are also included in the search
+ #maybe latter i'll add the option to chose
+ for words in parameters.get('words'):
+ text = task.get_excerpt(strip_tags=False).lower()
+ title = task.get_title().lower()
+ #search for the word
+ if text.find(words[1]) > -1 or words[1] in title:
+ if not words[0]:
+ return False
+ else:
+ if words[0]:
+ return False
+ #literas ex. "abc"
+ if 'literals' in parameters:
+ #tthis one is the same thing as the word search
+ #only the literal includes spaces, special chars, etc
+ #should define latter one more specific stuff about literals
+ for literals in parameters.get('literals'):
+ #search for the word
+ text = task.get_excerpt(strip_tags=False).lower()
+ title = task.get_title().lower()
+ if text.find(literals[1]) > -1 or literals[1] in title:
+ if not literals[0]:
+ return False
+ else:
+ if literals[0]:
+ return False
+ #if it gets here, the task is in the search params
+ return True
\ No newline at end of file
=== modified file 'GTG/gtg.py' (properties changed: +x to -x)
=== modified file 'GTG/gtk/browser/__init__.py'
--- GTG/gtk/browser/__init__.py 2011-08-17 10:17:51 +0000
+++ GTG/gtk/browser/__init__.py 2011-11-19 18:35:37 +0000
@@ -44,6 +44,12 @@
NEW_TASK_TOOLTIP = _("Create a new task")
NEW_SUBTASK_TOOLTIP = _("Create a new subtask")
WORKVIEW_TOGGLE_TOOLTIP = _("Display only the currently actionable tasks")
+<<<<<<< TREE
TAG_IN_WORKVIEW_TOGG = _("Hide this tag from the workview")
TAG_NOTIN_WORKVIEW_TOGG = _("Show this tag in the workview")
+=======
+ SAVEASVIEW = _("Save as View...")
+ QUICKADD_ENTRY_TOOLTIP = _("you can filter, create or open your tasks here\nSearch using ! for commands, @ for tags or dates")
+ QUICKADD_ICON_TOOLTIP = _("Clear")
+>>>>>>> MERGE-SOURCE
=== modified file 'GTG/gtk/browser/browser.py'
--- GTG/gtk/browser/browser.py 2011-10-08 22:28:53 +0000
+++ GTG/gtk/browser/browser.py 2011-11-19 18:35:37 +0000
@@ -32,6 +32,7 @@
pygtk.require('2.0')
import gobject
import gtk
+import re
#our own imports
import GTG
@@ -47,7 +48,9 @@
get_canonical_date
from GTG.tools.logger import Log
from GTG.tools.tags import extract_tags_from_text
+from GTG.core.search import Search
#from GTG.tools import clipboard
+from GTG.core.tagstore import Tag
#=== MAIN CLASS ===============================================================
@@ -91,6 +94,9 @@
self.activetree = self.req.get_tasks_tree(name='active',refresh=False)
self.vtree_panes['active'] = \
self.tv_factory.active_tasks_treeview(self.activetree)
+ self.searchtree = self.req.get_search_tree(refresh=False)
+ self.vtree_panes['search'] = \
+ self.tv_factory.active_tasks_treeview(self.searchtree)
### YOU CAN DEFINE YOUR INTERNAL MECHANICS VARIABLES BELOW
@@ -131,6 +137,18 @@
# Define accelerator keys
self._init_accelerators()
+<<<<<<< TREE
+=======
+ #Autocompletion for Tags
+ self._init_tag_list()
+ self._init_tag_completion()
+ #boolean to control with view is on
+ self.mainIsSearch = False
+ self.s = Search('', self.req, self.req.get_search_tree())
+ #self.search_tree.reset_filters()
+ #sets the autocomplete for the entry
+ self.set_autoComplete()
+>>>>>>> MERGE-SOURCE
# Rember values from last time
self.last_added_tags = "NewTag"
self.last_apply_tags_to_subtasks = False
@@ -147,6 +165,9 @@
### INIT HELPER FUNCTIONS #####################################################
#
def _init_icon_theme(self):
+ """
+ sets the deafault theme for icon and its directory
+ """
icon_dirs = CoreConfig().get_icons_directories()
for i in icon_dirs:
gtk.icon_theme_get_default().prepend_search_path(i)
@@ -154,8 +175,12 @@
def _init_widget_aliases(self):
+ """
+ defines aliases for UI elements found in the glide file
+ """
self.window = self.builder.get_object("MainWindow")
self.tagpopup = self.builder.get_object("tag_context_menu")
+ self.viewpopup = self.builder.get_object("view_context_menu")
self.nonworkviewtag_cb = self.builder.get_object("nonworkviewtag_mi")
self.nonworkviewtag_cb.set_label(GnomeConfig.TAG_IN_WORKVIEW_TOGG)
self.taskpopup = self.builder.get_object("task_context_menu")
@@ -189,10 +214,55 @@
self.closed_pane = None
def _init_ui_widget(self):
+ """
+ sets the main pane with the tree with active tasks
+ """
# The Active tasks treeview
self.main_pane.add(self.vtree_panes['active'])
+
+ def _search_ui_widget(self, view=False):
+ """
+ changes the main pane to the search tree view
+ """
+ if not self.mainIsSearch:
+ self.main_pane.remove(self.vtree_panes['active'])
+ self.main_pane.add(self.vtree_panes['search'])
+ # Active tasks TreeView
+ self.vtree_panes['search'].connect('row-activated',\
+ self.on_edit_active_task)
+ self.vtree_panes['search'].connect('button-press-event',\
+ self.on_task_treeview_button_press_event)
+ self.vtree_panes['search'].connect('key-press-event',\
+ self.on_task_treeview_key_press_event)
+ self.vtree_panes['search'].connect('node-expanded',\
+ self.on_task_expanded)
+ self.vtree_panes['search'].connect('node-collapsed',\
+ self.on_task_collapsed)
+ self.mainIsSearch = True
+
+ def _active_ui_widget(self):
+ """
+ changes the main pane to the active tree view
+ """
+ if self.mainIsSearch:
+ self.main_pane.remove(self.vtree_panes['search'])
+ self.main_pane.add(self.vtree_panes['active'])
+ self.vtree_panes['active'].connect('row-activated',\
+ self.on_edit_active_task)
+ self.vtree_panes['active'].connect('button-press-event',\
+ self.on_task_treeview_button_press_event)
+ self.vtree_panes['active'].connect('key-press-event',\
+ self.on_task_treeview_key_press_event)
+ self.vtree_panes['active'].connect('node-expanded',\
+ self.on_task_expanded)
+ self.vtree_panes['active'].connect('node-collapsed',\
+ self.on_task_collapsed)
+ self.mainIsSearch = False
def init_tags_sidebar(self):
+ """
+ initializes the tagtree (left area with tags, searches and views)
+ """
# The tags treeview
self.tagtree = self.req.get_tag_tree()
self.tagtreeview = self.tv_factory.tags_treeview(self.tagtree)
@@ -206,6 +276,9 @@
self.sidebar_container.add(self.tagtreeview)
def _init_toolbar_tooltips(self):
+ """
+ sets tooltips for widgets on toolbars
+ """
self.donebutton.set_tooltip_text(GnomeConfig.MARK_DONE_TOOLTIP)
self.editbutton.set_tooltip_text(GnomeConfig.EDIT_TOOLTIP)
self.dismissbutton.set_tooltip_text(GnomeConfig.MARK_DISMISS_TOOLTIP)
@@ -213,8 +286,13 @@
self.newsubtask.set_tooltip_text(GnomeConfig.NEW_SUBTASK_TOOLTIP)
self.toggle_workview.set_tooltip_text(\
GnomeConfig.WORKVIEW_TOGGLE_TOOLTIP)
+ self.quickadd_entry.set_tooltip_text(GnomeConfig.QUICKADD_ENTRY_TOOLTIP)
+ self.quickadd_entry.set_icon_tooltip_text(1, GnomeConfig.QUICKADD_ICON_TOOLTIP)
def _init_about_dialog(self):
+ """
+ Show the about dialog
+ """
gtk.about_dialog_set_url_hook(lambda dialog, url: openurl.openurl(url))
self.about.set_website(info.URL)
self.about.set_website_label(info.URL)
@@ -224,6 +302,9 @@
self.about.set_translator_credits(info.TRANSLATORS)
def _init_signal_connections(self):
+ """
+ connects signals on UI elements
+ """
SIGNAL_CONNECTIONS_DIC = {
"on_add_task":
self.on_add_task,
@@ -300,7 +381,15 @@
"on_bg_color_toggled":
self.on_bg_color_toggled,
"on_quickadd_field_activate":
- self.on_quickadd_activate,
+ self.on_quicksearch_activate,
+ "on_quickadd_entrycompletion_action_activated":
+ self.on_entrycompletion_action_activated,
+ "on_quickadd_entrycompletion_match_selected":
+ self.on_entrycompletion_match_selected,
+ "on_quickadd_field_icon_press":
+ self.on_quicksearch_iconpress,
+ "on_quickadd_field_changed":
+ self.on_quicksearch_changed,
"on_quickadd_button_activate":
self.on_quickadd_activate,
"on_view_quickadd_toggled":
@@ -321,6 +410,13 @@
self.open_preferences,
"on_edit_backends_activate":
self.open_edit_backends,
+ #search related signals
+ "on_quickadd_key_press":
+ self.quickadd_key_press,
+ "on_quickadd_key_release":
+ self.quickadd_key_release,
+ "on_view_delete_activate":
+ self.on_viewdelete_activate,
}
self.builder.connect_signals(SIGNAL_CONNECTIONS_DIC)
@@ -360,6 +456,9 @@
widget.add_accelerator("activate", agr, key, mod, gtk.ACCEL_VISIBLE)
def _init_accelerators(self):
+ """
+ initialize gtk accelerators for different interface elements
+ """
agr = gtk.AccelGroup()
self.builder.get_object("MainWindow").add_accel_group(agr)
@@ -374,7 +473,14 @@
self._add_accelerator_for_widget(agr, "delete_mi", "Cancel")
self._add_accelerator_for_widget(agr, "tcm_addtag", "<Control>t")
self._add_accelerator_for_widget(agr, "view_closed", "<Control>F9")
-
+
+ #search_button = self.builder.get_object("quicksearch_b1")
+ #key, mod = gtk.accelerator_parse("<Control>f")
+ #search_button.add_accelerator("clicked", agr, key, mod, gtk.ACCEL_VISIBLE)
+
+ #gets key inputs do parse actions that don't directly use a gtk widget
+ #self.window.connect('key-press-event', self.on_key_pressed_on_main_window)
+
edit_button = self.builder.get_object("edit_b")
key, mod = gtk.accelerator_parse("<Control>e")
edit_button.add_accelerator("clicked", agr, key, mod, gtk.ACCEL_VISIBLE)
@@ -384,6 +490,9 @@
quickadd_field.add_accelerator("grab-focus", agr, key, mod, gtk.ACCEL_VISIBLE)
def _init_tag_completion(self):
+ """
+ Entry completation for the add tag to a task dialog
+ """
#Initialize tag completion.
tagtree = self.req.get_tag_tree()
completion_view = self.tv_factory.tags_completion_treeview(tagtree)
@@ -582,6 +691,9 @@
def tag_match_func(self, completion, key, iter, column):
+ """
+ function that defines autocompletation on the add tag dialog
+ """
model = completion.get_model()
text = model.get_value(iter, column)
if text:
@@ -659,9 +771,15 @@
self.config.set('sidebar_width',sidepos)
def on_about_clicked(self, widget):
+ """
+ show the about dialog
+ """
self.about.show()
def on_about_close(self, widget, response):
+ """
+ close the about dialog
+ """
self.about.hide()
return True
@@ -691,7 +809,7 @@
if len(tags) == 1:
ta = self.req.get_tag(tags[0])
color = ta.get_attribute("color")
- if color != None:
+ if color is not None:
colorspec = gtk.gdk.color_parse(color)
colorsel.set_previous_color(colorspec)
colorsel.set_current_color(colorspec)
@@ -707,6 +825,9 @@
color_dialog.destroy()
def on_resetcolor_activate(self, widget):
+ """
+ handler for the right click popup menu item from tag tree, when its a @tag
+ """
self.set_target_cursor()
tags = self.get_selected_tags()
for tname in tags:
@@ -714,6 +835,17 @@
t.del_attribute("color")
self.reset_cursor()
+ def on_viewdelete_activate(self, widget):
+ """
+ handler for the right click popup menu item from tag tree, when its a view
+ """
+ self.set_target_cursor()
+ #gets the view clicked
+ view = self.get_selected_tags()
+ #removes
+ if len(view) > 0:
+ self.req.remove_view(view[0])
+
def on_tagcontext_deactivate(self, menushell):
self.reset_cursor()
@@ -821,7 +953,10 @@
colt.append(str(tid))
def on_quickadd_activate(self, widget):
- text = unicode(self.quickadd_entry.get_text())
+ """
+ callback for adding a task from the mainEntry
+ """
+ text = unicode(self.getMainEntryText())
due_date = no_date
defer_date = no_date
if text:
@@ -837,8 +972,18 @@
def select_next_added_task_in_browser(treemodelsort, path, iter, self):
def selecter(treemodelsort, path, iter, self):
self.__last_quick_added_tid_event.wait()
+<<<<<<< TREE
treeview = self.vtree_panes['active']
tid = self.activetree.get_node_for_path(path)
+=======
+
+ if self.req.search_is_active():
+ treeview = self.vtree_panes['search']
+ else:
+ treeview = self.vtree_panes['active']
+ liblarch_path = treemodelsort.convert_path_to_child_path(path)
+ tid = self.activetree.get_node_for_path(liblarch_path)
+>>>>>>> MERGE-SOURCE
if self.__last_quick_added_tid == tid:
#this is the correct task
treemodelsort.disconnect(self.__quick_add_select_handle)
@@ -849,28 +994,49 @@
gobject.idle_add(selecter,treemodelsort, path, iter, self)
#event that is set when the new task is created
self.__last_quick_added_tid_event = threading.Event()
+<<<<<<< TREE
self.__quick_add_select_handle = \
self.vtree_panes['active'].get_model().connect(\
"row-inserted",
select_next_added_task_in_browser,
self)
+=======
+ if self.req.search_is_active():
+ self.__quick_add_select_handle = \
+ self.vtree_panes['search'].get_sorted_treemodel().connect(\
+ "row-inserted",
+ select_next_added_task_in_browser,
+ self)
+ else:
+ self.__quick_add_select_handle = \
+ self.vtree_panes['active'].get_sorted_treemodel().connect(\
+ "row-inserted",
+ select_next_added_task_in_browser,
+ self)
+>>>>>>> MERGE-SOURCE
task = self.req.new_task(newtask=True)
self.__last_quick_added_tid = task.get_id()
self.__last_quick_added_tid_event.set()
task.set_complex_title(text,tags=tags)
- self.quickadd_entry.set_text('')
+ self.setMainEntryText('')
+ #self.setMainEntryText(self.quickadd_entry,'')
#signal the event for the plugins to catch
gobject.idle_add(self.emit, "task-added-via-quick-add",
task.get_id())
else:
#if no text is selected, we open the currently selected task
- nids = self.vtree_panes['active'].get_selected_nodes()
+ if self.req.search_is_active():
+ nids = self.vtree_panes['search'].get_selected_nodes()
+ else:
+ nids = self.vtree_panes['active'].get_selected_nodes()
for nid in nids:
self.vmanager.open_task(nid)
-
def on_tag_treeview_button_press_event(self, treeview, event):
+ """
+ deals with mouse click event on the tag tree
+ """
Log.debug("Received button event #%d at %d,%d" %(event.button, event.x, event.y))
if event.button == 3:
x = int(event.x)
@@ -894,7 +1060,11 @@
treeview.set_cursor(path, col, 0)
#the nospecial=True disable right clicking for special tags
selected_tags = self.get_selected_tags(nospecial=True)
- if len(selected_tags) > 0:
+ selected_view = self.get_selected_view()
+ #popup menu for views
+ if selected_view is not None:
+ self.viewpopup.popup(None, None, None, event.button, time)
+ elif len(selected_tags) > 0:
# Then we are looking at single, normal tag rather than
# the special 'All tags' or 'Tasks without tags'. We only
# want to popup the menu for normal tags.
@@ -1021,6 +1191,7 @@
self.vmanager.ask_delete_tasks(tids_todelete)
def update_start_date(self, widget, new_start_date):
+<<<<<<< TREE
tasks = [self.req.get_task(uid)
for uid in self.get_selected_tasks()
if uid is not None]
@@ -1032,6 +1203,15 @@
for task in tasks:
task.set_start_date(start_date)
+=======
+ tasks_uid = filter(lambda uid: uid is not None, self.get_selected_tasks())
+ if len(tasks_uid) == 0:
+ return
+ tasks = [self.req.get_task(uid) for uid in tasks_uid]
+ tasks_status = [task.get_status() for task in tasks]
+ for uid, task, status in zip(tasks_uid, tasks, tasks_status):
+ task.set_start_date(get_canonical_date(new_start_date))
+>>>>>>> MERGE-SOURCE
#FIXME: If the task dialog is displayed, refresh its start_date widget
def on_mark_as_started(self, widget):
@@ -1158,7 +1338,7 @@
self.on_addtag_confirm()
def on_mark_as_done(self, widget):
- tasks_uid = filter(lambda uid: uid != None, self.get_selected_tasks())
+ tasks_uid = filter(lambda uid: uid is not None, self.get_selected_tasks())
if len(tasks_uid) == 0:
return
tasks = [self.req.get_task(uid) for uid in tasks_uid]
@@ -1176,7 +1356,7 @@
task.set_status(Task.STA_DONE)
def on_dismiss_task(self, widget):
- tasks_uid = filter(lambda uid: uid != None, self.get_selected_tasks())
+ tasks_uid = filter(lambda uid: uid is not None, self.get_selected_tasks())
if len(tasks_uid) == 0:
return
tasks = [self.req.get_task(uid) for uid in tasks_uid]
@@ -1188,19 +1368,54 @@
task.set_status(Task.STA_DISMISSED)
def on_select_tag(self, widget=None, row=None, col=None):
+<<<<<<< TREE
self.tv_factory.disable_update_tags()
+=======
+ """
+ callback for when selecting an element of the tagtree (left sidebar)
+
+ search and its views need to be handled diferent, as they use a diferent treeView
+ """
+>>>>>>> MERGE-SOURCE
#When you click on a tag, you want to unselect the tasks
taglist = self.get_selected_tags()
+ views = self.req.get_view_dic()
+ #check if its a view click
+ if taglist[0] in views:
+ view = True
+ else:
+ view = False
#We apply filters for every visible ViewTree
for t in self.vtree_panes:
#1st we reset the tags filter
- vtree = self.req.get_tasks_tree(name=t,refresh=False)
- vtree.reset_filters(refresh=False,transparent_only=True)
- #then applying the tag
- if len(taglist) > 0:
- #FIXME : support for multiple tags selection
- vtree.apply_filter(taglist[0],refresh=True)
+ #search is a diferent view, so it should be combined
+ if t == 'search':
+ vtree = self.req.get_search_tree(refresh=False)
+ vtree.reset_filters(refresh=False,transparent_only=False)
+ if view:
+ vtree.apply_filter(taglist[0], views[taglist[0]], refresh=True)
+ else:
+ if self.s.is_empty():
+ vtree.apply_filter('search', None, refresh=True)
+ else:
+ vtree.apply_filter('search', self.s.get_params(), refresh=True)
+ #active tree_pane
+ else:
+ vtree = self.req.get_tasks_tree(name=t,refresh=False)
+ vtree.reset_filters(refresh=False,transparent_only=True)
+ #then applying the tag
+ if len(taglist) > 0:
+ #FIXME : support for multiple tags selection
+ if taglist[0] != 'search' and not view:
+ vtree.apply_filter(taglist[0],refresh=True)
+
+ if 'search' in taglist:
+ self._search_ui_widget()
+ elif view:
+ self._search_ui_widget()
+ else:
+ self._active_ui_widget()
# When enable_update_tags we should update all tags to match
# the current state. However, applying tag filter does not influence
@@ -1337,6 +1552,11 @@
#If nospecial=True, only normal @tag are considered
def get_selected_tags(self,nospecial=False):
+ """
+ Returns the selected nodes from the tagtree
+ @args
+ nospecial - doesn't return tags that do not stat with @
+ """
taglist = []
if self.tagtreeview:
taglist = self.tagtreeview.get_selected_nodes()
@@ -1349,6 +1569,19 @@
taglist.remove(t)
return taglist
+ def get_selected_view(self):
+ """
+ return the name that was selected on the tag tree
+
+ if you select multiple, only return the first one
+ """
+ if self.tagtreeview:
+ view = self.tagtreeview.get_selected_nodes()
+ if len(view)>0:
+ if view[0] in self.req.get_view_names():
+ return view[0]
+ return None
+
def reset_cursor(self):
""" Returns the cursor to the tag that was selected prior
to any right click action. Should be used whenever we're done
@@ -1553,3 +1786,238 @@
infobar = CustomInfoBar(self.req, self, self.vmanager, backend_id)
self.vbox_toolbars.pack_start(infobar, True)
return infobar
+
+ def on_key_pressed_on_main_window(self, window, event):
+ keyval = event.keyval
+ name = gtk.gdk.keyval_name(keyval)
+ print "KEY %s was pressed" % name
+
+###############################################################################
+# SEARCH RELATED STUFF
+###############################################################################
+
+ def getMainEntryText(self):
+ """
+ get the text from the entry of the combobox
+ """
+ return self.quickadd_entry.get_text()
+
+ def setMainEntryText(self, text):
+ """
+ set the text from the entry of the combobox
+ """
+ self.quickadd_entry.set_text(text)
+
+ def on_quicksearch_changed(self, editable):
+ """
+ controls the input from the main entry
+ """
+ if not self.doSearch:
+ return
+ open = False
+ add = True
+ save = False
+ text = self.getMainEntryText()
+ #if the text is exactly a title of a task, filter for that task only
+ if self.req.task_exist(text, lowercase=True) :
+ #text = ''.join(['#',text,'#'])
+ open = True
+ #create the search
+ self.s = Search(text, self.req, self.searchtree)
+ #build the search
+ self.s.build_search_tokens()
+ if self.s.is_empty():
+ self.req.set_search_status(False)
+ self._active_ui_widget()
+ #if its a valid search
+ elif self.s.is_valid():
+
+ self.s.apply_search()
+ self._search_ui_widget()
+ self.req.set_search_status(True)
+ save = True
+ self.vtree_panes['search']
+ else:
+ self.req.set_search_status(False)
+ self._active_ui_widget()
+ #add the actions for the popup
+ self.addActionsAutocomplete(open, add, save)
+
+ def addActionsAutocomplete(self, open, add, save):
+ """
+ adds an action to autocomplete
+
+ firs delets all previous actions and then, acording to the situation adds the correct ones.
+
+ its necessary to do this because, when clicking an element of the autocomplete list, only the position is returned
+ """
+ actions = 0
+ #deletes old actions
+ for i in range(len(self.autocompleteActions)):
+ self.completion.delete_action(0)
+
+ self.autocompleteActions = []
+ #sets the actions
+ if open:
+ self.completion.insert_action_markup(actions, self.autoCompleteOpen)
+ self.autocompleteActions.append(self.autoCompleteOpen)
+ actions += 1
+ if add:
+ self.completion.insert_action_markup(actions, self.autoCompleteAdd)
+ self.autocompleteActions.append(self.autoCompleteAdd)
+ actions += 1
+ if save:
+ self.completion.insert_action_markup(actions, self.autoCompleteSave)
+ self.autocompleteActions.append(self.autoCompleteSave)
+ actions += 1
+
+ def set_autoComplete(self):
+ """
+ sets the autocomplete and the text for the actions
+ """
+ self.completion = self.builder.get_object("quickadd_entrycompletion")
+ self.quickadd_entry.set_completion(self.completion)
+ self.update_autocomplete()
+ #text in pago markup for bold actions
+ self.autoCompleteAdd = _("<b>Add Task</b>")
+ self.autoCompleteOpen = _("<b>Open Task</b>")
+ self.autoCompleteSave = _("<b>Save as View</b>")
+ self.autocompleteActions = []
+ self.doSearch = True
+
+ def update_autocomplete(self):
+ """
+ update and populate the autocomplete with tasks, tags and commands
+ """
+ self.autoCompleteliststore = gtk.ListStore(str)
+ tags = self.req.get_all_tags()
+ commands = self.s.get_commands()
+ for s in tags:
+ #removes special tags
+ if not s.startswith("@") :
+ continue
+ self.autoCompleteliststore.append([s])
+ for s in self.req.get_all_titles(lowercase=True):
+ self.autoCompleteliststore.append([s])
+ for s in commands:
+ self.autoCompleteliststore.append([s])
+ self.completion.set_model(self.autoCompleteliststore)
+ self.completion.set_text_column(0)
+
+ def quickadd_key_press(self, widget, event):
+ """
+ optimization func
+ this serves to stop search when pressing certain keys to exaustion (backspace for example)
+ """
+ #backsapce example
+ if event.keyval == 65288:
+ self.doSearch = False
+
+ def quickadd_key_release(self, widget, event):
+ """
+ optimization func
+ serves to stop search when pressing certain keys to exaustion (backspace for example)
+ """
+ #backsapce example
+ if event.keyval == 65288:
+ self.doSearch = True
+ self.on_quicksearch_changed(None)
+
+ def on_quicksearch_iconpress(self, widget, icon, event):
+ """
+ clears the text when clicking the clrear icon at the end
+
+ It has suport to one at the beginnig but isn't being used now
+ """
+ if icon == gtk.ENTRY_ICON_PRIMARY:
+ pass
+ elif icon == gtk.ENTRY_ICON_SECONDARY:
+ self.setMainEntryText('')
+
+ def on_quicksearch_activate(self, widget):
+ '''
+ deals with an "enter" on the main entry
+
+ Activation of the main entry should use the defaul action of the dropdown
+ '''
+ #if there is no text, do nothing
+ if self.getMainEntryText() == '':
+ return
+ #add
+ if self.autocompleteActions[0] is self.autoCompleteAdd:
+ self.on_quickadd_activate(widget)
+ #opens the task with that name
+ elif self.autocompleteActions[0] is self.autoCompleteOpen:
+ self.vmanager.open_task(self.req.get_task_id(self.getMainEntryText()))
+ #save as view
+ elif self.autocompleteActions[0] is self.autoCompleteSave:
+ self.createView()
+ #clear the text
+ self.setMainEntryText('')
+
+ def on_entrycompletion_action_activated(self, completion, index):
+ """
+ deals when an action is selected on entryCompletion
+ """
+ #add a task
+ if self.autocompleteActions[index] is self.autoCompleteAdd:
+ self.on_quickadd_activate(None)
+ #open a task
+ elif self.autocompleteActions[index] is self.autoCompleteOpen:
+ self.vmanager.open_task(self.req.get_task_id(self.getMainEntryText()))
+ #save a search as a view
+ elif self.autocompleteActions[index] is self.autoCompleteSave:
+ self.createView()
+ #clear the entry
+ self.setMainEntryText('')
+
+ def createView(self):
+ """
+ Create a new view as a searched save on the tag tree
+
+ saves searches are stored by the datastore
+ """
+ #give nunbers to repeated views
+ numeral = 1
+ #First call a dialog windows with a entry to input text
+ dlg = gtk.Dialog(GnomeConfig.SAVEASVIEW)
+ dlg.show()
+ entry = gtk.Entry()
+ entry.show()
+ entry.set_activates_default(True)
+ dlg.vbox.pack_start(entry)
+ dlg.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)
+ dlg.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK)
+ dlg.set_default_response(gtk.RESPONSE_OK)
+ response = dlg.run()
+ #get the response and create the view
+ if response == gtk.RESPONSE_OK:
+ text = entry.get_text()
+ #search is a reserved word for the main search filter
+ if text == '' or text == 'search':
+ text = 'view'
+ #save on the tree
+ try:
+ self.req.new_view(text, self.s.get_params())
+ except IndexError:
+ #case it has that view already, tags count has views
+ #gives another name case the view exists
+ #uses the error raised by the datastore
+ while (1):
+ try:
+ #try to create the view, also puts it to save on gtg exit
+ self.req.new_view(''.join(text + str(numeral)), self.s.get_params())
+ except IndexError:
+ numeral += 1
+ continue
+ else:
+ text = text + str(numeral)
+ break
+ dlg.destroy()
+
+ def on_entrycompletion_match_selected(self, completion, model, iter):
+ """
+ callback for when a match is selected on the entry autocomplete
+ """
+
+
\ No newline at end of file
=== modified file 'GTG/gtk/browser/taskbrowser.glade'
--- GTG/gtk/browser/taskbrowser.glade 2011-08-17 10:20:15 +0000
+++ GTG/gtk/browser/taskbrowser.glade 2011-11-19 18:35:37 +0000
@@ -1,37 +1,44 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.16"/>
- <!-- interface-naming-policy toplevel-contextual -->
<object class="GtkWindow" id="MainWindow">
+ <property name="can_focus">False</property>
<property name="title" translatable="yes">Getting Things Gnome!</property>
<property name="default_width">700</property>
<property name="default_height">550</property>
- <signal name="configure_event" handler="on_move"/>
- <signal name="size_allocate" handler="on_size_allocate"/>
+ <signal name="configure-event" handler="on_move" swapped="no"/>
+ <signal name="size-allocate" handler="on_size_allocate" swapped="no"/>
<child>
<object class="GtkVBox" id="master_vbox">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<child>
<object class="GtkMenuBar" id="browser_menu">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<child>
<object class="GtkMenuItem" id="bm_task">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">_Tasks</property>
<property name="use_underline">True</property>
<child type="submenu">
<object class="GtkMenu" id="tasks_menu">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<child>
<object class="GtkImageMenuItem" id="new_task_mi">
<property name="label" translatable="yes">New _Task</property>
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Create a new task</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="image">bm_img_task</property>
<property name="use_stock">False</property>
<property name="always_show_image">True</property>
- <signal name="activate" handler="on_add_task"/>
+ <signal name="activate" handler="on_add_task" swapped="no"/>
</object>
</child>
<child>
@@ -39,11 +46,13 @@
<property name="label" translatable="yes">New _Subtask</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="image">bm_img_subtask</property>
<property name="use_stock">False</property>
<property name="always_show_image">True</property>
- <signal name="activate" handler="on_add_subtask"/>
+ <signal name="activate" handler="on_add_subtask" swapped="no"/>
</object>
</child>
<child>
@@ -51,15 +60,18 @@
<property name="label">gtk-edit</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
<property name="accel_group">accelgroup1</property>
- <signal name="activate" handler="on_edit_active_task"/>
+ <signal name="activate" handler="on_edit_active_task" swapped="no"/>
</object>
</child>
<child>
<object class="GtkSeparatorMenuItem" id="separator_1">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
</object>
</child>
<child>
@@ -67,11 +79,13 @@
<property name="label" translatable="yes">Mark as _Done</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="image">bm_img_done</property>
<property name="use_stock">False</property>
<property name="always_show_image">True</property>
- <signal name="activate" handler="on_mark_as_done"/>
+ <signal name="activate" handler="on_mark_as_done" swapped="no"/>
</object>
</child>
<child>
@@ -79,11 +93,13 @@
<property name="label" translatable="yes">D_ismiss</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="image">bm_img_dismiss</property>
<property name="use_stock">False</property>
<property name="always_show_image">True</property>
- <signal name="activate" handler="on_dismiss_task"/>
+ <signal name="activate" handler="on_dismiss_task" swapped="no"/>
</object>
</child>
<child>
@@ -91,25 +107,30 @@
<property name="label">gtk-delete</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
<property name="accel_group">accelgroup1</property>
- <signal name="activate" handler="on_delete_task"/>
+ <signal name="activate" handler="on_delete_task" swapped="no"/>
</object>
</child>
<child>
<object class="GtkSeparatorMenuItem" id="separator_2">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="file_quit">
<property name="label">gtk-quit</property>
<property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
<property name="accel_group">accelgroup1</property>
- <signal name="activate" handler="gtk_main_quit"/>
+ <signal name="activate" handler="gtk_main_quit" swapped="no"/>
</object>
</child>
</object>
@@ -119,14 +140,19 @@
<child>
<object class="GtkMenuItem" id="bm_edit">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">_Edit</property>
<property name="use_underline">True</property>
<child type="submenu">
<object class="GtkMenu" id="edit_menu">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<child>
<object class="GtkImageMenuItem" id="edit_undo">
<property name="label">gtk-undo</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
<property name="accel_group">accelgroup1</property>
@@ -135,29 +161,37 @@
<child>
<object class="GtkImageMenuItem" id="edit_redo">
<property name="label">gtk-redo</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
<property name="accel_group">accelgroup1</property>
</object>
</child>
<child>
- <object class="GtkSeparatorMenuItem" id="separator_3"/>
+ <object class="GtkSeparatorMenuItem" id="separator_3">
+ <property name="can_focus">False</property>
+ </object>
</child>
<child>
<object class="GtkImageMenuItem" id="edit_preferences_mi">
<property name="label">gtk-preferences</property>
<property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
<property name="accel_group">accelgroup1</property>
- <signal name="activate" handler="on_preferences_activate"/>
+ <signal name="activate" handler="on_preferences_activate" swapped="no"/>
</object>
</child>
<child>
<object class="GtkMenuItem" id="backends_mi">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
<property name="label">Backends</property>
- <property name="visible">True</property>
- <signal name="activate" handler="on_edit_backends_activate"/>
+ <signal name="activate" handler="on_edit_backends_activate" swapped="no"/>
</object>
</child>
</object>
@@ -167,68 +201,85 @@
<child>
<object class="GtkMenuItem" id="menu_view">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">_View</property>
<property name="use_underline">True</property>
<child type="submenu">
<object class="GtkMenu" id="view_menu">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<child>
<object class="GtkCheckMenuItem" id="view_workview">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">_Work View</property>
<property name="use_underline">True</property>
- <signal name="toggled" handler="on_view_workview_toggled"/>
+ <signal name="toggled" handler="on_view_workview_toggled" swapped="no"/>
</object>
</child>
<child>
<object class="GtkSeparatorMenuItem" id="separator_4">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
</object>
</child>
<child>
<object class="GtkCheckMenuItem" id="bgcol_enable">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">_Background Colors</property>
<property name="use_underline">True</property>
<property name="active">True</property>
- <signal name="toggled" handler="on_bg_color_toggled"/>
+ <signal name="toggled" handler="on_bg_color_toggled" swapped="no"/>
</object>
</child>
<child>
<object class="GtkSeparatorMenuItem" id="separator_5">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
</object>
</child>
<child>
<object class="GtkCheckMenuItem" id="view_sidebar">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">_Tags Sidebar</property>
<property name="use_underline">True</property>
- <signal name="toggled" handler="on_view_sidebar_toggled"/>
+ <signal name="toggled" handler="on_view_sidebar_toggled" swapped="no"/>
</object>
</child>
<child>
<object class="GtkCheckMenuItem" id="view_closed">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">_Closed Tasks Pane</property>
<property name="use_underline">True</property>
- <signal name="toggled" handler="on_view_closed_toggled"/>
+ <signal name="toggled" handler="on_view_closed_toggled" swapped="no"/>
</object>
</child>
<child>
<object class="GtkCheckMenuItem" id="view_toolbar">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">T_oolbar</property>
<property name="use_underline">True</property>
- <signal name="toggled" handler="on_view_toolbar_toggled"/>
+ <signal name="toggled" handler="on_view_toolbar_toggled" swapped="no"/>
</object>
</child>
<child>
<object class="GtkCheckMenuItem" id="view_quickadd">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">_Quick Add Entry</property>
<property name="use_underline">True</property>
- <signal name="toggled" handler="on_view_quickadd_toggled"/>
+ <signal name="toggled" handler="on_view_quickadd_toggled" swapped="no"/>
</object>
</child>
</object>
@@ -237,11 +288,14 @@
</child>
<child>
<object class="GtkMenuItem" id="plugin_mi">
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">_Plugins</property>
<property name="use_underline">True</property>
<child type="submenu">
<object class="GtkMenu" id="plugins_menu">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
</object>
</child>
</object>
@@ -249,30 +303,37 @@
<child>
<object class="GtkMenuItem" id="help_mi">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">_Help</property>
<property name="use_underline">True</property>
<child type="submenu">
<object class="GtkMenu" id="help_menu">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<child>
<object class="GtkImageMenuItem" id="gtk_help_mi">
<property name="label">gtk-help</property>
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Open GTG documentation in your web browser</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
<property name="accel_group">accelgroup1</property>
- <signal name="activate" handler="on_documentation_clicked"/>
+ <signal name="activate" handler="on_documentation_clicked" swapped="no"/>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="gtk_about_mi">
<property name="label">gtk-about</property>
<property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
<property name="accel_group">accelgroup1</property>
- <signal name="activate" handler="on_about_clicked"/>
+ <signal name="activate" handler="on_about_clicked" swapped="no"/>
</object>
</child>
</object>
@@ -282,22 +343,27 @@
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="vbox_toolbars">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<child>
<object class="GtkToolbar" id="task_toolbar">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<child>
<object class="GtkToolButton" id="new_task_b">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
<property name="is_important">True</property>
<property name="label" translatable="yes">New Task</property>
<property name="icon_name">gtg-task-new</property>
- <signal name="clicked" handler="on_add_task"/>
+ <signal name="clicked" handler="on_add_task" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -306,9 +372,11 @@
</child>
<child>
<object class="GtkToolButton" id="new_subtask_b">
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">New Subtask</property>
<property name="icon_name">gtg-task-new</property>
- <signal name="clicked" handler="on_add_subtask"/>
+ <signal name="clicked" handler="on_add_subtask" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -318,11 +386,13 @@
<child>
<object class="GtkToolButton" id="edit_b">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
<property name="visible_horizontal">False</property>
<property name="visible_vertical">False</property>
<property name="label" translatable="yes">Edit</property>
<property name="stock_id">gtk-edit</property>
- <signal name="clicked" handler="on_edit_active_task"/>
+ <signal name="clicked" handler="on_edit_active_task" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -330,7 +400,9 @@
</packing>
</child>
<child>
- <object class="GtkSeparatorToolItem" id="<separateur>"/>
+ <object class="GtkSeparatorToolItem" id="<separateur>">
+ <property name="can_focus">False</property>
+ </object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
@@ -338,6 +410,8 @@
</child>
<child>
<object class="GtkToolButton" id="Undo">
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">Undo</property>
<property name="stock_id">gtk-undo</property>
</object>
@@ -348,6 +422,8 @@
</child>
<child>
<object class="GtkToolButton" id="Redo">
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">Redo</property>
<property name="stock_id">gtk-redo</property>
</object>
@@ -359,6 +435,7 @@
<child>
<object class="GtkSeparatorToolItem" id="separator_6">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
@@ -369,10 +446,12 @@
<object class="GtkToolButton" id="done_b">
<property name="visible">True</property>
<property name="sensitive">False</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
<property name="is_important">True</property>
<property name="label" translatable="yes">Mark as Done</property>
<property name="icon_name">gtg-task-done</property>
- <signal name="clicked" handler="on_mark_as_done"/>
+ <signal name="clicked" handler="on_mark_as_done" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -383,9 +462,11 @@
<object class="GtkToolButton" id="dismiss_b">
<property name="visible">True</property>
<property name="sensitive">False</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">Dismiss</property>
<property name="icon_name">gtg-task-dismiss</property>
- <signal name="clicked" handler="on_dismiss_task"/>
+ <signal name="clicked" handler="on_dismiss_task" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -395,9 +476,11 @@
<child>
<object class="GtkToolButton" id="delete_b">
<property name="sensitive">False</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">Delete</property>
<property name="icon_name">edit-delete</property>
- <signal name="clicked" handler="on_delete_task"/>
+ <signal name="clicked" handler="on_delete_task" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -407,6 +490,7 @@
<child>
<object class="GtkSeparatorToolItem" id="separator_7">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
@@ -416,10 +500,12 @@
<child>
<object class="GtkToggleToolButton" id="workview_toggle">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
<property name="is_important">True</property>
<property name="label" translatable="yes">Work View</property>
<property name="stock_id">gtk-index</property>
- <signal name="toggled" handler="on_workview_toggled"/>
+ <signal name="toggled" handler="on_workview_toggled" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -429,6 +515,7 @@
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
@@ -446,27 +533,34 @@
<child>
<object class="GtkVBox" id="sidebar_vbox">
<property name="width_request">75</property>
+ <property name="can_focus">False</property>
<child>
<object class="GtkHBox" id="hbox4">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<child>
<object class="GtkImage" id="sidebar_img_icon">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="xpad">5</property>
<property name="icon_name">gtg-tag</property>
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="tags_label">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Tags</property>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
@@ -475,11 +569,13 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
<property name="relief">none</property>
- <signal name="clicked" handler="on_view_sidebar_toggled"/>
+ <signal name="clicked" handler="on_view_sidebar_toggled" swapped="no"/>
<child>
<object class="GtkImage" id="sidebar_img_close">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="stock">gtk-close</property>
<property name="icon-size">1</property>
</object>
@@ -487,12 +583,14 @@
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
@@ -502,13 +600,11 @@
<property name="can_focus">True</property>
<property name="tab_pos">bottom</property>
<property name="show_tabs">False</property>
- <property name="group_id">1</property>
<child>
<object class="GtkScrolledWindow" id="sidebar-scroll">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">never</property>
- <property name="vscrollbar_policy">automatic</property>
<property name="shadow_type">in</property>
<child>
<placeholder/>
@@ -518,6 +614,7 @@
<child type="tab">
<object class="GtkLabel" id="tags_tree_label">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="label" translatable="yes">Tags</property>
</object>
<packing>
@@ -526,6 +623,8 @@
</child>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
@@ -538,9 +637,11 @@
<child>
<object class="GtkVBox" id="main_vbox">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<child>
<object class="GtkHBox" id="quickadd_pane">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<child>
<object class="GtkEntry" id="quickadd_field">
<property name="visible">True</property>
@@ -548,27 +649,21 @@
<property name="has_focus">True</property>
<property name="is_focus">True</property>
<property name="can_default">True</property>
- <signal name="activate" handler="on_quickadd_field_activate"/>
+ <property name="has_default">True</property>
+ <property name="invisible_char">●</property>
+ <property name="secondary_icon_stock">gtk-clear</property>
+ <signal name="changed" handler="on_quickadd_field_changed" swapped="no"/>
+ <signal name="key-release-event" handler="on_quickadd_key_release" swapped="no"/>
+ <signal name="activate" handler="on_quickadd_field_activate" swapped="no"/>
+ <signal name="icon-press" handler="on_quickadd_field_icon_press" swapped="no"/>
+ <signal name="key-press-event" handler="on_quickadd_key_press" swapped="no"/>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
- <child>
- <object class="GtkButton" id="quickadd_b">
- <property name="label">gtk-add</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- <signal name="clicked" handler="on_quickadd_button_activate"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
</object>
<packing>
<property name="expand">False</property>
@@ -587,13 +682,10 @@
<property name="can_focus">True</property>
<property name="tab_pos">bottom</property>
<property name="show_tabs">False</property>
- <property name="group_id">2</property>
<child>
<object class="GtkScrolledWindow" id="main_pane">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
<child>
<placeholder/>
</child>
@@ -602,6 +694,7 @@
<child type="tab">
<object class="GtkLabel" id="tasks_tab_label">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="label" translatable="yes">Tasks</property>
</object>
<packing>
@@ -619,7 +712,6 @@
<property name="can_focus">True</property>
<property name="tab_pos">bottom</property>
<property name="show_tabs">False</property>
- <property name="group_id">2</property>
<child>
<placeholder/>
</child>
@@ -631,7 +723,9 @@
</child>
</object>
<packing>
- <property name="position">1</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
@@ -642,12 +736,15 @@
</child>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
+<<<<<<< TREE
<object class="GtkMenu" id="tag_context_menu">
<property name="visible">True</property>
<property name="no_show_all">True</property>
@@ -681,14 +778,17 @@
</object>
</child>
</object>
+=======
+>>>>>>> MERGE-SOURCE
<object class="GtkAboutDialog" id="about_dialog">
+ <property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="title" translatable="yes">About GTG!</property>
<property name="resizable">False</property>
<property name="window_position">center-on-parent</property>
<property name="type_hint">dialog</property>
<property name="program_name">Getting Things Gnome!</property>
- <property name="copyright" translatable="yes">Copyrights© 2008, 2009 Lionel Dricot, Bertrand Rousseau</property>
+ <property name="copyright" translatable="yes">Copyrights© 2008, 2009 Lionel Dricot, Bertrand Rousseau</property>
<property name="comments" translatable="yes">
Getting Things Gnome! is an organizer for the GNOME desktop environment.</property>
<property name="website_label" translatable="yes">GTG website</property>
@@ -701,19 +801,22 @@
Bertrand Rousseau (bertrand.rousseau@xxxxxxxxx)</property>
<property name="logo_icon_name">gtg</property>
<property name="wrap_license">True</property>
- <signal name="response" handler="on_about_close"/>
- <signal name="delete_event" handler="on_about_delete"/>
+ <signal name="delete-event" handler="on_about_delete" swapped="no"/>
+ <signal name="response" handler="on_about_close" swapped="no"/>
<child internal-child="vbox">
- <object class="GtkVBox" id="about_dialog_vbox">
+ <object class="GtkBox" id="about_dialog_vbox">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="spacing">2</property>
<child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area2">
+ <object class="GtkButtonBox" id="dialog-action_area2">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="layout_style">end</property>
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
@@ -721,6 +824,7 @@
</object>
</child>
</object>
+<<<<<<< TREE
<object class="GtkMenu" id="task_context_menu">
<property name="visible">True</property>
<child>
@@ -977,33 +1081,74 @@
<property name="pixel_size">16</property>
<property name="icon_name">gtg-task-undismiss</property>
</object>
+=======
+>>>>>>> MERGE-SOURCE
<object class="GtkAccelGroup" id="accelgroup1"/>
- <object class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="stock">gtk-save-as</property>
- </object>
- <object class="GtkImage" id="image2">
- <property name="visible">True</property>
- <property name="xalign">0.44999998807907104</property>
- <property name="yalign">0.47999998927116394</property>
- <property name="stock">gtk-revert-to-saved</property>
- </object>
<object class="GtkDialog" id="addtag_dialog">
+ <property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="title" translatable="yes">Add a Tag...</property>
<property name="window_position">center-on-parent</property>
<property name="type_hint">dialog</property>
- <property name="has_separator">False</property>
<child internal-child="vbox">
- <object class="GtkVBox" id="addtag_dialog_vbox">
+ <object class="GtkBox" id="addtag_dialog_vbox">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="spacing">2</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="addtag_ok">
+ <property name="label" translatable="yes">Add Tag</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <signal name="activate" handler="on_addtag_confirm" swapped="no"/>
+ <signal name="clicked" handler="on_addtag_confirm" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="addtag_cancel">
+ <property name="label" translatable="yes">Cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
<child>
<object class="GtkLabel" id="addtag_label">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="label" translatable="yes">Enter the name of the tag(s) you wish to add:</property>
</object>
<packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
@@ -1012,18 +1157,21 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="is_focus">True</property>
- <property name="invisible_char">●</property>
+ <property name="invisible_char">●</property>
<property name="activates_default">True</property>
<property name="text" translatable="yes">TagName</property>
<property name="shadow_type">none</property>
</object>
<packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="hint_label">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="label" translatable="yes">Hint: you can add several tags by separating them with
commas.</property>
<attributes>
@@ -1031,6 +1179,8 @@
</attributes>
</object>
<packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
@@ -1040,53 +1190,15 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
- <child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area3">
- <property name="visible">True</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="addtag_ok">
- <property name="label" translatable="yes">Add Tag</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="receives_default">False</property>
- <signal name="clicked" handler="on_addtag_confirm"/>
- <signal name="activate" handler="on_addtag_confirm"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="addtag_cancel">
- <property name="label" translatable="yes">Cancel</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
</object>
</child>
<action-widgets>
@@ -1094,15 +1206,120 @@
<action-widget response="0">addtag_cancel</action-widget>
</action-widgets>
</object>
+ <object class="GtkImage" id="bm_img_dismiss">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixel_size">16</property>
+ <property name="icon_name">gtg-task-dismiss</property>
+ </object>
+ <object class="GtkImage" id="bm_img_done">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixel_size">16</property>
+ <property name="icon_name">gtg-task-done</property>
+ </object>
+ <object class="GtkImage" id="bm_img_subtask">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixel_size">16</property>
+ <property name="icon_name">gtg-task-new</property>
+ </object>
+ <object class="GtkImage" id="bm_img_task">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixel_size">16</property>
+ <property name="icon_name">gtg-task-new</property>
+ </object>
+ <object class="GtkMenu" id="closed_task_context_menu">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkImageMenuItem" id="ctcm_edit">
+ <property name="label">gtk-edit</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ <property name="accel_group">accelgroup1</property>
+ <signal name="activate" handler="on_edit_done_task" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem" id="separator_10">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="ctcm_mark_as_not_done">
+ <property name="label" translatable="yes">Mark as Not Done</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="image">ctcm_img_mark_not_done</property>
+ <property name="use_stock">False</property>
+ <property name="always_show_image">True</property>
+ <signal name="activate" handler="on_mark_as_done" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="ctcm_undismiss">
+ <property name="label" translatable="yes">Und_ismiss</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="image">tcm_img_undismiss</property>
+ <property name="use_stock">False</property>
+ <property name="always_show_image">True</property>
+ <signal name="activate" handler="on_dismiss_task" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="ctcm_delete">
+ <property name="label">gtk-delete</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ <property name="accel_group">accelgroup1</property>
+ <signal name="activate" handler="on_delete_task" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ <object class="GtkImage" id="ctcm_img_mark_not_done">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixel_size">16</property>
+ <property name="icon_name">gtg-task-undone</property>
+ </object>
+ <object class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-save-as</property>
+ </object>
+ <object class="GtkImage" id="image2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0.44999998807907104</property>
+ <property name="yalign">0.47999998927116394</property>
+ <property name="stock">gtk-revert-to-saved</property>
+ </object>
<object class="GtkImage" id="image3">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="pixel_size">16</property>
<property name="icon_name">gtg-tag</property>
</object>
<object class="GtkImage" id="image4">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="stock">gtk-home</property>
</object>
+<<<<<<< TREE
<object class="GtkMenu" id="due_context_menu">
<property name="visible">True</property>
<child>
@@ -1197,4 +1414,260 @@
</object>
</child>
</object>
+=======
+ <object class="GtkImage" id="image5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-delete</property>
+ </object>
+ <object class="GtkListStore" id="liststore1"/>
+ <object class="GtkEntryCompletion" id="quickadd_entrycompletion">
+ <property name="popup_set_width">False</property>
+ <signal name="action-activated" handler="on_quickadd_entrycompletion_action_activated" swapped="no"/>
+ <signal name="match-selected" handler="on_quickadd_entrycompletion_match_selected" swapped="no"/>
+ </object>
+ <object class="GtkMenu" id="schedule_for_context_menu">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkImageMenuItem" id="tcm_mark_as_started">
+ <property name="label" translatable="yes">t_oday</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">False</property>
+ <signal name="activate" handler="on_mark_as_started" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="tcm_schedule_for_tomorrow">
+ <property name="label" translatable="yes">_tomorrow</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">False</property>
+ <signal name="activate" handler="on_schedule_for_tomorrow" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="tcm_schedule_for_next_week">
+ <property name="label" translatable="yes">next _week</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">False</property>
+ <signal name="activate" handler="on_schedule_for_next_week" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="tcm_schedule_for_next_month">
+ <property name="label" translatable="yes">next _month</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">False</property>
+ <signal name="activate" handler="on_schedule_for_next_month" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="tcm_schedule_for_next_year">
+ <property name="label" translatable="yes">next _year</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">False</property>
+ <signal name="activate" handler="on_schedule_for_next_year" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ <object class="GtkMenu" id="tag_context_menu">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <signal name="deactivate" handler="on_tagcontext_deactivate" swapped="no"/>
+ <child>
+ <object class="GtkImageMenuItem" id="colorchooser_mi">
+ <property name="label">gtk-select-color</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ <property name="accel_group">accelgroup1</property>
+ <signal name="activate" handler="on_colorchooser_activate" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="resetcolor_mi">
+ <property name="label" translatable="yes">Reset Color</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="image">image2</property>
+ <property name="use_stock">False</property>
+ <property name="accel_group">accelgroup1</property>
+ <signal name="activate" handler="on_resetcolor_activate" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkCheckMenuItem" id="nonworkviewtag_mi">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="label" translatable="yes">Tag is displayed in the workview</property>
+ <property name="use_underline">True</property>
+ <property name="active">True</property>
+ <signal name="toggled" handler="on_nonworkviewtag_toggled" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ <object class="GtkMenu" id="task_context_menu">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkImageMenuItem" id="tcm_add_subtask">
+ <property name="label" translatable="yes">Add a subtask</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="image">tcm_img_add_subtask</property>
+ <property name="use_stock">False</property>
+ <property name="always_show_image">True</property>
+ <signal name="activate" handler="on_add_subtask" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="tcm_edit">
+ <property name="label">gtk-edit</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ <property name="accel_group">accelgroup1</property>
+ <signal name="activate" handler="on_edit_active_task" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem" id="separator_8">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="tcm_schedule_menu">
+ <property name="label" translatable="yes">_Schedule for...</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">False</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="tcm_mark_as_done">
+ <property name="label" translatable="yes">Mark as _Done</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="image">tcm_img_mark_done</property>
+ <property name="use_stock">False</property>
+ <property name="always_show_image">True</property>
+ <signal name="activate" handler="on_mark_as_done" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="tcm_dismiss">
+ <property name="label" translatable="yes">D_ismiss</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="image">tcm_img_dismiss</property>
+ <property name="use_stock">False</property>
+ <property name="always_show_image">True</property>
+ <signal name="activate" handler="on_dismiss_task" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="tcm_delete">
+ <property name="label">gtk-delete</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ <property name="accel_group">accelgroup1</property>
+ <signal name="activate" handler="on_delete_task" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem" id="separator_9">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="tcm_addtag">
+ <property name="label" translatable="yes">Add Tag...</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="image">image3</property>
+ <property name="use_stock">False</property>
+ <signal name="activate" handler="on_add_new_tag" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ <object class="GtkImage" id="tcm_img_add_subtask">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixel_size">16</property>
+ <property name="icon_name">gtg-task-new</property>
+ </object>
+ <object class="GtkImage" id="tcm_img_dismiss">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixel_size">16</property>
+ <property name="icon_name">gtg-task-dismiss</property>
+ </object>
+ <object class="GtkImage" id="tcm_img_mark_done">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="yalign">0.49000000953674316</property>
+ <property name="pixel_size">16</property>
+ <property name="icon_name">gtg-task-done</property>
+ </object>
+ <object class="GtkImage" id="tcm_img_undismiss">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixel_size">16</property>
+ <property name="icon_name">gtg-task-undismiss</property>
+ </object>
+ <object class="GtkMenu" id="view_context_menu">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkImageMenuItem" id="view_delete">
+ <property name="label">Delete</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="image">image5</property>
+ <property name="use_stock">False</property>
+ <property name="accel_group">accelgroup1</property>
+ <property name="always_show_image">True</property>
+ <signal name="activate" handler="on_view_delete_activate" swapped="no"/>
+ </object>
+ </child>
+ </object>
+>>>>>>> MERGE-SOURCE
</interface>
=== added file 'GTG/gtk/preferences.glade'
--- GTG/gtk/preferences.glade 1970-01-01 00:00:00 +0000
+++ GTG/gtk/preferences.glade 2011-11-19 18:35:37 +0000
@@ -0,0 +1,508 @@
+<?xml version="1.0"?>
+<interface>
+ <requires lib="gtk+" version="2.16"/>
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkAction" id="action1"/>
+ <object class="GtkAboutDialog" id="PluginAboutDialog">
+ <property name="border_width">5</property>
+ <property name="window_position">mouse</property>
+ <property name="type_hint">dialog</property>
+ <signal name="close" handler="on_PluginAboutDialog_close"/>
+ <signal name="response" handler="on_PluginAboutDialog_close"/>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="pa-vbox1">
+ <property name="visible">True</property>
+ <property name="spacing">2</property>
+ <child>
+ <object class="GtkFrame" id="pa-frame1">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="pa-alignment1">
+ <property name="visible">True</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkLabel" id="PluginDepends">
+ <property name="visible">True</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="pa-label1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>Dependencies</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="pa-action_area1">
+ <property name="visible">True</property>
+ <property name="layout_style">end</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <object class="GtkDialog" id="PluginConfigDialog">
+ <property name="border_width">5</property>
+ <property name="window_position">mouse</property>
+ <property name="type_hint">dialog</property>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="pc-vbox1">
+ <property name="visible">True</property>
+ <property name="spacing">2</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="pc-action_area1">
+ <property name="visible">True</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="PluginConfigClose">
+ <property name="label">gtk-close</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ <signal name="released" handler="on_PluginConfigClose_released"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">PluginConfigClose</action-widget>
+ </action-widgets>
+ </object>
+ <object class="GtkDialog" id="PreferencesDialog">
+ <property name="border_width">5</property>
+ <property name="title" translatable="yes">Getting Things GNOME! Preferences</property>
+ <property name="window_position">center-on-parent</property>
+ <property name="default_width">500</property>
+ <property name="default_height">500</property>
+ <property name="type_hint">dialog</property>
+ <signal name="delete_event" handler="on_PreferencesDialog_delete_event"/>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="prefs-vbox1">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkAlignment" id="prefs-alignment1">
+ <property name="visible">True</property>
+ <property name="top_padding">6</property>
+ <property name="bottom_padding">6</property>
+ <property name="left_padding">6</property>
+ <property name="right_padding">6</property>
+ <child>
+ <object class="GtkNotebook" id="prefs-notebook1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <child>
+ <object class="GtkAlignment" id="prefs-alignment2">
+ <property name="visible">True</property>
+ <property name="top_padding">10</property>
+ <property name="bottom_padding">10</property>
+ <property name="left_padding">10</property>
+ <property name="right_padding">10</property>
+ <child>
+ <object class="GtkVBox" id="prefs-vbox2">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkFrame" id="prefs-frame3">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="prefs-alignment7">
+ <property name="visible">True</property>
+ <property name="bottom_padding">15</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkVBox" id="prefs-vbox7">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkCheckButton" id="pref_autostart">
+ <property name="label" translatable="yes">Start Getting Things GNOME! on every login</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="on_pref_autostart_toggled"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">3</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="prefs-label8">
+ <property name="visible">True</property>
+ <property name="ypad">5</property>
+ <property name="label" translatable="yes"><b>General</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="prefs-frame1">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="prefs-alignment5">
+ <property name="visible">True</property>
+ <property name="bottom_padding">15</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkVBox" id="prefs-vbox3">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkCheckButton" id="pref_show_preview">
+ <property name="label" translatable="yes">Show description preview in the task list.</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="on_pref_show_preview_toggled"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">3</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="prefs-hbox1">
+ <property name="no_show_all">True</property>
+ <child>
+ <object class="GtkCheckButton" id="pref_hide_closed">
+ <property name="label" translatable="yes">Hide closed tasks older than </property>
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="pref_hide_closed_age">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">3</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="prefs-label4">
+ <property name="visible">True</property>
+ <property name="ypad">5</property>
+ <property name="label" translatable="yes"><b>Task Browser</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="prefs-frame2">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="prefs-alignment6">
+ <property name="visible">True</property>
+ <property name="bottom_padding">15</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkVBox" id="prefs-vbox4">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkCheckButton" id="pref_check_spelling">
+ <property name="label" translatable="yes">Check spelling</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="no_show_all">True</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="on_pref_check_spelling_toggled"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">3</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="prefs-label5">
+ <property name="no_show_all">True</property>
+ <property name="ypad">5</property>
+ <property name="label" translatable="yes"><b>Task Editor</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="prefs-label1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Behaviour</property>
+ </object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="prefs-alignment4">
+ <property name="visible">True</property>
+ <property name="top_padding">10</property>
+ <property name="bottom_padding">10</property>
+ <property name="left_padding">10</property>
+ <property name="right_padding">10</property>
+ <child>
+ <object class="GtkVBox" id="prefs-vbox6">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="prefs-label7">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Active _Plugins:</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow" id="prefs-scrolledwindow2">
+ <property name="width_request">240</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkTreeView" id="PluginTree">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">False</property>
+ <property name="rules_hint">True</property>
+ <property name="show_expanders">False</property>
+ <signal name="cursor_changed" handler="on_PluginTree_cursor_changed"/>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHButtonBox" id="prefs-hbuttonbox1">
+ <property name="visible">True</property>
+ <property name="spacing">8</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="plugin_about">
+ <property name="label" translatable="yes">_About Plugin</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="image">pref_img_plugin_about</property>
+ <property name="use_underline">True</property>
+ <signal name="released" handler="on_plugin_about"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="plugin_configure">
+ <property name="label">C_onfigure Plugin</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="image">pref_img_plugin_conf</property>
+ <property name="use_underline">True</property>
+ <signal name="released" handler="on_plugin_configure"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="prefs-label3">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Plugins</property>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="prefs-action_area">
+ <property name="visible">True</property>
+ <property name="layout_style">edge</property>
+ <child>
+ <object class="GtkButton" id="prefs_help">
+ <property name="label">gtk-help</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ <signal name="activate" handler="on_prefs_help"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="prefs_close">
+ <property name="label">gtk-close</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ <signal name="released" handler="on_prefs_close"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">prefs_help</action-widget>
+ <action-widget response="0">prefs_close</action-widget>
+ </action-widgets>
+ </object>
+ <object class="GtkAccelGroup" id="accelgroup1"/>
+ <object class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="stock">gtk-save-as</property>
+ </object>
+ <object class="GtkImage" id="image2">
+ <property name="visible">True</property>
+ <property name="stock">gtk-missing-image</property>
+ </object>
+ <object class="GtkImage" id="pref_img_plugin">
+ <property name="visible">True</property>
+ <property name="icon_name">gtg-plugin</property>
+ </object>
+ <object class="GtkImage" id="pref_img_plugin_about">
+ <property name="visible">True</property>
+ <property name="stock">gtk-about</property>
+ </object>
+ <object class="GtkImage" id="pref_img_plugin_conf">
+ <property name="visible">True</property>
+ <property name="stock">gtk-preferences</property>
+ </object>
+</interface>
=== removed file 'GTG/gtk/preferences.glade'
--- GTG/gtk/preferences.glade 2010-07-29 10:36:24 +0000
+++ GTG/gtk/preferences.glade 1970-01-01 00:00:00 +0000
@@ -1,504 +0,0 @@
-<?xml version="1.0"?>
-<interface>
- <requires lib="gtk+" version="2.16"/>
- <!-- interface-naming-policy toplevel-contextual -->
- <object class="GtkAccelGroup" id="accelgroup1"/>
- <object class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="stock">gtk-save-as</property>
- </object>
- <object class="GtkDialog" id="PreferencesDialog">
- <property name="border_width">5</property>
- <property name="title" translatable="yes">Getting Things GNOME! Preferences</property>
- <property name="window_position">center-on-parent</property>
- <property name="default_width">500</property>
- <property name="default_height">500</property>
- <property name="type_hint">dialog</property>
- <signal name="delete_event" handler="on_PreferencesDialog_delete_event"/>
- <child internal-child="vbox">
- <object class="GtkVBox" id="prefs-vbox1">
- <property name="visible">True</property>
- <child>
- <object class="GtkAlignment" id="prefs-alignment1">
- <property name="visible">True</property>
- <property name="top_padding">6</property>
- <property name="bottom_padding">6</property>
- <property name="left_padding">6</property>
- <property name="right_padding">6</property>
- <child>
- <object class="GtkNotebook" id="prefs-notebook1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <child>
- <object class="GtkAlignment" id="prefs-alignment2">
- <property name="visible">True</property>
- <property name="top_padding">10</property>
- <property name="bottom_padding">10</property>
- <property name="left_padding">10</property>
- <property name="right_padding">10</property>
- <child>
- <object class="GtkVBox" id="prefs-vbox2">
- <property name="visible">True</property>
- <child>
- <object class="GtkFrame" id="prefs-frame3">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="prefs-alignment7">
- <property name="visible">True</property>
- <property name="bottom_padding">15</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkVBox" id="prefs-vbox7">
- <property name="visible">True</property>
- <child>
- <object class="GtkCheckButton" id="pref_autostart">
- <property name="label" translatable="yes">Start Getting Things GNOME! on every login</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="on_pref_autostart_toggled"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="padding">3</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="prefs-label8">
- <property name="visible">True</property>
- <property name="ypad">5</property>
- <property name="label" translatable="yes"><b>General</b></property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkFrame" id="prefs-frame1">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="prefs-alignment5">
- <property name="visible">True</property>
- <property name="bottom_padding">15</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkVBox" id="prefs-vbox3">
- <property name="visible">True</property>
- <child>
- <object class="GtkCheckButton" id="pref_show_preview">
- <property name="label" translatable="yes">Show description preview in the task list.</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="on_pref_show_preview_toggled"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="padding">3</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="prefs-hbox1">
- <property name="no_show_all">True</property>
- <child>
- <object class="GtkCheckButton" id="pref_hide_closed">
- <property name="label" translatable="yes">Hide closed tasks older than </property>
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="pref_hide_closed_age">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="padding">3</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="prefs-label4">
- <property name="visible">True</property>
- <property name="ypad">5</property>
- <property name="label" translatable="yes"><b>Task Browser</b></property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkFrame" id="prefs-frame2">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="prefs-alignment6">
- <property name="visible">True</property>
- <property name="bottom_padding">15</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkVBox" id="prefs-vbox4">
- <property name="visible">True</property>
- <child>
- <object class="GtkCheckButton" id="pref_check_spelling">
- <property name="label" translatable="yes">Check spelling</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="no_show_all">True</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="on_pref_check_spelling_toggled"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="padding">3</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="prefs-label5">
- <property name="no_show_all">True</property>
- <property name="ypad">5</property>
- <property name="label" translatable="yes"><b>Task Editor</b></property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="prefs-label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Behaviour</property>
- </object>
- <packing>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- <child type="tab">
- <placeholder/>
- </child>
- <child>
- <object class="GtkAlignment" id="prefs-alignment4">
- <property name="visible">True</property>
- <property name="top_padding">10</property>
- <property name="bottom_padding">10</property>
- <property name="left_padding">10</property>
- <property name="right_padding">10</property>
- <child>
- <object class="GtkVBox" id="prefs-vbox6">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="prefs-label7">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Active _Plugins:</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkScrolledWindow" id="prefs-scrolledwindow2">
- <property name="width_request">240</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkTreeView" id="PluginTree">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">False</property>
- <property name="rules_hint">True</property>
- <property name="show_expanders">False</property>
- <signal name="cursor_changed" handler="on_PluginTree_cursor_changed"/>
- </object>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkHButtonBox" id="prefs-hbuttonbox1">
- <property name="visible">True</property>
- <property name="spacing">8</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="plugin_about">
- <property name="label" translatable="yes">_About Plugin</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="image">pref_img_plugin_about</property>
- <property name="use_underline">True</property>
- <signal name="released" handler="on_plugin_about"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="plugin_configure">
- <property name="label">C_onfigure Plugin</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="image">pref_img_plugin_conf</property>
- <property name="use_underline">True</property>
- <signal name="released" handler="on_plugin_configure"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="prefs-label3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Plugins</property>
- </object>
- <packing>
- <property name="position">2</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child internal-child="action_area">
- <object class="GtkHButtonBox" id="prefs-action_area">
- <property name="visible">True</property>
- <property name="layout_style">edge</property>
- <child>
- <object class="GtkButton" id="prefs_help">
- <property name="label">gtk-help</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- <signal name="activate" handler="on_prefs_help"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="prefs_close">
- <property name="label">gtk-close</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- <signal name="released" handler="on_prefs_close"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- </child>
- <action-widgets>
- <action-widget response="0">prefs_help</action-widget>
- <action-widget response="0">prefs_close</action-widget>
- </action-widgets>
- </object>
- <object class="GtkImage" id="pref_img_plugin_conf">
- <property name="visible">True</property>
- <property name="stock">gtk-preferences</property>
- </object>
- <object class="GtkImage" id="pref_img_plugin_about">
- <property name="visible">True</property>
- <property name="stock">gtk-about</property>
- </object>
- <object class="GtkAboutDialog" id="PluginAboutDialog">
- <property name="border_width">5</property>
- <property name="window_position">mouse</property>
- <property name="type_hint">dialog</property>
- <signal name="close" handler="on_PluginAboutDialog_close"/>
- <signal name="response" handler="on_PluginAboutDialog_close"/>
- <child internal-child="vbox">
- <object class="GtkVBox" id="pa-vbox1">
- <property name="visible">True</property>
- <property name="spacing">2</property>
- <child>
- <object class="GtkFrame" id="pa-frame1">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="pa-alignment1">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkLabel" id="PluginDepends">
- <property name="visible">True</property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="pa-label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes"><b>Dependencies</b></property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="position">3</property>
- </packing>
- </child>
- <child internal-child="action_area">
- <object class="GtkHButtonBox" id="pa-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">end</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- <object class="GtkImage" id="pref_img_plugin">
- <property name="visible">True</property>
- <property name="icon_name">gtg-plugin</property>
- </object>
- <object class="GtkDialog" id="PluginConfigDialog">
- <property name="border_width">5</property>
- <property name="window_position">mouse</property>
- <property name="type_hint">dialog</property>
- <property name="has_separator">False</property>
- <child internal-child="vbox">
- <object class="GtkVBox" id="pc-vbox1">
- <property name="visible">True</property>
- <property name="spacing">2</property>
- <child>
- <placeholder/>
- </child>
- <child internal-child="action_area">
- <object class="GtkHButtonBox" id="pc-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="PluginConfigClose">
- <property name="label">gtk-close</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- <signal name="released" handler="on_PluginConfigClose_released"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- </child>
- <action-widgets>
- <action-widget response="0">PluginConfigClose</action-widget>
- </action-widgets>
- </object>
-</interface>
=== modified file 'GTG/gtk/preferences.py'
--- GTG/gtk/preferences.py 2011-11-19 17:48:38 +0000
+++ GTG/gtk/preferences.py 2011-11-19 18:35:37 +0000
@@ -151,6 +151,7 @@
'plugin_config_dialog': 'PluginConfigDialog',
'pref_autostart': 'pref_autostart',
'pref_show_preview': 'pref_show_preview'
+
}
for attr, widget in widgets.iteritems():
setattr(self, attr, self.builder.get_object(widget))
=== modified file 'GTG/plugins/bugzilla/bugzilla.py' (properties changed: +x to -x)
=== modified file 'GTG/plugins/export/export.py' (properties changed: +x to -x)
=== modified file 'GTG/plugins/export/export_templates/script_pocketmod' (properties changed: +x to -x)
=== modified file 'GTG/plugins/hamster/hamster.py' (properties changed: +x to -x)
=== modified file 'GTG/plugins/import_json/import_json.py' (properties changed: +x to -x)
=== modified file 'GTG/plugins/send_email/sendEmail.py' (properties changed: +x to -x)
=== modified file 'GTG/plugins/task_reaper/reaper.py' (properties changed: +x to -x)
=== modified file 'GTG/plugins/tomboy/tomboy.py' (properties changed: +x to -x)
=== modified file 'GTG/tools/liblarch/filters_bank.py'
--- GTG/tools/liblarch/filters_bank.py 2011-07-27 10:54:24 +0000
+++ GTG/tools/liblarch/filters_bank.py 2011-11-19 18:35:37 +0000
@@ -131,4 +131,4 @@
else:
return False
else:
- return False
+ return False
\ No newline at end of file
=== added file 'data/icons/hicolor/16x16/categories/search.png'
Binary files data/icons/hicolor/16x16/categories/search.png 1970-01-01 00:00:00 +0000 and data/icons/hicolor/16x16/categories/search.png 2011-11-19 18:35:37 +0000 differ
=== modified file 'gtcli' (properties changed: +x to -x)
=== removed file 'gtg'
--- gtg 2010-09-08 09:50:32 +0000
+++ gtg 1970-01-01 00:00:00 +0000
@@ -1,72 +0,0 @@
-#!/usr/bin/env python
-# -*- coding:utf-8 -*-
-
-# -----------------------------------------------------------------------------
-# Getting Things Gnome! - A personal organizer for the GNOME desktop
-# Copyright (c) 2008,2009,2010 Lionel Dricot & Bertrand Rousseau
-#
-# This program is free software: you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation, either version 3 of the License, or (at your option) any later
-# version.
-#
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
-# details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program. If not, see <http://www.gnu.org/licenses/>.
-# -----------------------------------------------------------------------------
-
-"""
-Getting Things Gnome! - A personal organizer for the GNOME desktop
-==================================================================
-
-:copyright: 2008,2009,2010 Lionel Dricot & Bertrand Rousseau
-:license: GNU General Public License, version 3 or later
-"""
-
-import sys
-from optparse import OptionParser
-
-
-def X_is_running():
- from gtk.gdk import Screen
- try:
- if Screen().get_display():
- return True
- except RuntimeError:
- pass
- return False
-
-
-try:
- parser = OptionParser()
- parser.add_option('-b', '--boot-test', action='store_true', dest='boot_test',
- help="Exit immediately after completing boot-up actions", default=False)
- parser.add_option('-c', '--no-crash-handler', action='store_true', dest='no_crash_handler',
- help="Disable the automatic crash handler", default=False)
- parser.add_option('-d', '--debug', action='store_true', dest='debug',
- help="Enable debug output", default=False)
- parser.add_option('-v', '--version', action='store_true', dest='version_and_exit',
- help="Print GTG's version number", default=False)
- (options, args) = parser.parse_args()
-
- if options.version_and_exit:
- from GTG import info
- print "gtg (Getting Things Gnome!) %s" %(info.VERSION)
- print
- print "For more information: %s" %(info.URL)
- sys.exit(0)
-
- elif not X_is_running():
- print "Could not open X display"
- sys.exit(1)
-
- else:
- import GTG.gtg
- sys.exit(GTG.gtg.main(options, args))
-
-except KeyboardInterrupt:
- sys.exit(1)
=== added file 'gtg.py'
--- gtg.py 1970-01-01 00:00:00 +0000
+++ gtg.py 2011-11-19 18:35:37 +0000
@@ -0,0 +1,43 @@
+import sys
+from optparse import OptionParser
+
+
+def X_is_running():
+ from gtk.gdk import Screen
+ try:
+ if Screen().get_display():
+ return True
+ except RuntimeError:
+ pass
+ return False
+
+
+try:
+ parser = OptionParser()
+ parser.add_option('-b', '--boot-test', action='store_true', dest='boot_test',
+ help="Exit immediately after completing boot-up actions", default=False)
+ parser.add_option('-c', '--no-crash-handler', action='store_true', dest='no_crash_handler',
+ help="Disable the automatic crash handler", default=False)
+ parser.add_option('-d', '--debug', action='store_true', dest='debug',
+ help="Enable debug output", default=False)
+ parser.add_option('-v', '--version', action='store_true', dest='version_and_exit',
+ help="Print GTG's version number", default=False)
+ (options, args) = parser.parse_args()
+
+ if options.version_and_exit:
+ from GTG import info
+ print "gtg (Getting Things Gnome!) %s" %(info.VERSION)
+ print
+ print "For more information: %s" %(info.URL)
+ sys.exit(0)
+
+ elif not X_is_running():
+ print "Could not open X display"
+ sys.exit(1)
+
+ else:
+ import GTG.gtg
+ sys.exit(GTG.gtg.main(options, args))
+
+except KeyboardInterrupt:
+ sys.exit(1)
=== modified file 'gtg_new_task' (properties changed: +x to -x)
=== modified file 'profile.py' (properties changed: +x to -x)
Follow ups