/[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.29 by pa4tu, Thu Jan 27 16:33:15 2005 UTC revision 1.30 by pa4tu, Mon Feb 14 18:50:23 2005 UTC
# Line 102  static void make_default_preferences (vo Line 102  static void make_default_preferences (vo
102          preferences.b4height = 300;          preferences.b4height = 300;
103          preferences.saveasadif = 0;          preferences.saveasadif = 0;
104          preferences.saveastsv = g_strdup ("1,1,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0");          preferences.saveastsv = g_strdup ("1,1,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0");
105            preferences.handlebarpos = 300;
106  }  }
107    
108  void  void
# Line 701  parseloadpreferences (xmlDocPtr p, xmlNo Line 702  parseloadpreferences (xmlDocPtr p, xmlNo
702                          xmlFree (key);                          xmlFree (key);
703  #endif  #endif
704                  }                  }
705                    else if ((!xmlStrcmp(cur->name, (const xmlChar *)"handlebarpos")))
706                    {
707                            key = xmlNodeListGetString (p, cur->xmlChildrenNode, 1);
708                            preferences.handlebarpos = atoi (key);
709    #ifdef WIN32
710                            free (key);
711    #else
712                            xmlFree (key);
713    #endif
714                    }
715          cur = cur->next;          cur = cur->next;
716          }          }
717          return;          return;
# Line 1067  void parsesavepreferences (xmlNodePtr cu Line 1078  void parsesavepreferences (xmlNodePtr cu
1078                          xmlNodeSetContent (node, key);                          xmlNodeSetContent (node, key);
1079                          g_free (key);                          g_free (key);
1080                  }                  }
1081                    else if (!strcmp (node->name, "handlebarpos"))
1082                    {
1083                            key = g_strdup_printf ("%d", preferences.handlebarpos);
1084                            xmlNodeSetContent (node, key);
1085                            g_free (key);
1086                    }
1087          }          }
1088  }  }
1089    
# Line 1195  newsavepreferences (xmlNodePtr cur) Line 1212  newsavepreferences (xmlNodePtr cur)
1212          xmlNewTextChild (cur, NULL, "saveasadif", key);          xmlNewTextChild (cur, NULL, "saveasadif", key);
1213          key = g_strdup_printf ("%s", preferences.saveastsv);          key = g_strdup_printf ("%s", preferences.saveastsv);
1214          xmlNewTextChild (cur, NULL, "saveastsv", key);          xmlNewTextChild (cur, NULL, "saveastsv", key);
1215            key = g_strdup_printf ("%d", preferences.handlebarpos);
1216            xmlNewTextChild (cur, NULL, "handlebarpos", key);
1217          g_free (key);          g_free (key);
1218  }  }
1219    
# Line 1310  savepreferences (void) Line 1329  savepreferences (void)
1329                          /* introduced in xlog version 1.1 */                          /* introduced in xlog version 1.1 */
1330                                  key = g_strdup_printf ("%s", preferences.saveastsv);                                  key = g_strdup_printf ("%s", preferences.saveastsv);
1331                                  xmlNewTextChild (cur, NULL, "saveastsv", key);                                  xmlNewTextChild (cur, NULL, "saveastsv", key);
1332                                    key = g_strdup_printf ("%d", preferences.handlebarpos);
1333                                    xmlNewTextChild (cur, NULL, "handlebarpos", key);
1334                                  g_free (key);                                  g_free (key);
1335                          }                          }
1336                  }                  }

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

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