/[xlog]/xlog/src/preferences.c
ViewVC logotype

Diff of /xlog/src/preferences.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.26 by pa4tu, Sat Dec 18 13:22:40 2004 UTC revision 1.27 by pa4tu, Wed Jan 26 18:48:46 2005 UTC
# Line 101  static void make_default_preferences (vo Line 101  static void make_default_preferences (vo
101          preferences.b4width = 500;          preferences.b4width = 500;
102          preferences.b4height = 300;          preferences.b4height = 300;
103          preferences.saveasadif = 0;          preferences.saveasadif = 0;
104          preferences.saveaslabels = 0;          preferences.saveastsv = g_strdup ("1,1,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0");
105  }  }
106    
107  void  void
# Line 691  parseloadpreferences (xmlDocPtr p, xmlNo Line 691  parseloadpreferences (xmlDocPtr p, xmlNo
691                          xmlFree (key);                          xmlFree (key);
692  #endif  #endif
693                  }                  }
694                  else if ((!xmlStrcmp(cur->name, (const xmlChar *)"saveaslabels")))                  else if ((!xmlStrcmp(cur->name, (const xmlChar *)"saveastsv")))
695                  {                  {
696                          key = xmlNodeListGetString (p, cur->xmlChildrenNode, 1);                          key = xmlNodeListGetString (p, cur->xmlChildrenNode, 1);
697                          preferences.saveaslabels = atoi (key);                          preferences.saveastsv = g_strdup (key);
698  #ifdef WIN32  #ifdef WIN32
699                          free (key);                          free (key);
700  #else  #else
# Line 1061  void parsesavepreferences (xmlNodePtr cu Line 1061  void parsesavepreferences (xmlNodePtr cu
1061                          xmlNodeSetContent (node, key);                          xmlNodeSetContent (node, key);
1062                          g_free (key);                          g_free (key);
1063                  }                  }
1064                  else if (!strcmp (node->name, "saveaslabels"))                  else if (!strcmp (node->name, "saveastsv"))
1065                  {                  {
1066                          key = g_strdup_printf ("%d", preferences.saveaslabels);                          key = g_strdup_printf ("%s", preferences.saveastsv);
1067                          xmlNodeSetContent (node, key);                          xmlNodeSetContent (node, key);
1068                          g_free (key);                          g_free (key);
1069                  }                  }
# Line 1193  newsavepreferences (xmlNodePtr cur) Line 1193  newsavepreferences (xmlNodePtr cur)
1193          xmlNewTextChild (cur, NULL, "b4height", key);          xmlNewTextChild (cur, NULL, "b4height", key);
1194          key = g_strdup_printf ("%d", preferences.saveasadif);          key = g_strdup_printf ("%d", preferences.saveasadif);
1195          xmlNewTextChild (cur, NULL, "saveasadif", key);          xmlNewTextChild (cur, NULL, "saveasadif", key);
1196          key = g_strdup_printf ("%d", preferences.saveaslabels);          key = g_strdup_printf ("%s", preferences.saveastsv);
1197          xmlNewTextChild (cur, NULL, "saveaslabels", key);          xmlNewTextChild (cur, NULL, "saveastsv", key);
1198          g_free (key);          g_free (key);
1199  }  }
1200    
# Line 1303  savepreferences (void) Line 1303  savepreferences (void)
1303                          /* introduced in xlog version 0.9.10 */                          /* introduced in xlog version 0.9.10 */
1304                                  key = g_strdup_printf ("%d", preferences.saveasadif);                                  key = g_strdup_printf ("%d", preferences.saveasadif);
1305                                  xmlNewTextChild (cur, NULL, "saveasadif", key);                                  xmlNewTextChild (cur, NULL, "saveasadif", key);
1306                                  key = g_strdup_printf ("%d", preferences.saveaslabels);                                  g_free (key);
1307                                  xmlNewTextChild (cur, NULL, "saveaslabels", key);                          }
1308                            if (!newprefsfile && (preferences.version < 3))
1309                            {      
1310                            /* introduced in xlog version 1.01 */
1311                                    key = g_strdup_printf ("%s", preferences.saveastsv);
1312                                    xmlNewTextChild (cur, NULL, "saveastsv", key);
1313                                  g_free (key);                                  g_free (key);
1314                          }                          }
1315                  }                  }

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26