GTG

Code review comment for lp:~huxuan/gtg/port-to-configparser

Revision history for this message
Izidor MatuĊĦov (izidor) wrote :

It works now for me. Another really important thing to consider is the backwards compatibility. Please, make sure that you can read the same config files as the old config parser.

Steps to reproduce bug:

1, Open GTG with old config parser
2, Open windows, change width of tag sidebar and other configuration
3, Quit GTG (CTRL + Q)
4, Copy tmp/ to GTG with the new parser
5, Launch it without any problem

I get the following tracebacks:

Traceback (most recent call last):
  File "/home/izidor/projects/gtg/trunk/GTG/gtk/browser/browser.py", line 671, in on_sidebar_toggled
    self.init_tags_sidebar()
  File "/home/izidor/projects/gtg/trunk/GTG/gtk/browser/browser.py", line 221, in init_tags_sidebar
    self.tagtreeview.expand_node(path)
  File "/usr/lib/python2.7/dist-packages/liblarch_gtk/__init__.py", line 227, in expand_node
    self.collapse_node(llpath,collapsing_method=self.expand_one_row)
  File "/usr/lib/python2.7/dist-packages/liblarch_gtk/__init__.py", line 246, in collapse_node
    node_id = llpath[-1].strip("'")
IndexError: tuple index out of range
Traceback (most recent call last):
  File "./gtg", line 89, in <module>
    main()
  File "./gtg", line 85, in main
    sys.exit(gtg.main(options, args))
  File "/home/izidor/projects/gtg/trunk/GTG/gtg.py", line 123, in main
    manager = Manager(req)
  File "/home/izidor/projects/gtg/trunk/GTG/gtk/manager.py", line 75, in __init__
    self.browser = TaskBrowser(self.req, self)
  File "/home/izidor/projects/gtg/trunk/GTG/gtk/browser/browser.py", line 125, in __init__
    self.restore_state_from_conf()
  File "/home/izidor/projects/gtg/trunk/GTG/gtk/browser/browser.py", line 521, in restore_state_from_conf
    self.vtree_panes['active'].collapse_node(path)
  File "/usr/lib/python2.7/dist-packages/liblarch_gtk/__init__.py", line 246, in collapse_node
    node_id = llpath[-1].strip("'")
IndexError: tuple index out of range

Old gtg.conf file:
[browser]
contents_preview_enable = False
bg_color_enable = True
width = 425
height = 400
max = False
x_pos = 458
y_pos = 188
tag_pane = True
sidebar_width = 151
closed_task_pane = False
bottom_pane_position = 300
toolbar = True
quick_add = True
tasklist_sort_column = 5
tasklist_sort_order = 1
collapsed_tasks = ,
view = default
opened_tasks = 0@1, 5@1
font_name =
expanded_tags = ,

[plugins]
disabled = not_today, tomboy, notification_area, task_reaper, send_email, bugzilla, export, hamster, geolocalized_tasks, urgency_color, untouched_tasks
enabled = ,

review: Needs Fixing

« Back to merge proposal