--- validate.old.c 2006-11-07 18:26:17.000000000 +0100 +++ validate.c 2007-05-29 20:04:16.000000000 +0200 @@ -158,20 +158,22 @@ "Database", "Dictionary", "Chart", "Email", "Finance", "FlowChart", "PDA", \ "ProjectManagement", "Presentation", "Spreadsheet", "WordProcessor", \ "2DGraphics", "VectorGraphics", "RasterGraphics", "3DGraphics", \ - "Scanning", "OCR", "Photography", "Viewer", "DesktopSettings", \ - "HardwareSettings", "PackageManager", "Dialup", "InstantMessaging", \ - "IRCClient", "FileTransfer", "HamRadio", "News", "P2P", "RemoteAccess", \ - "Telephony", "WebBrowser", "WebDevelopment", "Midi", "Mixer", "Sequencer", \ - "Tuner", "TV", "AudioVideoEditing", "Player", "Recorder", "DiscBurning", \ - "ActionGame", "AdventureGame", "ArcadeGame", "BoardGame", "BlocksGame", \ - "CardGame", "KidsGame", "LogicGame", "RolePlaying", "Simulation", \ + "Scanning", "OCR", "Photography", "Publishing", "Viewer", "DesktopSettings", \ + "HardwareSettings", "Printing", "PackageManager", "Dialup", "InstantMessaging", \ + "Chat", "IRCClient", "FileTransfer", "HamRadio", "News", "P2P", "RemoteAccess", \ + "Telephony", "TelephonyTools", "VideoConference", "WebBrowser", "WebDevelopment", \ + "Midi", "Mixer", "Sequencer", "Tuner", "TV", "AudioVideoEditing", "Player", "Recorder", + "DiscBurning", "ActionGame", "AdventureGame", "ArcadeGame", "BoardGame", \ + "BlocksGame", "CardGame", "KidsGame", "LogicGame", "RolePlaying", "Simulation", \ "SportsGame", "StrategyGame", "Art", "Construction", "Music", "Languages", \ - "Science", "Astronomy", "Biology", "Chemistry", "Geology", "Math", \ - "MedicalSoftware", "Physics", "Amusement", "Archiving", "Electronics", \ - "Emulator", "Engineering", "FileManager", "TerminalEmulator", \ - "Filesystem", "Monitor", "Security", "Accessibility", "Calculator", \ - "Clock", "TextEditor", "Core", "KDE", "GNOME", "GTK", "Qt", "Motif", \ - "Java", "ConsoleOnly" + "Science", "ArtificialIntelligence", "Astronomy", "Biology", "Chemistry", "ComputerScience", \ + "DataVisualization", "Economy", "Electricity", "Geography", "Geology", "Geoscience", \ + "History", "ImageProcessing", "Literature", "Math", "NumericalAnalysis", \ + "MedicalSoftware", "Physics", "Robotics", "Sports", "ParallelComputing", "Amusement", \ + "Archiving", "Compression", "Electronics", "Emulator", "Engineering", "FileTools", + "FileManager", "TerminalEmulator", "Filesystem", "Monitor", "Security", "Accessibility", \ + "Calculator", "Clock", "TextEditor", "Documentation", "Core", "KDE", "GNOME", "GTK", \ + "Qt", "Motif", "Java", "ConsoleOnly" #define RESERVED_CATEGORIES \ "Screensaver", "TrayIcon", "Applet", "Shell" @@ -453,34 +455,34 @@ void (*validate_type) (const char *value, const char *key, const char *locale, const char *filename, GnomeDesktopFile *df); gboolean deprecated; } key_table[] = { - { "Encoding", validate_string }, + { "Encoding", validate_string, TRUE }, /* 0.9.5: deprecated */ { "Version", validate_numeric }, { "Name", validate_localestring }, { "GenericName", validate_localestring }, { "Type", validate_string }, - { "FilePattern", validate_regexps }, + { "FilePattern", validate_regexps, TRUE }, /* 0.9.6: deprecated */ { "TryExec", validate_string }, { "NoDisplay", validate_boolean }, { "Comment", validate_localestring }, { "Exec", validate_string }, - { "Actions", validate_strings }, + { "Actions", validate_strings }, /* ? */ { "Icon", validate_string }, { "MiniIcon", validate_string, TRUE }, /* 0.9.4: deprecated */ { "Hidden", validate_boolean }, { "Path", validate_string }, { "Terminal", validate_boolean_or_01 }, { "TerminalOptions", validate_string, TRUE }, /* 0.9.4: deprecated */ - { "SwallowTitle", validate_localestring }, - { "SwallowExec", validate_string }, + { "SwallowTitle", validate_localestring, TRUE }, /* 0.9.5: deprecated */ + { "SwallowExec", validate_string, TRUE }, /* 0.9.5: deprecated */ { "MimeType", validate_regexps }, { "Patterns", validate_regexps, TRUE }, /* 0.9.4: deprecated */ { "DefaultApp", validate_string, TRUE }, /* 0.9.4: deprecated */ - { "Dev", validate_string }, - { "FSType", validate_string }, - { "MountPoint", validate_string }, - { "ReadOnly", validate_boolean_or_01 }, - { "UnmountIcon", validate_string }, - { "SortOrder", validate_strings /* FIXME: Also comma-separated */}, + { "Dev", validate_string }, /* 0.9.6: within KDE only */ + { "FSType", validate_string }, /* 0.9.6: within KDE only */ + { "MountPoint", validate_string }, /* 0.9.6: within KDE only */ + { "ReadOnly", validate_boolean_or_01 }, /* 0.9.6: within KDE only */ + { "UnmountIcon", validate_string }, /* 0.9.6: within KDE only */ + { "SortOrder", validate_strings, TRUE}, /* 0.9.6: deprecated */ { "URL", validate_string }, { "Categories", validate_categories }, { "OnlyShowIn", validate_only_show_in }, @@ -727,7 +729,8 @@ { const char *val; - if (gnome_desktop_file_get_raw (df, section, +#if 0 + if (gnome_desktop_file_get_raw (df, section, "Encoding", NULL, &val)) { @@ -735,10 +738,8 @@ strcmp (val, "Legacy-Mixed") != 0) print_fatal (filename, "unknown Encoding type \"%s\", should be one of \"UTF-8\", \"Legacy-Mixed\"\n", val); } - else - { - print_fatal (filename, "required key \"Encoding\" not found\n"); - } + else { print_fatal (filename, "required key \"Encoding\" not found\n"); } +#endif if (!gnome_desktop_file_get_raw (df, section, "Name", @@ -935,10 +936,11 @@ fix_encoding = FALSE; +#if 0 if (gnome_desktop_file_get_raw (df, NULL, "Encoding", NULL, &val)) - { + { if (strcmp (val, "UTF-8") != 0 && strcmp (val, "Legacy-Mixed") != 0) { @@ -974,6 +976,7 @@ break; } } +#endif /* Fix string lists to have a ';' at the end if they don't */ i = 0;