rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
tags:tag1,tag2,tag3 : This way you can apply as many tags as you wish using comma as separator | You can also create a task with the attributes "tags", "due", and "defer" in the quickadd entry. The syntax for these attributes is: | def populate(): doc,root = cleanxml.emptydoc("project") #Task 0@1: Getting started with GTG title1 = _("Getting started with GTG") text1 = _("""Welcome to Getting Things Gnome!, your new task manager. | 98aa4e75e8126cb96a385a5790b0cce5b021c4db /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/98aa4e75e8126cb96a385a5790b0cce5b021c4db/firstrun_tasks.py |
due:date or defer:date : This way you can apply a due date or a defer date. date can be yyyy-mm-dd (for example 2009-04-01) or yyyymmdd (20090401) or mmdd (0401, in this case the year is implicitly the current one) or today or tomorrow or a weekday name (due:monday means due next Monday) | tags:tag1,tag2,tag3 - This way you can apply as many tags as you wish using comma as separator due:date defer:date - This way you can apply a due date or a defer date. date can be yyyy-mm-dd (for example 2009-04-01) or yyyymmdd (20090401) or mmdd (0401, in this case the year is implicitly the current one) or today or ... | def populate(): doc,root = cleanxml.emptydoc("project") #Task 0@1: Getting started with GTG title1 = _("Getting started with GTG") text1 = _("""Welcome to Getting Things Gnome!, your new task manager. | 98aa4e75e8126cb96a385a5790b0cce5b021c4db /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/98aa4e75e8126cb96a385a5790b0cce5b021c4db/firstrun_tasks.py |
self.reset_cursor() | if not self.dont_reset: self.reset_cursor() | def on_nonworkviewtag_toggled(self, widget): self.set_target_cursor() tags = self.get_selected_tags()[0] nonworkview_item = self.nonworkviewtag_checkbox #We must inverse because the tagstore has True #for tasks that are not in workview (and also convert to string) toset = str(not nonworkview_item.get_active()) if len(t... | 1b93579dac62c0912f2961b2bc618249da0fa01f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/1b93579dac62c0912f2961b2bc618249da0fa01f/browser.py |
manager.main() | with signal_catcher(): manager.main() | def main(options=None, args=None): # Debugging subsystem initialization if options.debug: Log.setLevel(logging.DEBUG) Log.debug("Debug output enabled.") config = CoreConfig() check_instance(config.DATA_DIR) backends_list = config.get_backends_list() # Load data store ds = DataStore() for backend_dic in backends_list... | 82b176973e322f5ff5e22f14b9174a15b99b3921 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/82b176973e322f5ff5e22f14b9174a15b99b3921/gtg.py |
elif typ == "http" : openurl.openurl(anchor) | elif typ == "http": if button == 1: openurl.openurl(anchor) | def _tag_event(self, tag, view, ev, _iter, text, anchor,typ): #pylint: disable-msg=W0613 _type = ev.type if _type == gtk.gdk.MOTION_NOTIFY: return elif _type in [gtk.gdk.BUTTON_PRESS, gtk.gdk.BUTTON_RELEASE]: button = ev.button cursor = gtk.gdk.Cursor(gtk.gdk.HAND2) if _type == gtk.gdk.BUTTON_RELEASE: if typ == "subtas... | 9dca4665fa1973594df7db7c72f629d3cc7295d6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/9dca4665fa1973594df7db7c72f629d3cc7295d6/taskview.py |
self.tags_tv.refresh() | def on_add_new_tag(self, widget=None, tid=None): if not tid: self.tids_to_addtag = self.get_selected_tasks() else: self.tids_to_addtag = [tid] if len(self.tids_to_addtag) > 0: #TODO: Apply to subtasks? #TODO: Access via hotkey #TODO: Autocomplete #TODO: Multiple tags~ #TODO: Menu icon? #TODO: ???????????????????????? ... | 8e42028002dbe1aa9223bcfb0ad670c792bfe961 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/8e42028002dbe1aa9223bcfb0ad670c792bfe961/browser.py | |
task.sync | task.sync() | def on_addtag_confirm(self, widget=None): tag_entry = self.builder.get_object("tag_entry") addtag_dialog = self.builder.get_object("TaskAddTag") if not tag_entry.get_text()[0] == "@": new_tagname = "@" + tag_entry.get_text() else: new_tagname = tag_entry.get_text() #TODO: What if I _want_ the new tag to be @@somethin... | 8e42028002dbe1aa9223bcfb0ad670c792bfe961 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/8e42028002dbe1aa9223bcfb0ad670c792bfe961/browser.py |
def on_addtag_confirm(self, widget=None): tag_entry = self.builder.get_object("tag_entry") addtag_dialog = self.builder.get_object("TaskAddTag") if not tag_entry.get_text()[0] == "@": new_tagname = "@" + tag_entry.get_text() else: new_tagname = tag_entry.get_text() #TODO: What if I _want_ the new tag to be @@somethin... | 8e42028002dbe1aa9223bcfb0ad670c792bfe961 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/8e42028002dbe1aa9223bcfb0ad670c792bfe961/browser.py | ||
self.tags_tv.refresh() | def on_addtag_confirm(self, widget=None): tag_entry = self.builder.get_object("tag_entry") addtag_dialog = self.builder.get_object("TaskAddTag") if not tag_entry.get_text()[0] == "@": new_tagname = "@" + tag_entry.get_text() else: new_tagname = tag_entry.get_text() #TODO: What if I _want_ the new tag to be @@somethin... | 8e42028002dbe1aa9223bcfb0ad670c792bfe961 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/8e42028002dbe1aa9223bcfb0ad670c792bfe961/browser.py | |
return getattr(self.task[len(self.task.task) - 1], attr) | return getattr(self.task[len(self.task) - 1], attr) | def __get_rtm_task_attribute(self, attr): if hasattr(self.task, 'task'): if hasattr(self.task.task, 'list'): return getattr(self.task.task.list, attr) elif type(self.task.task) == list: return getattr(self.task.task[len(self.task.task) - 1], attr) else: return getattr(self.task.task, attr) else: if type(self.task) == l... | f57538aa7e0d646af5cb0953a9ae039bf21c3fbe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/f57538aa7e0d646af5cb0953a9ae039bf21c3fbe/rtmTask.py |
plugin_api.remove_toolbar_item(self.tb_button) plugin_api.remove_toolbar_item(self.separator) | plugin_api.remove_task_toolbar_item(self.tb_button) plugin_api.remove_task_toolbar_item(self.separator) | def deactivate(self, plugin_api): plugin_api.remove_menu_item(self.menu_item) plugin_api.remove_toolbar_item(self.tb_button) plugin_api.remove_toolbar_item(self.separator) self.txtImport = None | 71bfcf42a3a68f02fde5eabc2e2d3101366d5c7f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/71bfcf42a3a68f02fde5eabc2e2d3101366d5c7f/import_json.py |
return task.get_closed_date().to_readable_string() | return task.get_closed_date() | def on_get_value(self, node, column): | 3e629952f592cdf9f857054635417891d4f912ef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/3e629952f592cdf9f857054635417891d4f912ef/tasktree.py |
selection = self.get_selection() | def select_backend(self, backend_id = None): ''' Selects the backend corresponding to backend_id. If backend_id is none, refreshes the current configuration panel. | 705855f66162111c4847d5373721bfa86362b100 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/705855f66162111c4847d5373721bfa86362b100/backendstree.py | |
self.get_selection().select_path("0") | if selection: selection.select_path("0") | def select_backend(self, backend_id = None): ''' Selects the backend corresponding to backend_id. If backend_id is none, refreshes the current configuration panel. | 705855f66162111c4847d5373721bfa86362b100 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/705855f66162111c4847d5373721bfa86362b100/backendstree.py |
@dbus.service.method(BUSNAME) def open_new_task(self): | @dbus.service.method(BUSNAME, in_signature="ss") def open_new_task(self, title, description): | def open_task_editor(self, tid): self.ui.open_task(tid) | 8bd3e45d05e26ecab655da6d6d46214d5f08b17d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/8bd3e45d05e26ecab655da6d6d46214d5f08b17d/dbuswrapper.py |
STA_ACTIVE = "Active" STA_DISMISSED = "Dismiss" STA_DONE = "Done" | def is_displayed(self,tid): task = self.req.get_task(tid) if not task: return False else: tags = [self.tname] tags += self.req.get_tag(self.tname).get_children() return task.has_tags(tags) | 710d9682c81e50feb522f8c918bc17fab5ebc983 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/710d9682c81e50feb522f8c918bc17fab5ebc983/filters_bank.py | |
return task.get_status() == self.STA_ACTIVE | return task.get_status() == Task.STA_ACTIVE | def active(self,task): """ Filter of tasks which are active """ #FIXME: we should also handle unactive tags return task.get_status() == self.STA_ACTIVE | 710d9682c81e50feb522f8c918bc17fab5ebc983 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/710d9682c81e50feb522f8c918bc17fab5ebc983/filters_bank.py |
return task.get_status() in [self.STA_DISMISSED,self.STA_DONE] | return task.get_status() in [Task.STA_DISMISSED, Task.STA_DONE] | def closed(self,task): """ Filter of tasks which are closed """ return task.get_status() in [self.STA_DISMISSED,self.STA_DONE] | 710d9682c81e50feb522f8c918bc17fab5ebc983 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/710d9682c81e50feb522f8c918bc17fab5ebc983/filters_bank.py |
if not dleft: | if dleft == None: | def on_get_value(self, rowref, column): node = self.tree.get_node_for_rowref(rowref) if not node: return None else: task = node.get_obj() if column == COL_TID: return task.get_id() elif column == COL_OBJ: return task elif column == COL_TITLE: return saxutils.escape(task.get_title()) elif column == COL_SDATE: return s... | 12e20d4b34c0d490242ac011c26b3136fa3d99c6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/12e20d4b34c0d490242ac011c26b3136fa3d99c6/tasktree.py |
if dleft == 1: | elif dleft == 1: | def on_get_value(self, rowref, column): node = self.tree.get_node_for_rowref(rowref) if not node: return None else: task = node.get_obj() if column == COL_TID: return task.get_id() elif column == COL_OBJ: return task elif column == COL_TITLE: return saxutils.escape(task.get_title()) elif column == COL_SDATE: return s... | 12e20d4b34c0d490242ac011c26b3136fa3d99c6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/12e20d4b34c0d490242ac011c26b3136fa3d99c6/tasktree.py |
if dleft == 0: | elif dleft == 0: | def on_get_value(self, rowref, column): node = self.tree.get_node_for_rowref(rowref) if not node: return None else: task = node.get_obj() if column == COL_TID: return task.get_id() elif column == COL_OBJ: return task elif column == COL_TITLE: return saxutils.escape(task.get_title()) elif column == COL_SDATE: return s... | 12e20d4b34c0d490242ac011c26b3136fa3d99c6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/12e20d4b34c0d490242ac011c26b3136fa3d99c6/tasktree.py |
if dleft == -1: | elif dleft == -1: | def on_get_value(self, rowref, column): node = self.tree.get_node_for_rowref(rowref) if not node: return None else: task = node.get_obj() if column == COL_TID: return task.get_id() elif column == COL_OBJ: return task elif column == COL_TITLE: return saxutils.escape(task.get_title()) elif column == COL_SDATE: return s... | 12e20d4b34c0d490242ac011c26b3136fa3d99c6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/12e20d4b34c0d490242ac011c26b3136fa3d99c6/tasktree.py |
if dleft < -1: | elif dleft < -1: | def on_get_value(self, rowref, column): node = self.tree.get_node_for_rowref(rowref) if not node: return None else: task = node.get_obj() if column == COL_TID: return task.get_id() elif column == COL_OBJ: return task elif column == COL_TITLE: return saxutils.escape(task.get_title()) elif column == COL_SDATE: return s... | 12e20d4b34c0d490242ac011c26b3136fa3d99c6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/12e20d4b34c0d490242ac011c26b3136fa3d99c6/tasktree.py |
if dleft > 1 and dleft <= 15: | elif dleft > 1 and dleft <= 15: | def on_get_value(self, rowref, column): node = self.tree.get_node_for_rowref(rowref) if not node: return None else: task = node.get_obj() if column == COL_TID: return task.get_id() elif column == COL_OBJ: return task elif column == COL_TITLE: return saxutils.escape(task.get_title()) elif column == COL_SDATE: return s... | 12e20d4b34c0d490242ac011c26b3136fa3d99c6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/12e20d4b34c0d490242ac011c26b3136fa3d99c6/tasktree.py |
print task.status | def lp_login(): cachedir = os.path.expanduser('~/.cache/launchpadlib/') if not os.path.isdir(cachedir): os.makedirs(cachedir) creddir = os.path.expanduser("~/.cache/lp_credentials") if not os.path.isdir(creddir): os.makedirs(creddir) os.chmod(creddir, 0700) try: credfile = open(os.path.join(creddir, 'close_launchpad_bu... | 24e5ba62221cebfa32b7ba233c4d8561c6dfe8b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/24e5ba62221cebfa32b7ba233c4d8561c6dfe8b1/close_launchpad_bugs.py | |
self.assertEqual(expected, signal_arguments) | for e in expected: self.assert_(e in signal_arguments[0]) | def new(*args, **kws): with SignalCatcher(self, generator, signal_name) \ as [signal_catched_event, signal_arguments]: function(*args, **kws) signal_catched_event.wait() self.assertEqual(expected, signal_arguments) return None | dc64c2fbf71ce3d9654b0a1435e40fa1375b23b8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/dc64c2fbf71ce3d9654b0a1435e40fa1375b23b8/test_liblarch.py |
""" DISABLED (?) """ return view = self.tree.get_viewtree(refresh=True) node = DummyNode('temp') node.add_color('blue') | """ Test the adding and removal of nodes """ view = self.tree.get_viewtree(refresh=True) node = DummyNode('temp') node.add_color('blue') expected_arg = ['temp'] | def test_add_remove_node(self): """ DISABLED (?) """ return view = self.tree.get_viewtree(refresh=True) node = DummyNode('temp') node.add_color('blue') self.assertNodeModifiedInviewExp(['0'], self.assertNodeAddedInviewExp([node.get_id()],\ self.tree.add_node))(node, parent_id = '0') shouldbe = self.blue_nodes + 1 total... | dc64c2fbf71ce3d9654b0a1435e40fa1375b23b8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/dc64c2fbf71ce3d9654b0a1435e40fa1375b23b8/test_liblarch.py |
self.assertNodeAddedInviewExp([node.get_id()],\ | self.assertNodeAddedInviewExp(expected_arg,\ | def test_add_remove_node(self): """ DISABLED (?) """ return view = self.tree.get_viewtree(refresh=True) node = DummyNode('temp') node.add_color('blue') self.assertNodeModifiedInviewExp(['0'], self.assertNodeAddedInviewExp([node.get_id()],\ self.tree.add_node))(node, parent_id = '0') shouldbe = self.blue_nodes + 1 total... | dc64c2fbf71ce3d9654b0a1435e40fa1375b23b8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/dc64c2fbf71ce3d9654b0a1435e40fa1375b23b8/test_liblarch.py |
""" DISABLED (?) """ return | """ Modifying a node and see if the change is reflected in filters """ | def test_modifying_node(self): """ DISABLED (?) """ return viewblue = self.tree.get_viewtree(refresh=False) viewblue.apply_filter('blue') viewred = self.tree.get_viewtree(refresh=False) viewred.apply_filter('red') node = DummyNode('temp') node.add_color('blue') #Do you see : we are modifying a child self.assertNodeModi... | dc64c2fbf71ce3d9654b0a1435e40fa1375b23b8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/dc64c2fbf71ce3d9654b0a1435e40fa1375b23b8/test_liblarch.py |
""" DISABLED (?) """ | def test_removing_parent(self): """ DISABLED (?) """ """Test behavior of node when its parent goes away. | dc64c2fbf71ce3d9654b0a1435e40fa1375b23b8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/dc64c2fbf71ce3d9654b0a1435e40fa1375b23b8/test_liblarch.py | |
return | def test_removing_parent(self): """ DISABLED (?) """ """Test behavior of node when its parent goes away. | dc64c2fbf71ce3d9654b0a1435e40fa1375b23b8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/dc64c2fbf71ce3d9654b0a1435e40fa1375b23b8/test_liblarch.py | |
def pest_viewtree_node_nth_child(self): | def test_viewtree_node_nth_child(self): | def test_viewtree_node_all_children(self): view = self.tree.get_viewtree(refresh=True) self.assertEqual(0,len(view.node_all_children('0'))) """Test node_all_children() for TreeView. | dc64c2fbf71ce3d9654b0a1435e40fa1375b23b8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/dc64c2fbf71ce3d9654b0a1435e40fa1375b23b8/test_liblarch.py |
"""FIXME: Document me please | """Test a flat filter. Green nodes are in "stairs" (each one being the child of another) By applying a filter with the flat properties, we test that all the nodes are now seen "flately". | def test_flat_filters(self): view = self.tree.get_viewtree(refresh=False) """FIXME: Document me please """ view.apply_filter('flatgreen') #all green nodes should be visibles self.assertEqual(self.green_nodes,view.get_n_nodes()) i = 0 nodes = [] #we check that the paths are on the root while i < self.green_nodes: nid = ... | dc64c2fbf71ce3d9654b0a1435e40fa1375b23b8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/dc64c2fbf71ce3d9654b0a1435e40fa1375b23b8/test_liblarch.py |
tag = Tag('foo') | tag = Tag('foo', self.req) | def test_name(self): # The first argument to the Tag constructor is the name, which you can # get with get_name(). tag = Tag('foo') self.assertEqual('foo', tag.get_name()) | 757b4835864cdde920e690d53a448719be388a7a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/757b4835864cdde920e690d53a448719be388a7a/test_tagstore.py |
tag = Tag('foo') | tag = Tag('foo', self.req) | def test_name_is_attribute(self): # The name of the tag is also stored as an attribute. tag = Tag('foo') self.assertEqual('foo', tag.get_attribute('name')) | 757b4835864cdde920e690d53a448719be388a7a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/757b4835864cdde920e690d53a448719be388a7a/test_tagstore.py |
tag = Tag('whatever') | tag = Tag('whatever', self.req) | def test_missing_attribute_returns_none(self): # If get_attribute is called for an attribute that doesn't exist, it # returns None. tag = Tag('whatever') result = tag.get_attribute('no-such-attribute') self.assertEqual(None, result) | 757b4835864cdde920e690d53a448719be388a7a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/757b4835864cdde920e690d53a448719be388a7a/test_tagstore.py |
def test_set_attribute_calls_save(self): save_calls = [] tag = Tag('whatever', lambda: save_calls.append(None)) tag.set_attribute('new-attribute', 'value') self.assertEqual(1, len(save_calls)) | def test_missing_attribute_returns_none(self): # If get_attribute is called for an attribute that doesn't exist, it # returns None. tag = Tag('whatever') result = tag.get_attribute('no-such-attribute') self.assertEqual(None, result) | 757b4835864cdde920e690d53a448719be388a7a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/757b4835864cdde920e690d53a448719be388a7a/test_tagstore.py | |
tag = Tag('whatever', lambda: None) | tag = Tag('whatever', self.req) | def test_set_then_get_attribute(self): # Attributes set with set_attribute can be retrieved with # get_attribute. tag = Tag('whatever', lambda: None) tag.set_attribute('new-attribute', 'value') result = tag.get_attribute('new-attribute') self.assertEqual('value', result) | 757b4835864cdde920e690d53a448719be388a7a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/757b4835864cdde920e690d53a448719be388a7a/test_tagstore.py |
tag = Tag('whatever', lambda: None) | tag = Tag('whatever', self.req) | def test_set_non_str_attribute_casts_to_string(self): # If the value of the attribute passed to set_attribute is not a # string, it's cast to a string. tag = Tag('whatever', lambda: None) tag.set_attribute('new-attribute', 42) result = tag.get_attribute('new-attribute') self.assertEqual('42', result) | 757b4835864cdde920e690d53a448719be388a7a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/757b4835864cdde920e690d53a448719be388a7a/test_tagstore.py |
tag = Tag('foo') | tag = Tag('foo', self.req) | def test_get_all_attributes_initial(self): # Initially, a Tag has only the name attribute. tag = Tag('foo') self.assertEqual(['name'], tag.get_all_attributes()) | 757b4835864cdde920e690d53a448719be388a7a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/757b4835864cdde920e690d53a448719be388a7a/test_tagstore.py |
tag = Tag('foo', lambda: None) | tag = Tag('foo', self.req) | def test_get_all_attributes_after_setting(self): # After attributes are set, get_all_attributes includes those # attributes. The order is not guaranteed. tag = Tag('foo', lambda: None) tag.set_attribute('bar', 'baz') self.assertEqual(set(['name', 'bar']), set(tag.get_all_attributes())) | 757b4835864cdde920e690d53a448719be388a7a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/757b4835864cdde920e690d53a448719be388a7a/test_tagstore.py |
tag = Tag('foo', lambda: None) | tag = Tag('foo', self.req) | def test_get_all_but_name(self): # If 'butname' is True, then exclude the 'name' attribute. tag = Tag('foo', lambda: None) self.assertEqual([], tag.get_all_attributes(butname=True)) tag.set_attribute('bar', 'baz') self.assertEqual(['bar'], tag.get_all_attributes(butname=True)) | 757b4835864cdde920e690d53a448719be388a7a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/757b4835864cdde920e690d53a448719be388a7a/test_tagstore.py |
tag = Tag('foo') | tag = Tag('foo', self.req) | def test_str(self): # str(tag) is 'Tag: <name>' tag = Tag('foo') self.assertEqual('Tag: foo', str(tag)) | 757b4835864cdde920e690d53a448719be388a7a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/757b4835864cdde920e690d53a448719be388a7a/test_tagstore.py |
tag = Tag('old', lambda: None) | tag = Tag('old', self.req) | def test_set_name_attribute_does_nothing(self): # The 'name' attribute is set by the constructor. After it is set, it # cannot be changed with further calls to set_attribute. tag = Tag('old', lambda: None) tag.set_attribute('name', 'new') self.assertEqual('old', tag.get_name()) self.assertEqual('old', tag.get_attribute... | 757b4835864cdde920e690d53a448719be388a7a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/757b4835864cdde920e690d53a448719be388a7a/test_tagstore.py |
Tag('old', lambda: save_calls.append(None)) | Tag('old', self.req) | def test_save_not_called_on_construction(self): # The save callback isn't called by the constructor, despite the fact # that it sets the name attribute. save_calls = [] Tag('old', lambda: save_calls.append(None)) self.assertEqual(0, len(save_calls)) | 757b4835864cdde920e690d53a448719be388a7a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/757b4835864cdde920e690d53a448719be388a7a/test_tagstore.py |
tag = Tag('old', lambda: save_calls.append(None)) | tag = Tag('old', self.req) | def test_set_name_doesnt_call_save(self): # Setting the name attribute doesn't call save. save_calls = [] tag = Tag('old', lambda: save_calls.append(None)) tag.set_attribute('name', 'new') self.assertEqual(0, len(save_calls)) | 757b4835864cdde920e690d53a448719be388a7a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/757b4835864cdde920e690d53a448719be388a7a/test_tagstore.py |
def test_set_name_doesnt_call_save(self): # Setting the name attribute doesn't call save. save_calls = [] tag = Tag('old', lambda: save_calls.append(None)) tag.set_attribute('name', 'new') self.assertEqual(0, len(save_calls)) | 757b4835864cdde920e690d53a448719be388a7a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/757b4835864cdde920e690d53a448719be388a7a/test_tagstore.py | ||
calls = [(self.tree.add_node, "ADDING"), (self.tree.refresh_node, "UPDATING"), (self.tree.del_node, "REMOVING")] for call, name in calls: start = time.time() for index in xrange(2000): node = DummyNode("stress" + str(index)) call(node) end = time.time() test.test_validity() if call != self.tree.del_node: self.asse... | nodes_id = [] start = time.time() for index in xrange(BIG_NUMBER): node = DummyNode("stress" + str(index)) nodes_id.append(node.get_id()) self.tree.add_node(node) end = time.time() test.test_validity() print "\nADDING %d NODES: %f" % (BIG_NUMBER, end - start) start = time.time() for node_id in nodes_id: self.tree.refr... | def test_speed(self): ''' Performance tests. Patches that reduce performance too much are not acceptable ''' view = self.tree.get_viewtree(refresh = False) test = TreeTester(view) calls = [(self.tree.add_node, "ADDING"), (self.tree.refresh_node, "UPDATING"), (self.tree.del_node, "REMOVING")] for call, name in calls: st... | ce701fa256cdf16403fa76a6ffa95c56d207f498 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/ce701fa256cdf16403fa76a6ffa95c56d207f498/test_liblarch.py |
"on_defer_to_tomorrow": self.on_defer_to_tomorrow, "on_defer_to_next_week": self.on_defer_to_next_week, "on_defer_to_next_month": self.on_defer_to_next_month, "on_defer_to_next_year": self.on_defer_to_next_year, | "on_schedule_for_tomorrow": self.on_schedule_for_tomorrow, "on_schedule_for_next_week": self.on_schedule_for_next_week, "on_schedule_for_next_month": self.on_schedule_for_next_month, "on_schedule_for_next_year": self.on_schedule_for_next_year, | def _init_signal_connections(self): | bcb574cdc2617dbdbb897c6911ba77110fb83e38 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/bcb574cdc2617dbdbb897c6911ba77110fb83e38/browser.py |
def on_defer_to_tomorrow(self, widget): | def on_schedule_for_tomorrow(self, widget): | def on_defer_to_tomorrow(self, widget): self.update_start_date(widget, "tomorrow") | bcb574cdc2617dbdbb897c6911ba77110fb83e38 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/bcb574cdc2617dbdbb897c6911ba77110fb83e38/browser.py |
def on_defer_to_next_week(self, widget): | def on_schedule_for_next_week(self, widget): | def on_defer_to_next_week(self, widget): self.update_start_date(widget, "next week") | bcb574cdc2617dbdbb897c6911ba77110fb83e38 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/bcb574cdc2617dbdbb897c6911ba77110fb83e38/browser.py |
def on_defer_to_next_month(self, widget): | def on_schedule_for_next_month(self, widget): | def on_defer_to_next_month(self, widget): self.update_start_date(widget, "next month") | bcb574cdc2617dbdbb897c6911ba77110fb83e38 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/bcb574cdc2617dbdbb897c6911ba77110fb83e38/browser.py |
def on_defer_to_next_year(self, widget): | def on_schedule_for_next_year(self, widget): | def on_defer_to_next_year(self, widget): self.update_start_date(widget, "next year") | bcb574cdc2617dbdbb897c6911ba77110fb83e38 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/bcb574cdc2617dbdbb897c6911ba77110fb83e38/browser.py |
tb_Taskbutton = gtk.ToolButton(tb_Taskicon) tb_Taskbutton.set_label("Send via email") tb_Taskbutton.connect('clicked', self.onTbTaskButton, plugin_api) self.task_separator = plugin_api.add_task_toolbar_item(gtk.SeparatorToolItem()) self.tb_Taskbutton = plugin_api.add_task_toolbar_item(tb_Taskbutton) | self.tb_Taskbutton = gtk.ToolButton(tb_Taskicon) self.tb_Taskbutton.set_label("Send via email") self.tb_Taskbutton.connect('clicked', self.onTbTaskButton, plugin_api) self.task_separator = gtk.SeparatorToolItem() plugin_api.add_task_toolbar_item(self.task_separator) plugin_api.add_task_toolbar_item(self.tb_Taskbutton) | def onTaskOpened(self, plugin_api): # add a item (button) to the ToolBar tb_Taskicon = gtk.Image() tb_Taskicon.set_from_icon_name('mail-send', 32) tb_Taskicon.show() tb_Taskbutton = gtk.ToolButton(tb_Taskicon) tb_Taskbutton.set_label("Send via email") tb_Taskbutton.connect('clicked', self.onTbTaskButton, plugin_api) se... | aef563d3e54e3aa7a6e651862a860530b324f769 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/aef563d3e54e3aa7a6e651862a860530b324f769/sendEmail.py |
plugin_api.remove_task_toolbar_item(self.task_separator) plugin_api.remove_task_toolbar_item(self.tb_Taskbutton) | if hasattr(self, "task_separator"): plugin_api.remove_task_toolbar_item(self.task_separator) if hasattr(self, "tb_Taskbutton"): print self.tb_Taskbutton plugin_api.remove_task_toolbar_item(self.tb_Taskbutton) print "ciao" | def deactivate(self, plugin_api): #everything should be removed, in case a task is currently opened plugin_api.remove_task_toolbar_item(self.task_separator) plugin_api.remove_task_toolbar_item(self.tb_Taskbutton) | aef563d3e54e3aa7a6e651862a860530b324f769 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/aef563d3e54e3aa7a6e651862a860530b324f769/sendEmail.py |
found = False | if line < self.buff.get_line_count() : found = False | def insert_newtask(self,fitera=None) : if not fitera : fitera = self.get_insert() #First, find a line without subtask line = fitera.get_line() #Avoid the title at all cost if line <= 0 : line = 1 startl = self.buff.get_iter_at_line(line) itera = None while not itera : found = True for t in startl.get_tags() : if t.get_... | ee78dfa7df17682a86b005bb0e1785251bd3a6cd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/ee78dfa7df17682a86b005bb0e1785251bd3a6cd/taskview.py |
mark = self.buff.create_mark("temp",itera,True) | mark = self.buff.create_mark(None,itera,True) | def insert_newtask(self,fitera=None) : if not fitera : fitera = self.get_insert() #First, find a line without subtask line = fitera.get_line() #Avoid the title at all cost if line <= 0 : line = 1 startl = self.buff.get_iter_at_line(line) itera = None while not itera : found = True for t in startl.get_tags() : if t.get_... | ee78dfa7df17682a86b005bb0e1785251bd3a6cd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/ee78dfa7df17682a86b005bb0e1785251bd3a6cd/taskview.py |
def __init__(self,req): | MAXIMUM_TIDS_TO_SHOW = 20 def __init__(self, req): | def __init__(self,req): self.req = req self.tids_todelete = [] # Load window tree self.builder = gtk.Builder() self.builder.add_from_file(ViewConfig.DELETE_GLADE_FILE) signals = { "on_delete_confirm": self.on_delete_confirm, "on_delete_cancel": lambda x: x.hide,} self.builder.connect_signals(signals) | 374687075a431cf57f2bac30af61280f1aebdcaf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/374687075a431cf57f2bac30af61280f1aebdcaf/delete_dialog.py |
print "old paths are : %s" %self.old_paths | Log.debug( "old paths are : %s" %self.old_paths ) | def get_deleted_path(self,id): toreturn = None print "old paths are : %s" %self.old_paths if self.old_paths.has_key(id): toreturn = self.old_paths.pop(id) return toreturn | 6be473241491416bf05b5210abb927763a2b4278 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/6be473241491416bf05b5210abb927763a2b4278/tree.py |
def get_all_descendant_tags(self, tname): tags = [tname] tt = self.req.get_tag(tname) if tt: children = tt.get_children() tags.extend(children) for child_tag in children: tags.extend(self.get_all_descendant_tags(child_tag)) return tags | def set_parameters(self,dic): self.dic = dic | c9c7a2b5a5f398d035254ff4ce2958876f38491e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/c9c7a2b5a5f398d035254ff4ce2958876f38491e/filters_bank.py | |
tags = [self.tname] tt = self.req.get_tag(self.tname) if tt: tags += tt.get_children() | tags = self.get_all_descendant_tags(self.tname) | def is_displayed(self,tid): task = self.req.get_task(tid) value = True if not task: value = False else: tags = [self.tname] tt = self.req.get_tag(self.tname) if tt: tags += tt.get_children() value = task.has_tags(tags) if 'negate' in self.dic and self.dic['negate']: value = not value return value | c9c7a2b5a5f398d035254ff4ce2958876f38491e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/c9c7a2b5a5f398d035254ff4ce2958876f38491e/filters_bank.py |
self.ind = appindicator.Indicator ("gtg", "indicator-messages", appindicator.CATEGORY_APPLICATION_STATUS) | self.ind = appindicator.Indicator ("gtg", \ "indicator-messages", \ appindicator.CATEGORY_APPLICATION_STATUS) | def activate(self, plugin_api): self.plugin_api = plugin_api #Create the menu self.create_static_menu() #initialize the right notification thing if indicator_capable: #Create an indicator icon self.ind = appindicator.Indicator ("gtg", "indicator-messages", appindicator.CATEGORY_APPLICATION_STATUS) self.ind.set_status ... | f684e4970e07f253dcaa3f4262badb7e89701fab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/f684e4970e07f253dcaa3f4262badb7e89701fab/notification_area.py |
icon = gtk.gdk.pixbuf_new_from_file_at_size(data_dir + "/icons/hicolor/16x16/apps/gtg.png", 16, 16) | icon = gtk.gdk.pixbuf_new_from_file_at_size(data_dir + \ "/icons/hicolor/16x16/apps/gtg.png", 16, 16) | def activate(self, plugin_api): self.plugin_api = plugin_api #Create the menu self.create_static_menu() #initialize the right notification thing if indicator_capable: #Create an indicator icon self.ind = appindicator.Indicator ("gtg", "indicator-messages", appindicator.CATEGORY_APPLICATION_STATUS) self.ind.set_status ... | f684e4970e07f253dcaa3f4262badb7e89701fab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/f684e4970e07f253dcaa3f4262badb7e89701fab/notification_area.py |
self.status_icon.connect('popup-menu', self.on_icon_popup, self.menu) | self.status_icon.connect('popup-menu', \ self.on_icon_popup, \ self.menu) | def activate(self, plugin_api): self.plugin_api = plugin_api #Create the menu self.create_static_menu() #initialize the right notification thing if indicator_capable: #Create an indicator icon self.ind = appindicator.Indicator ("gtg", "indicator-messages", appindicator.CATEGORY_APPLICATION_STATUS) self.ind.set_status ... | f684e4970e07f253dcaa3f4262badb7e89701fab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/f684e4970e07f253dcaa3f4262badb7e89701fab/notification_area.py |
self.minimized = not self.minimized | self.minimized = False | def minimize(self, widget, plugin_api): if self.minimized: self.view_main_window.set_active(True) plugin_api.show_window() self.minimized = not self.minimized else: self.view_main_window.set_active(False) plugin_api.hide_window() self.minimized = not self.minimized | f684e4970e07f253dcaa3f4262badb7e89701fab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/f684e4970e07f253dcaa3f4262badb7e89701fab/notification_area.py |
self.minimized = not self.minimized | self.minimized = True self.view_main_window_signal = self.view_main_window.connect(\ 'activate', self.minimize, self.plugin_api) | def minimize(self, widget, plugin_api): if self.minimized: self.view_main_window.set_active(True) plugin_api.show_window() self.minimized = not self.minimized else: self.view_main_window.set_active(False) plugin_api.hide_window() self.minimized = not self.minimized | f684e4970e07f253dcaa3f4262badb7e89701fab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/f684e4970e07f253dcaa3f4262badb7e89701fab/notification_area.py |
self.view_main_window.connect('activate', self.minimize, self.plugin_api) | self.view_main_window_signal = self.view_main_window.connect(\ 'activate', \ self.minimize,\ self.plugin_api) | def create_static_menu(self): #Tasks_in_menu will hold the menu_items in the menu self.tasks_in_menu = dict() self.task_separator = None self.menu = gtk.Menu() #view in main window checkbox self.view_main_window = gtk.CheckMenuItem(_("_View Main Window")) self.view_main_window.set_active(not self.minimized) self.view_m... | f684e4970e07f253dcaa3f4262badb7e89701fab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/f684e4970e07f253dcaa3f4262badb7e89701fab/notification_area.py |
menu.popup(None, None, gtk.status_icon_position_menu, button, timestamp, icon) | menu.popup(None, None, gtk.status_icon_position_menu, \ button, timestamp, icon) | def on_icon_popup(self, icon, button, timestamp, menu=None): #appindicator handles menus transparently if not indicator_capable: menu.popup(None, None, gtk.status_icon_position_menu, button, timestamp, icon) | f684e4970e07f253dcaa3f4262badb7e89701fab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/f684e4970e07f253dcaa3f4262badb7e89701fab/notification_area.py |
self.tag_completion.set_text_column(1) | self.tag_completion.set_text_column(2) | def _init_tag_completion(self): self.tag_completion = gtk.EntryCompletion() self.tag_completion.set_model(self.tag_model) self.tag_completion.set_text_column(1) self.tag_completion.set_inline_completion(True) self.tag_completion.set_inline_selection(True) | 5f683520c3e9ef41f5ca9e6a2b406c4888173944 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/5f683520c3e9ef41f5ca9e6a2b406c4888173944/browser.py |
def on_add_new_tag(self, widget=None, tid=None, tryagain = False): if not tid: self.tids_to_addtag = self.get_selected_tasks() else: self.tids_to_addtag = [tid] | 5f683520c3e9ef41f5ca9e6a2b406c4888173944 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/5f683520c3e9ef41f5ca9e6a2b406c4888173944/browser.py | ||
def on_add_new_tag(self, widget=None, tid=None, tryagain = False): if not tid: self.tids_to_addtag = self.get_selected_tasks() else: self.tids_to_addtag = [tid] | 5f683520c3e9ef41f5ca9e6a2b406c4888173944 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/5f683520c3e9ef41f5ca9e6a2b406c4888173944/browser.py | ||
entry_text = entry_text.strip() if not entry_text: | entry_text = [entry_text.strip()] if not entry_text[0]: | def on_addtag_confirm(self, widget): tag_entry = self.builder.get_object("tag_entry") addtag_dialog = self.builder.get_object("TaskAddTag") apply_to_subtasks = self.builder.get_object("apply_to_subtasks") addtag_error = False entry_text = tag_entry.get_text() entry_text = entry_text.strip() # Complain if the text entry... | 5f683520c3e9ef41f5ca9e6a2b406c4888173944 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/5f683520c3e9ef41f5ca9e6a2b406c4888173944/browser.py |
if "," in entry_text: entry_text = entry_text.split(",") | def on_addtag_confirm(self, widget): tag_entry = self.builder.get_object("tag_entry") addtag_dialog = self.builder.get_object("TaskAddTag") apply_to_subtasks = self.builder.get_object("apply_to_subtasks") addtag_error = False entry_text = tag_entry.get_text() entry_text = entry_text.strip() # Complain if the text entry... | 5f683520c3e9ef41f5ca9e6a2b406c4888173944 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/5f683520c3e9ef41f5ca9e6a2b406c4888173944/browser.py | |
pdb.set_trace() | def on_addtag_confirm(self, widget): tag_entry = self.builder.get_object("tag_entry") addtag_dialog = self.builder.get_object("TaskAddTag") apply_to_subtasks = self.builder.get_object("apply_to_subtasks") addtag_error = False entry_text = tag_entry.get_text() entry_text = entry_text.strip() # Complain if the text entry... | 5f683520c3e9ef41f5ca9e6a2b406c4888173944 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/5f683520c3e9ef41f5ca9e6a2b406c4888173944/browser.py | |
new_tags.append("@" + tagname) | new_tags.append("@" + tagname) | def on_addtag_confirm(self, widget): tag_entry = self.builder.get_object("tag_entry") addtag_dialog = self.builder.get_object("TaskAddTag") apply_to_subtasks = self.builder.get_object("apply_to_subtasks") addtag_error = False entry_text = tag_entry.get_text() entry_text = entry_text.strip() # Complain if the text entry... | 5f683520c3e9ef41f5ca9e6a2b406c4888173944 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/5f683520c3e9ef41f5ca9e6a2b406c4888173944/browser.py |
def on_addtag_confirm(self, widget): tag_entry = self.builder.get_object("tag_entry") addtag_dialog = self.builder.get_object("TaskAddTag") apply_to_subtasks = self.builder.get_object("apply_to_subtasks") addtag_error = False entry_text = tag_entry.get_text() entry_text = entry_text.strip() # Complain if the text entry... | 5f683520c3e9ef41f5ca9e6a2b406c4888173944 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/5f683520c3e9ef41f5ca9e6a2b406c4888173944/browser.py | ||
def on_addtag_confirm(self, widget): tag_entry = self.builder.get_object("tag_entry") addtag_dialog = self.builder.get_object("TaskAddTag") apply_to_subtasks = self.builder.get_object("apply_to_subtasks") addtag_error = False entry_text = tag_entry.get_text() entry_text = entry_text.strip() # Complain if the text entry... | 5f683520c3e9ef41f5ca9e6a2b406c4888173944 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/5f683520c3e9ef41f5ca9e6a2b406c4888173944/browser.py | ||
self.colToggle = gtk.TreeViewColumn("Enabled", self.rendererToggle) | self.colToggle = gtk.TreeViewColumn(_("Enabled"), self.rendererToggle) | def __init__(self, parent, plugins, pengine, plugin_apis): self.plugins = plugins self.pengine = pengine self.plugin_apis = plugin_apis self.builder = gtk.Builder() self.builder.add_from_file(GnomeConfig.GLADE_FILE) self.dialog = self.builder.get_object("PluginManagerDialog") # stuff to populate self.close_btn = self... | 23a90c16b30e01faa5b445279d6dfaf250fc806f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/23a90c16b30e01faa5b445279d6dfaf250fc806f/manager.py |
self.colName = gtk.TreeViewColumn("Name", self.rendererName, text=1, foreground_set=4) | self.colName = gtk.TreeViewColumn(_("Name"), self.rendererName, text=1, foreground_set=4) | def __init__(self, parent, plugins, pengine, plugin_apis): self.plugins = plugins self.pengine = pengine self.plugin_apis = plugin_apis self.builder = gtk.Builder() self.builder.add_from_file(GnomeConfig.GLADE_FILE) self.dialog = self.builder.get_object("PluginManagerDialog") # stuff to populate self.close_btn = self... | 23a90c16b30e01faa5b445279d6dfaf250fc806f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/23a90c16b30e01faa5b445279d6dfaf250fc806f/manager.py |
self.colVersion = gtk.TreeViewColumn("Version", self.rendererVersion, text=2, foreground_set=4) | self.colVersion = gtk.TreeViewColumn(_("Version"), self.rendererVersion, text=2, foreground_set=4) | def __init__(self, parent, plugins, pengine, plugin_apis): self.plugins = plugins self.pengine = pengine self.plugin_apis = plugin_apis self.builder = gtk.Builder() self.builder.add_from_file(GnomeConfig.GLADE_FILE) self.dialog = self.builder.get_object("PluginManagerDialog") # stuff to populate self.close_btn = self... | 23a90c16b30e01faa5b445279d6dfaf250fc806f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/23a90c16b30e01faa5b445279d6dfaf250fc806f/manager.py |
args = ['pydoctor', '--add-package', 'GTG' ,'--make-html', '--html-output=doc/api', '--project-name=GTG', '--project-url=http://gtg.fritalk.com/'] | args = ['pydoctor', '--add-package', os.path.dirname(GTG.__file__), '--make-html', '--html-output=doc/api', '--project-name=GTG', '--project-url=http://gtg.fritalk.com/'] | def test_pydoctor(self): if int(subprocess.call(['which', 'pydoctor'])): #if no pydoctor is present, abort the test w/out giving error return args = ['pydoctor', '--add-package', 'GTG' ,'--make-html', '--html-output=doc/api', '--project-name=GTG', '--project-url=http://gtg.fritalk.com/'] assert(int(subprocess.call(arg... | 9f9612763958c8046bf9a22a02155cd80390c740 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/9f9612763958c8046bf9a22a02155cd80390c740/test_apidocs.py |
plugin_api.remove_task_toolbar_item(self.tb_button) plugin_api.remove_task_toolbar_item(self.separator) | plugin_api.remove_toolbar_item(self.tb_button) plugin_api.remove_toolbar_item(self.separator) | def deactivate(self, plugin_api): plugin_api.remove_menu_item(self.menu_item) plugin_api.remove_task_toolbar_item(self.tb_button) plugin_api.remove_task_toolbar_item(self.separator) self.txtImport = None | c9bb015212786dbe5ba0d03ef671ce8dbf2c24d5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/c9bb015212786dbe5ba0d03ef671ce8dbf2c24d5/import_json.py |
def _init_tree_view(self): # Tag column tag_col = gtk.TreeViewColumn() render_tags = CellRendererTags() tag_col.set_title(_("Tags")) tag_col.pack_start(render_tags, expand=False) tag_col.add_attribute(render_tags, "tag_list", COL_TAGS) render_tags.set_property('xalign', 0.0) tag_col.set_resizable(False) tag_col.set... | 80743095708fd2732eef08ad7ced195ba67808ef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/80743095708fd2732eef08ad7ced195ba67808ef/tasktree.py | ||
ddate_col.set_title(_("Due date")) | ddate_col.set_title(_("Due")) | def _init_tree_view(self): # Tag column tag_col = gtk.TreeViewColumn() render_tags = CellRendererTags() tag_col.set_title(_("Tags")) tag_col.pack_start(render_tags, expand=False) tag_col.add_attribute(render_tags, "tag_list", COL_TAGS) render_tags.set_property('xalign', 0.0) tag_col.set_resizable(False) tag_col.set... | 80743095708fd2732eef08ad7ced195ba67808ef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/80743095708fd2732eef08ad7ced195ba67808ef/tasktree.py |
ddate_col.add_attribute(render_text, "markup", COL_DDATE) | ddate_col.add_attribute(render_text, "markup", COL_DUE) | def _init_tree_view(self): # Tag column tag_col = gtk.TreeViewColumn() render_tags = CellRendererTags() tag_col.set_title(_("Tags")) tag_col.pack_start(render_tags, expand=False) tag_col.add_attribute(render_tags, "tag_list", COL_TAGS) render_tags.set_property('xalign', 0.0) tag_col.set_resizable(False) tag_col.set... | 80743095708fd2732eef08ad7ced195ba67808ef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/80743095708fd2732eef08ad7ced195ba67808ef/tasktree.py |
self.columns.insert(COL_DDATE, ddate_col) | self.columns.insert(COL_DUE, ddate_col) | def _init_tree_view(self): # Tag column tag_col = gtk.TreeViewColumn() render_tags = CellRendererTags() tag_col.set_title(_("Tags")) tag_col.pack_start(render_tags, expand=False) tag_col.add_attribute(render_tags, "tag_list", COL_TAGS) render_tags.set_property('xalign', 0.0) tag_col.set_resizable(False) tag_col.set... | 80743095708fd2732eef08ad7ced195ba67808ef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/80743095708fd2732eef08ad7ced195ba67808ef/tasktree.py |
if not self.rtm_proxy.is_authenticated(): threading.Thread(target = self.rtm_proxy.get_rtm_tasks_dict).start() if self.enqueued_start_get_task: return else: self.enqueued_start_get_task = True self.rtm_proxy.wait_for_authentication() self.enqueued_start_get_task = False if not hasattr(self, 'token_saved'): self._st... | def do_periodic_import(self): """ See PeriodicImportBackend for an explanation of this function. """ #we verify authentication if not self.rtm_proxy.is_authenticated(): #we try to reach RTM to trigger the authentication process threading.Thread(target = self.rtm_proxy.get_rtm_tasks_dict).start() if self.enqueued_start_... | abfb6098ab297631b5a39657955ffc083742508d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/abfb6098ab297631b5a39657955ffc083742508d/backend_rtm.py | |
rtm_task = self.rtm_proxy.create_new_rtm_task(task.get_title()) self._populate_rtm_task(task, rtm_task) | if task.get_status() != Task.STA_ACTIVE: return try: rtm_task = self.rtm_proxy.create_new_rtm_task(task.get_title()) self._populate_rtm_task(task, rtm_task) except: rtm_task.delete() raise | def set_task(self, task): """ See GenericBackend for an explanation of this function. """ if not self.rtm_proxy.is_authenticated(): return self.cancellation_point() tid = task.get_id() is_syncable = self._gtg_task_is_syncable_per_attached_tags(task) action, rtm_task_id = self.sync_engine.analyze_local_id( \ tid, \ self... | abfb6098ab297631b5a39657955ffc083742508d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/abfb6098ab297631b5a39657955ffc083742508d/backend_rtm.py |
self._populate_rtm_task(task, rtm_task) | transaction_ids = [] try: self._populate_rtm_task(task, rtm_task, transaction_ids) except: self.rtm_proxy.unroll_changes(transaction_ids) raise | def set_task(self, task): """ See GenericBackend for an explanation of this function. """ if not self.rtm_proxy.is_authenticated(): return self.cancellation_point() tid = task.get_id() is_syncable = self._gtg_task_is_syncable_per_attached_tags(task) action, rtm_task_id = self.sync_engine.analyze_local_id( \ tid, \ self... | abfb6098ab297631b5a39657955ffc083742508d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/abfb6098ab297631b5a39657955ffc083742508d/backend_rtm.py |
def _populate_rtm_task(self, task, rtm_task): | def _populate_rtm_task(self, task, rtm_task, transaction_ids = []): | def _populate_rtm_task(self, task, rtm_task): ''' Copies the content of a Task into a RTMTask ''' #Get methods of an rtm_task are fast, set are slow: therefore, # we try to use set as rarely as possible | abfb6098ab297631b5a39657955ffc083742508d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/abfb6098ab297631b5a39657955ffc083742508d/backend_rtm.py |
rtm_task.set_status(status) | self.__call_or_retry(rtm_task.set_status, status, transaction_ids) | def _populate_rtm_task(self, task, rtm_task): ''' Copies the content of a Task into a RTMTask ''' #Get methods of an rtm_task are fast, set are slow: therefore, # we try to use set as rarely as possible | abfb6098ab297631b5a39657955ffc083742508d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/abfb6098ab297631b5a39657955ffc083742508d/backend_rtm.py |
rtm_task.set_title(title) | self.__call_or_retry(rtm_task.set_title, title, transaction_ids) | def _populate_rtm_task(self, task, rtm_task): ''' Copies the content of a Task into a RTMTask ''' #Get methods of an rtm_task are fast, set are slow: therefore, # we try to use set as rarely as possible | abfb6098ab297631b5a39657955ffc083742508d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/abfb6098ab297631b5a39657955ffc083742508d/backend_rtm.py |
rtm_task.set_text(text) | self.__call_or_retry(rtm_task.set_text, text, transaction_ids) | def _populate_rtm_task(self, task, rtm_task): ''' Copies the content of a Task into a RTMTask ''' #Get methods of an rtm_task are fast, set are slow: therefore, # we try to use set as rarely as possible | abfb6098ab297631b5a39657955ffc083742508d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/abfb6098ab297631b5a39657955ffc083742508d/backend_rtm.py |
rtm_task.set_tags(tags) | self.__call_or_retry(rtm_task.set_tags, tags, transaction_ids) | def _populate_rtm_task(self, task, rtm_task): ''' Copies the content of a Task into a RTMTask ''' #Get methods of an rtm_task are fast, set are slow: therefore, # we try to use set as rarely as possible | abfb6098ab297631b5a39657955ffc083742508d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/abfb6098ab297631b5a39657955ffc083742508d/backend_rtm.py |
rtm_task.set_due_date(due_date) | self.__call_or_retry(rtm_task.set_due_date, due_date, transaction_ids) def __call_or_retry(self, fun, *args): ''' This function cannot stand the call "fun" to fail, so it retries three times before giving up. ''' MAX_ATTEMPTS = 3 for i in xrange(MAX_ATTEMPTS): try: return fun(*args) except: if i >= MAX_ATTEMPTS: raise... | def _populate_rtm_task(self, task, rtm_task): ''' Copies the content of a Task into a RTMTask ''' #Get methods of an rtm_task are fast, set are slow: therefore, # we try to use set as rarely as possible | abfb6098ab297631b5a39657955ffc083742508d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/abfb6098ab297631b5a39657955ffc083742508d/backend_rtm.py |
print "UNLOCK" | def refresh_rtm_tasks_dict(self): ''' Builds a list of RTMTasks fetched from RTM ''' if not self.is_authenticated(): self.start_authentication() self.wait_for_authentication() | abfb6098ab297631b5a39657955ffc083742508d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/abfb6098ab297631b5a39657955ffc083742508d/backend_rtm.py | |
def create_new_rtm_task(self, title): | def create_new_rtm_task(self, title, transaction_ids = []): | def create_new_rtm_task(self, title): ''' Creates a new rtm task ''' result = self.rtm.tasks.add(timeline = self.timeline, name = title) rtm_task = RTMTask(result.list.taskseries.task, result.list.taskseries, result.list, self.rtm, self.timeline) #adding to the dict right away if hasattr(self, '_rtm_task_dict'): #if t... | abfb6098ab297631b5a39657955ffc083742508d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/abfb6098ab297631b5a39657955ffc083742508d/backend_rtm.py |
def set_title(self, title): | def set_title(self, title, transaction_ids = []): | def set_title(self, title): '''Sets the task title''' self.rtm.tasks.setName(timeline = self.timeline, list_id = self.rtm_list.id, taskseries_id = self.rtm_taskseries.id, task_id = self.rtm_task.id, name = title) | abfb6098ab297631b5a39657955ffc083742508d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/abfb6098ab297631b5a39657955ffc083742508d/backend_rtm.py |
self.rtm.tasks.setName(timeline = self.timeline, list_id = self.rtm_list.id, taskseries_id = self.rtm_taskseries.id, task_id = self.rtm_task.id, name = title) | title = cgi.escape(title) result = self.rtm.tasks.setName(timeline = self.timeline, list_id = self.rtm_list.id, taskseries_id = self.rtm_taskseries.id, task_id = self.rtm_task.id, name = title) transaction_ids.append(result.transaction.id) | def set_title(self, title): '''Sets the task title''' self.rtm.tasks.setName(timeline = self.timeline, list_id = self.rtm_list.id, taskseries_id = self.rtm_taskseries.id, task_id = self.rtm_task.id, name = title) | abfb6098ab297631b5a39657955ffc083742508d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/abfb6098ab297631b5a39657955ffc083742508d/backend_rtm.py |
def set_status(self, gtg_status): | def set_status(self, gtg_status, transaction_ids = []): | def set_status(self, gtg_status): '''Sets the task status, in GTG terminology''' status = GTG_TO_RTM_STATUS[gtg_status] if status == True: api_call = self.rtm.tasks.uncomplete else: api_call = self.rtm.tasks.complete api_call(timeline = self.timeline, list_id = self.rtm_list.id, taskseries_id = self.rtm_task... | abfb6098ab297631b5a39657955ffc083742508d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/abfb6098ab297631b5a39657955ffc083742508d/backend_rtm.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.