/[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.25 by pa4tu, Fri Dec 17 14:57:35 2004 UTC revision 1.26 by pa4tu, Sat Dec 18 13:22:40 2004 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.saveaslabels = 0;          preferences.saveaslabels = 0;
         preferences.shownr = 1;  
105  }  }
106    
107  void  void
# Line 702  parseloadpreferences (xmlDocPtr p, xmlNo Line 701  parseloadpreferences (xmlDocPtr p, xmlNo
701                          xmlFree (key);                          xmlFree (key);
702  #endif  #endif
703                  }                  }
                 else if ((!xmlStrcmp(cur->name, (const xmlChar *)"shownr")))  
                 {  
                         key = xmlNodeListGetString (p, cur->xmlChildrenNode, 1);  
                         preferences.shownr = atoi (key);  
 #ifdef WIN32  
                         free (key);  
 #else  
                         xmlFree (key);  
 #endif  
                 }  
704          cur = cur->next;          cur = cur->next;
705          }          }
706          return;          return;
# Line 1078  void parsesavepreferences (xmlNodePtr cu Line 1067  void parsesavepreferences (xmlNodePtr cu
1067                          xmlNodeSetContent (node, key);                          xmlNodeSetContent (node, key);
1068                          g_free (key);                          g_free (key);
1069                  }                  }
                 else if (!strcmp (node->name, "shownr"))  
                 {  
                         key = g_strdup_printf ("%d", preferences.shownr);  
                         xmlNodeSetContent (node, key);  
                         g_free (key);  
                 }  
1070          }          }
1071  }  }
1072    
# Line 1212  newsavepreferences (xmlNodePtr cur) Line 1195  newsavepreferences (xmlNodePtr cur)
1195          xmlNewTextChild (cur, NULL, "saveasadif", key);          xmlNewTextChild (cur, NULL, "saveasadif", key);
1196          key = g_strdup_printf ("%d", preferences.saveaslabels);          key = g_strdup_printf ("%d", preferences.saveaslabels);
1197          xmlNewTextChild (cur, NULL, "saveaslabels", key);          xmlNewTextChild (cur, NULL, "saveaslabels", key);
         key = g_strdup_printf ("%d", preferences.shownr);  
         xmlNewTextChild (cur, NULL, "shownr", key);  
1198          g_free (key);          g_free (key);
1199  }  }
1200    
# Line 1326  savepreferences (void) Line 1307  savepreferences (void)
1307                                  xmlNewTextChild (cur, NULL, "saveaslabels", key);                                  xmlNewTextChild (cur, NULL, "saveaslabels", key);
1308                                  g_free (key);                                  g_free (key);
1309                          }                          }
                         if (!newprefsfile && (preferences.version < 3))  
                         {        
                         /* introduced in xlog version 1.1 */  
                                 key = g_strdup_printf ("%d", preferences.shownr);  
                                 xmlNewTextChild (cur, NULL, "shownr", key);  
                                 g_free (key);  
                         }  
1310                  }                  }
1311                  cur = cur->next;                  cur = cur->next;
1312          }          }

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

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