Switch config object from HashMap to TreeMap to avoid random sorting in config file

This commit is contained in:
Olaf Schulz 2011-10-21 00:45:41 +02:00
parent a24378b3dd
commit 272eae3d26
2 changed files with 7 additions and 7 deletions

View File

@ -2,12 +2,12 @@
namespace NeoLayoutViewer{
public class ConfigManager {
public Gee.HashMap<string,string> config;
private Gee.HashMap<string,string> description;// allow optional commenting config entrys.
public Gee.Map<string,string> config;
private Gee.Map<string,string> description;// allow optional commenting config entrys.
public ConfigManager(string conffile) {
this.config = new Gee.HashMap<string, string>();
this.description = new Gee.HashMap<string, string>();
this.config = new Gee.TreeMap<string, string>();
this.description = new Gee.TreeMap<string, string>();
//add defaults values, if key not set in the config file
add_defaults();
@ -22,7 +22,7 @@ namespace NeoLayoutViewer{
add_intern_values();
}
public Gee.HashMap<string, string> getConfig(){
public Gee.Map<string, string> getConfig(){
return config;
}

View File

@ -34,7 +34,7 @@ namespace NeoLayoutViewer{
public Gtk.Label status;
private Gdk.Pixbuf[] image_buffer;
public Gee.List<Modkey> modifier_key_images; // for modifier which didn't toggle a layout layer. I.e. ctrl, alt.
public Gee.HashMap<string, string> config;
public Gee.Map<string, string> config;
public int layer;
public int[] active_modifier_by_keyboard;
@ -106,7 +106,7 @@ namespace NeoLayoutViewer{
{ {0, 0} , {1, 1} } }//1100, 1101; 1110, 1111; //k=m=1 should be impossible
};
public NeoWindow (string slayer, Gee.HashMap<string, string> config) {
public NeoWindow (string slayer, Gee.Map<string, string> config) {
this.config = config;
this.minimized = true;