GTG

Plugin enabled list is not saved on reboot

Bug #578444 reported by ubuntu.diego
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
GTG
Fix Released
Medium
Marko Kevac

Bug Description

Every time I reboot, I need to set up (again and again and again) the Notification Area plugin.

Related branches

Revision history for this message
Luca Invernizzi (invernizzi) wrote :

Could you post here the content of ~/.config/gtg/gtg.conf (type "cat ~/.config/gtg/gtg.conf" in your terminal)?

Changed in gtg:
status: New → Incomplete
milestone: none → 0.3
Revision history for this message
ubuntu.diego (ubuntu-diego) wrote :

[browser]
x_pos = 103
collapsed_tags = ,
tag_pane_width = 250
height = 550
opened_tasks = ,
toolbar = True
quick_add = True
ctask_pane_height = 0
tag_pane = False
closed_task_pane = False
width = 700
collapsed_tasks = ,
bg_color_enable = True
y_pos = 88
view = default
tasklist_sort = 6, 0
[plugins]
disabled = tomboy, notification_area, hamster, task_reaper, helloworld, send_email, bugzilla, rtm_sync, export, evolution_sync, import_json, geolocalized_tasks
enabled = ,

I can see it is not in the enable section. And I could modify the file by hand (is that the solution to this problem?). However my point is that it should be done automatically.

Revision history for this message
Luca Invernizzi (invernizzi) wrote :

Of course it should be done automatically. I asked you that to see if it was a saving or loading problem.
Next questions: do you have write access to that file? if you disable a different plugin, is the file modified?

Revision history for this message
ubuntu.diego (ubuntu-diego) wrote :

I enabled "Closed task remover" and "Hello World" and the config file has not changed.
The permissions are OK

-rw-r--r-- 1 diego diego 472 2010-05-07 15:45 gtg.conf

Revision history for this message
Luca Invernizzi (invernizzi) wrote :

I noticed you talked about "reboots". Does this only happens when you reboot your system (while GTG is running), or every time you close gtg (by hand)?

Revision history for this message
Procrastinizer (allaboutgettingin) wrote :

I have the exact same problem with plugins.
For me, it only happens after reboot and not when i restart gtg

summary: - GTG "Notification area" plugin never gets set
+ Plugin enabled list is not saved on reboot
Changed in gtg:
status: Incomplete → Confirmed
importance: Undecided → Medium
Revision history for this message
ubuntu.diego (ubuntu-diego) wrote :

I guess, I got around the problem by
1) setting the plug-in configuration I want.
2) Quiting GTG (without login out).
3) restarting GTG.
4) Next time I rebooted GTG was with the previous set-up

the gtg.conf file is now correct.

Revision history for this message
valspok (valspok123) wrote :

I had the same problem. And this solution of turning off and on again worked for me as well.

Revision history for this message
Marko Kevac (mkevac) wrote :

When killed with SIGTERM, everything is fine, configuration is saved to file. When killed with SIGKILL configuration is not saved.

It makes sense, because SIGTERM is handled properly and SIGKILL cannot be handled at all.

I propose that we save configuration to file after OK/Apply button is pressed.

Changed in gtg:
assignee: nobody → Marko Kevac (mkevac)
Revision history for this message
Marko Kevac (mkevac) wrote :

In order to save config (do config.save_config()), config (which is instance of CoreConfig) must be available in PreferenceDialog(). Honestly, I think config should be available everywhere, and save_config() should be called whenever user pushes "Apply" or "OK", not only when GTG is closed.

What do you think?

Revision history for this message
Luca Invernizzi (invernizzi) wrote :

Yes, we can sync the configuration to file as you suggested, and that would solve the plugin issue.
However, that file (~/.config/gtg/gtg.conf also holds the UI state (e.g: if the tags pane is open).
Example: mine is

[browser]
x_pos = 58
collapsed_tags = ,
tag_pane_width = 260
height = 742
opened_tasks = ,
toolbar = True
quick_add = True
ctask_pane_height = 395
tag_pane = True
closed_task_pane = False
width = 1220
collapsed_tasks = ,
bg_color_enable = True
y_pos = 26
view = default
tasklist_sort = 3, 0
[plugins]
disabled = notification_area, import_json, task_reaper, bugzilla, geolocalized_tasks
enabled = tomboy, helloworld, send_email, rtm_sync, export, hamster, evolution_sync
[geolocalized-tasks]
proximity_factor = 5
location_determination_method = cellphone,

And it would be nice to have that always saved on gtg closing.

About the signals:
Why does GTG is still alive when the KILL signal arrives? That bugs me. Is it receiving something else (INT, maybe?)? I thing TERM and KILL are sent at shutdown, but we might check that.

Revision history for this message
Luca Invernizzi (invernizzi) wrote :

I didn't see your last message :)
 A nice thing to do would be to make CoreConfig a Borg or a Singleton.
If you're interested in doing that, most of the code is already in lp:~gtg-user/gtg/multi-backends__invernizzi_gsoc/ (have a look at GTG/backends/__init__.py ).
That way, you could import it easily and save the configuration.

Another way would be issuing a signal "save-configuration" that CoreConfig would catch. I prefer the first option, because there are no guarantees that a signal handler will be executed in a timely fashion.

PS: I assume you know what I'm talking about. If not, feel free to ask.

Revision history for this message
Marko Kevac (mkevac) wrote :

Proposed fix for merging.

It is not ideal, but works.

I am providing config object to Preferences class and than saving config after preferences window is closed.

Changed in gtg:
status: Confirmed → Fix Committed
Changed in gtg:
milestone: 0.3 → 0.2.9
Izidor Matušov (izidor)
Changed in gtg:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.