Import from old version does not preserve groups

Bug #531114 reported by Stephen Phillips
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-rdp (Ubuntu)
Fix Released
Undecided
James P Michels III

Bug Description

Binary package hint: gnome-rdp

In the experimental branch, the code that converts from the old database format to the new format does not preserve the groups. Instead it places all of the connections into one single group called "Default".

The attached patch attempts to fix this problem.

I blogged my procedure on how I created the patch:
http://linuxsagas.wordpress.com/2010/03/03/hacking-gnome-rdp/

Please let me know if either the patch or the code need to be changed.

Tags: patch
Revision history for this message
Stephen Phillips (stephen-kent-phillips) wrote :
Revision history for this message
James P Michels III (james-p-michels) wrote :

FWIW, the patch is backwards, but no worries. I'll commit this asap.

Thanks

Changed in gnome-rdp (Ubuntu):
assignee: nobody → James P Michels III (james-p-michels)
status: New → In Progress
Revision history for this message
Stephen Phillips (stephen-kent-phillips) wrote :

Thanks for pointing out that it is backwards. i am still getting the hang of the whole patch process. If it helps, I flipped the diff command around. Attached is the new patch.

Revision history for this message
James P Michels III (james-p-michels) wrote :

I've committed the changes with a few modifications.

I remove the groups member dictionary as this breaks thread safety in the Sqlite class for no gain.

I added a constructor to Session that takes a group parameter to eliminate the need to do a Create/Set/Use pattern in Sqlite.ImportSessions.

I modified Sqlite.LoadGroups class to always return a dictionary.

I reworked Sqlite.ImportSession changes to use the changes above.

Changed in gnome-rdp (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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