Want more features on Pastebin? Sign Up, it's FREE!
Guest

Implemented Flags in Tag Table

By: a guest on Jul 3rd, 2010  |  syntax: Diff  |  size: 22.41 KB  |  views: 97  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Index: utils/themeeditor/models/parsetreenode.cpp
  2. ===================================================================
  3. --- utils/themeeditor/models/parsetreenode.cpp  (revision 27267)
  4. +++ utils/themeeditor/models/parsetreenode.cpp  (working copy)
  5. @@ -31,6 +31,7 @@
  6.  #include <iostream>
  7.  
  8.  int ParseTreeNode::openConditionals = 0;
  9. +bool ParseTreeNode::breakFlag = false;
  10.  
  11.  /* Root element constructor */
  12.  ParseTreeNode::ParseTreeNode(struct skin_element* data)
  13. @@ -520,8 +521,11 @@
  14.      {
  15.          for(int i = 0; i < children.count(); i++)
  16.              children[i]->render(info, viewport);
  17. -        if(!noBreak)
  18. +        if(!noBreak && !breakFlag)
  19.              viewport->newLine();
  20. +
  21. +        if(breakFlag)
  22. +            breakFlag = false;
  23.      }
  24.      else if(element->type == TEXT)
  25.      {
  26. @@ -531,6 +535,8 @@
  27.      {
  28.          if(!execTag(info, viewport))
  29.              viewport->write(evalTag(info).toString());
  30. +        if(element->tag->flags & NOBREAK)
  31. +            breakFlag = true;
  32.      }
  33.      else if(element->type == CONDITIONAL)
  34.      {
  35. Index: utils/themeeditor/models/parsetreenode.h
  36. ===================================================================
  37. --- utils/themeeditor/models/parsetreenode.h    (revision 27267)
  38. +++ utils/themeeditor/models/parsetreenode.h    (working copy)
  39. @@ -79,6 +79,7 @@
  40.      QList<ParseTreeNode*> children;
  41.  
  42.      static int openConditionals;
  43. +    static bool breakFlag;
  44.      QGraphicsItem* rendered;
  45.  
  46.  };
  47. Index: lib/skin_parser/skin_parser.c
  48. ===================================================================
  49. --- lib/skin_parser/skin_parser.c       (revision 27267)
  50. +++ lib/skin_parser/skin_parser.c       (working copy)
  51. @@ -459,21 +459,9 @@
  52.          return 1;
  53.      }
  54.  
  55. -    /* Eating a newline if necessary */
  56. -    if(tag_args[0] == '\n')
  57. -    {
  58. -        while (*cursor && *cursor != '\n')
  59. -            cursor++;
  60. -        if (*cursor)
  61. -            cursor++;
  62. -        skin_line++;
  63. -        *document = cursor;
  64. -        return 1;
  65. -    }
  66.  
  67.      /* Checking the number of arguments and allocating args */
  68. -    if(*cursor != ARGLISTOPENSYM && tag_args[0] != '|'
  69. -       && tag_args[0] != '\n')
  70. +    if(*cursor != ARGLISTOPENSYM && tag_args[0] != '|')
  71.      {
  72.          skin_error(ARGLIST_EXPECTED);
  73.          return 0;
  74. @@ -521,7 +509,7 @@
  75.      for(i = 0; i < num_args; i++)
  76.      {
  77.          /* Making sure we haven't run out of arguments */
  78. -        if(*tag_args == '\0' || *tag_args == '\n')
  79. +        if(*tag_args == '\0')
  80.          {
  81.              skin_error(TOO_MANY_ARGS);
  82.              return 0;
  83. @@ -620,27 +608,11 @@
  84.      }
  85.  
  86.      /* Checking for a premature end */
  87. -    if(*tag_args != '\0' && *tag_args != '\n' && !optional)
  88. +    if(*tag_args != '\0' && !optional)
  89.      {
  90.          skin_error(INSUFFICIENT_ARGS);
  91.          return 0;
  92.      }
  93. -
  94. -    if(*tag_args == '\n')
  95. -    {
  96. -        while (*cursor && *cursor != '\n')
  97. -            cursor++;
  98. -        if (*cursor)
  99. -            cursor++;
  100. -        skin_line++;
  101. -    }
  102. -
  103. -    if((strcmp(tag->name, "Vf") == 0 || strcmp(tag->name, "Vb") == 0)
  104. -        && *cursor == '\n' && skin_line == viewport_line)
  105. -    {
  106. -        cursor++;
  107. -        skin_line++;
  108. -    }
  109.      
  110.      *document = cursor;
  111.  
  112. Index: lib/skin_parser/tag_table.c
  113. ===================================================================
  114. --- lib/skin_parser/tag_table.c (revision 27267)
  115. +++ lib/skin_parser/tag_table.c (working copy)
  116. @@ -26,191 +26,191 @@
  117.  /* The tag definition table */
  118.  struct tag_info legal_tags[] =
  119.  {
  120. -    { SKIN_TOKEN_ALIGN_CENTER,          "ac", "" },
  121. -    { SKIN_TOKEN_ALIGN_LEFT,            "al", "" },
  122. -    { SKIN_TOKEN_ALIGN_LEFT_RTL,        "aL", "" },
  123. -    { SKIN_TOKEN_ALIGN_RIGHT,           "ar", "" },
  124. -    { SKIN_TOKEN_ALIGN_RIGHT_RTL,       "aR", "" },
  125. -    { SKIN_TOKEN_ALIGN_LANGDIRECTION,   "ax", "" },
  126. +    { SKIN_TOKEN_ALIGN_CENTER,          "ac", "", NOFLAGS },
  127. +    { SKIN_TOKEN_ALIGN_LEFT,            "al", "", NOFLAGS },
  128. +    { SKIN_TOKEN_ALIGN_LEFT_RTL,        "aL", "", NOFLAGS },
  129. +    { SKIN_TOKEN_ALIGN_RIGHT,           "ar", "", NOFLAGS },
  130. +    { SKIN_TOKEN_ALIGN_RIGHT_RTL,       "aR", "", NOFLAGS },
  131. +    { SKIN_TOKEN_ALIGN_LANGDIRECTION,   "ax", "", NOFLAGS },
  132.      
  133. -    { SKIN_TOKEN_BATTERY_PERCENT,       "bl" , BAR_PARAMS },
  134. -    { SKIN_TOKEN_BATTERY_VOLTS,         "bv", "" },
  135. -    { SKIN_TOKEN_BATTERY_TIME,          "bt", "" },
  136. -    { SKIN_TOKEN_BATTERY_SLEEPTIME,     "bs", "" },
  137. -    { SKIN_TOKEN_BATTERY_CHARGING,      "bc", "" },
  138. -    { SKIN_TOKEN_BATTERY_CHARGER_CONNECTED, "bp", "" },
  139. -    { SKIN_TOKEN_USB_POWERED,           "bu", "" },
  140. +    { SKIN_TOKEN_BATTERY_PERCENT,       "bl" , BAR_PARAMS, NOFLAGS },
  141. +    { SKIN_TOKEN_BATTERY_VOLTS,         "bv", "", NOFLAGS },
  142. +    { SKIN_TOKEN_BATTERY_TIME,          "bt", "", NOFLAGS },
  143. +    { SKIN_TOKEN_BATTERY_SLEEPTIME,     "bs", "", NOFLAGS },
  144. +    { SKIN_TOKEN_BATTERY_CHARGING,      "bc", "", NOFLAGS },
  145. +    { SKIN_TOKEN_BATTERY_CHARGER_CONNECTED, "bp", "", NOFLAGS },
  146. +    { SKIN_TOKEN_USB_POWERED,           "bu", "", NOFLAGS },
  147.      
  148.      
  149. -    { SKIN_TOKEN_RTC_PRESENT,           "cc", "" },
  150. -    { SKIN_TOKEN_RTC_DAY_OF_MONTH,      "cd", "" },
  151. -    { SKIN_TOKEN_RTC_DAY_OF_MONTH_BLANK_PADDED, "ce", "" },
  152. -    { SKIN_TOKEN_RTC_12HOUR_CFG,        "cf", "" },
  153. -    { SKIN_TOKEN_RTC_HOUR_24_ZERO_PADDED, "cH", "" },
  154. -    { SKIN_TOKEN_RTC_HOUR_24,           "ck", "" },
  155. -    { SKIN_TOKEN_RTC_HOUR_12_ZERO_PADDED, "cI", "" },
  156. -    { SKIN_TOKEN_RTC_HOUR_12,           "cl", "" },
  157. -    { SKIN_TOKEN_RTC_MONTH,             "cm", "" },
  158. -    { SKIN_TOKEN_RTC_MINUTE,            "cM", "" },
  159. -    { SKIN_TOKEN_RTC_SECOND,            "cS", "" },
  160. -    { SKIN_TOKEN_RTC_YEAR_2_DIGITS,     "cy", "" },
  161. -    { SKIN_TOKEN_RTC_YEAR_4_DIGITS,     "cY", "" },
  162. -    { SKIN_TOKEN_RTC_AM_PM_UPPER,       "cP", "" },
  163. -    { SKIN_TOKEN_RTC_AM_PM_LOWER,       "cp", "" },
  164. -    { SKIN_TOKEN_RTC_WEEKDAY_NAME,      "ca", "" },
  165. -    { SKIN_TOKEN_RTC_MONTH_NAME,        "cb", "" },
  166. -    { SKIN_TOKEN_RTC_DAY_OF_WEEK_START_MON, "cu", "" },
  167. -    { SKIN_TOKEN_RTC_DAY_OF_WEEK_START_SUN, "cw", "" },
  168. +    { SKIN_TOKEN_RTC_PRESENT,           "cc", "", NOFLAGS },
  169. +    { SKIN_TOKEN_RTC_DAY_OF_MONTH,      "cd", "", NOFLAGS },
  170. +    { SKIN_TOKEN_RTC_DAY_OF_MONTH_BLANK_PADDED, "ce", "", NOFLAGS },
  171. +    { SKIN_TOKEN_RTC_12HOUR_CFG,        "cf", "", NOFLAGS },
  172. +    { SKIN_TOKEN_RTC_HOUR_24_ZERO_PADDED, "cH", "", NOFLAGS },
  173. +    { SKIN_TOKEN_RTC_HOUR_24,           "ck", "", NOFLAGS },
  174. +    { SKIN_TOKEN_RTC_HOUR_12_ZERO_PADDED, "cI", "", NOFLAGS },
  175. +    { SKIN_TOKEN_RTC_HOUR_12,           "cl", "", NOFLAGS },
  176. +    { SKIN_TOKEN_RTC_MONTH,             "cm", "", NOFLAGS },
  177. +    { SKIN_TOKEN_RTC_MINUTE,            "cM", "", NOFLAGS },
  178. +    { SKIN_TOKEN_RTC_SECOND,            "cS", "", NOFLAGS },
  179. +    { SKIN_TOKEN_RTC_YEAR_2_DIGITS,     "cy", "", NOFLAGS },
  180. +    { SKIN_TOKEN_RTC_YEAR_4_DIGITS,     "cY", "", NOFLAGS },
  181. +    { SKIN_TOKEN_RTC_AM_PM_UPPER,       "cP", "", NOFLAGS },
  182. +    { SKIN_TOKEN_RTC_AM_PM_LOWER,       "cp", "", NOFLAGS },
  183. +    { SKIN_TOKEN_RTC_WEEKDAY_NAME,      "ca", "", NOFLAGS },
  184. +    { SKIN_TOKEN_RTC_MONTH_NAME,        "cb", "", NOFLAGS },
  185. +    { SKIN_TOKEN_RTC_DAY_OF_WEEK_START_MON, "cu", "", NOFLAGS },
  186. +    { SKIN_TOKEN_RTC_DAY_OF_WEEK_START_SUN, "cw", "", NOFLAGS },
  187.          
  188. -    { SKIN_TOKEN_FILE_BITRATE,          "fb", "" },
  189. -    { SKIN_TOKEN_FILE_CODEC,            "fc", "" },
  190. -    { SKIN_TOKEN_FILE_FREQUENCY,        "ff", "" },
  191. -    { SKIN_TOKEN_FILE_FREQUENCY_KHZ,    "fk", "" },
  192. -    { SKIN_TOKEN_FILE_NAME_WITH_EXTENSION,  "fm", "" },
  193. -    { SKIN_TOKEN_FILE_NAME,             "fn", "" },
  194. -    { SKIN_TOKEN_FILE_PATH,             "fp", "" },
  195. -    { SKIN_TOKEN_FILE_SIZE,             "fs", "" },
  196. -    { SKIN_TOKEN_FILE_VBR,              "fv", "" },
  197. -    { SKIN_TOKEN_FILE_DIRECTORY,        "d"  , "I" },
  198. +    { SKIN_TOKEN_FILE_BITRATE,          "fb", "", NOFLAGS },
  199. +    { SKIN_TOKEN_FILE_CODEC,            "fc", "", NOFLAGS },
  200. +    { SKIN_TOKEN_FILE_FREQUENCY,        "ff", "", NOFLAGS },
  201. +    { SKIN_TOKEN_FILE_FREQUENCY_KHZ,    "fk", "", NOFLAGS },
  202. +    { SKIN_TOKEN_FILE_NAME_WITH_EXTENSION,  "fm", "", NOFLAGS },
  203. +    { SKIN_TOKEN_FILE_NAME,             "fn", "", NOFLAGS },
  204. +    { SKIN_TOKEN_FILE_PATH,             "fp", "", NOFLAGS },
  205. +    { SKIN_TOKEN_FILE_SIZE,             "fs", "", NOFLAGS },
  206. +    { SKIN_TOKEN_FILE_VBR,              "fv", "", NOFLAGS },
  207. +    { SKIN_TOKEN_FILE_DIRECTORY,        "d"  , "I", NOFLAGS },
  208.      
  209. -    { SKIN_TOKEN_FILE_BITRATE,          "Fb", "" },
  210. -    { SKIN_TOKEN_FILE_CODEC,            "Fc", "" },
  211. -    { SKIN_TOKEN_FILE_FREQUENCY,        "Ff", "" },
  212. -    { SKIN_TOKEN_FILE_FREQUENCY_KHZ,    "Fk", "" },
  213. -    { SKIN_TOKEN_FILE_NAME_WITH_EXTENSION,  "Fm", "" },
  214. -    { SKIN_TOKEN_FILE_NAME,             "Fn", "" },
  215. -    { SKIN_TOKEN_FILE_PATH,             "Fp", "" },
  216. -    { SKIN_TOKEN_FILE_SIZE,             "Fs", "" },
  217. -    { SKIN_TOKEN_FILE_VBR,              "Fv", "" },
  218. -    { SKIN_TOKEN_FILE_DIRECTORY,        "D"  , "I" },
  219. +    { SKIN_TOKEN_FILE_BITRATE,          "Fb", "", NOFLAGS },
  220. +    { SKIN_TOKEN_FILE_CODEC,            "Fc", "", NOFLAGS },
  221. +    { SKIN_TOKEN_FILE_FREQUENCY,        "Ff", "", NOFLAGS },
  222. +    { SKIN_TOKEN_FILE_FREQUENCY_KHZ,    "Fk", "", NOFLAGS },
  223. +    { SKIN_TOKEN_FILE_NAME_WITH_EXTENSION,  "Fm", "", NOFLAGS },
  224. +    { SKIN_TOKEN_FILE_NAME,             "Fn", "", NOFLAGS },
  225. +    { SKIN_TOKEN_FILE_PATH,             "Fp", "", NOFLAGS },
  226. +    { SKIN_TOKEN_FILE_SIZE,             "Fs", "", NOFLAGS },
  227. +    { SKIN_TOKEN_FILE_VBR,              "Fv", "", NOFLAGS },
  228. +    { SKIN_TOKEN_FILE_DIRECTORY,        "D"  , "I", NOFLAGS },
  229.      
  230.      
  231. -    { SKIN_TOKEN_METADATA_ARTIST,       "ia", "" },
  232. -    { SKIN_TOKEN_METADATA_COMPOSER,     "ic", "" },
  233. -    { SKIN_TOKEN_METADATA_ALBUM,        "id", "" },
  234. -    { SKIN_TOKEN_METADATA_ALBUM_ARTIST, "iA", "" },
  235. -    { SKIN_TOKEN_METADATA_GROUPING,     "iG", "" },
  236. -    { SKIN_TOKEN_METADATA_GENRE,        "ig", "" },
  237. -    { SKIN_TOKEN_METADATA_DISC_NUMBER,  "ik", "" },
  238. -    { SKIN_TOKEN_METADATA_TRACK_NUMBER, "in", "" },
  239. -    { SKIN_TOKEN_METADATA_TRACK_TITLE,  "it", "" },
  240. -    { SKIN_TOKEN_METADATA_VERSION,      "iv", "" },
  241. -    { SKIN_TOKEN_METADATA_YEAR,         "iy", "" },
  242. -    { SKIN_TOKEN_METADATA_COMMENT,      "iC", "" },
  243. +    { SKIN_TOKEN_METADATA_ARTIST,       "ia", "", NOFLAGS },
  244. +    { SKIN_TOKEN_METADATA_COMPOSER,     "ic", "", NOFLAGS },
  245. +    { SKIN_TOKEN_METADATA_ALBUM,        "id", "", NOFLAGS },
  246. +    { SKIN_TOKEN_METADATA_ALBUM_ARTIST, "iA", "", NOFLAGS },
  247. +    { SKIN_TOKEN_METADATA_GROUPING,     "iG", "", NOFLAGS },
  248. +    { SKIN_TOKEN_METADATA_GENRE,        "ig", "", NOFLAGS },
  249. +    { SKIN_TOKEN_METADATA_DISC_NUMBER,  "ik", "", NOFLAGS },
  250. +    { SKIN_TOKEN_METADATA_TRACK_NUMBER, "in", "", NOFLAGS },
  251. +    { SKIN_TOKEN_METADATA_TRACK_TITLE,  "it", "", NOFLAGS },
  252. +    { SKIN_TOKEN_METADATA_VERSION,      "iv", "", NOFLAGS },
  253. +    { SKIN_TOKEN_METADATA_YEAR,         "iy", "", NOFLAGS },
  254. +    { SKIN_TOKEN_METADATA_COMMENT,      "iC", "", NOFLAGS },
  255.      
  256. -    { SKIN_TOKEN_METADATA_ARTIST,       "Ia", "" },
  257. -    { SKIN_TOKEN_METADATA_COMPOSER,     "Ic", "" },
  258. -    { SKIN_TOKEN_METADATA_ALBUM,        "Id", "" },
  259. -    { SKIN_TOKEN_METADATA_ALBUM_ARTIST, "IA", "" },
  260. -    { SKIN_TOKEN_METADATA_GROUPING,     "IG", "" },
  261. -    { SKIN_TOKEN_METADATA_GENRE,        "Ig", "" },
  262. -    { SKIN_TOKEN_METADATA_DISC_NUMBER,  "Ik", "" },
  263. -    { SKIN_TOKEN_METADATA_TRACK_NUMBER, "In", "" },
  264. -    { SKIN_TOKEN_METADATA_TRACK_TITLE,  "It", "" },
  265. -    { SKIN_TOKEN_METADATA_VERSION,      "Iv", "" },
  266. -    { SKIN_TOKEN_METADATA_YEAR,         "Iy", "" },
  267. -    { SKIN_TOKEN_METADATA_COMMENT,      "IC", "" },
  268. +    { SKIN_TOKEN_METADATA_ARTIST,       "Ia", "", NOFLAGS },
  269. +    { SKIN_TOKEN_METADATA_COMPOSER,     "Ic", "", NOFLAGS },
  270. +    { SKIN_TOKEN_METADATA_ALBUM,        "Id", "", NOFLAGS },
  271. +    { SKIN_TOKEN_METADATA_ALBUM_ARTIST, "IA", "", NOFLAGS },
  272. +    { SKIN_TOKEN_METADATA_GROUPING,     "IG", "", NOFLAGS },
  273. +    { SKIN_TOKEN_METADATA_GENRE,        "Ig", "", NOFLAGS },
  274. +    { SKIN_TOKEN_METADATA_DISC_NUMBER,  "Ik", "", NOFLAGS },
  275. +    { SKIN_TOKEN_METADATA_TRACK_NUMBER, "In", "", NOFLAGS },
  276. +    { SKIN_TOKEN_METADATA_TRACK_TITLE,  "It", "", NOFLAGS },
  277. +    { SKIN_TOKEN_METADATA_VERSION,      "Iv", "", NOFLAGS },
  278. +    { SKIN_TOKEN_METADATA_YEAR,         "Iy", "", NOFLAGS },
  279. +    { SKIN_TOKEN_METADATA_COMMENT,      "IC", "", NOFLAGS },
  280.      
  281. -    { SKIN_TOKEN_SOUND_PITCH,           "Sp", "" },
  282. -    { SKIN_TOKEN_SOUND_SPEED,           "Ss", "" },
  283. +    { SKIN_TOKEN_SOUND_PITCH,           "Sp", "", NOFLAGS },
  284. +    { SKIN_TOKEN_SOUND_SPEED,           "Ss", "", NOFLAGS },
  285.      
  286. -    { SKIN_TOKEN_VLED_HDD,              "lh", "" },
  287. +    { SKIN_TOKEN_VLED_HDD,              "lh", "", NOFLAGS },
  288.      
  289. -    { SKIN_TOKEN_MAIN_HOLD,             "mh", "" },
  290. -    { SKIN_TOKEN_REMOTE_HOLD,           "mr", "" },
  291. -    { SKIN_TOKEN_REPEAT_MODE,           "mm", "" },
  292. -    { SKIN_TOKEN_PLAYBACK_STATUS,       "mp", "" },
  293. -    { SKIN_TOKEN_BUTTON_VOLUME,         "mv", "|S" },
  294. +    { SKIN_TOKEN_MAIN_HOLD,             "mh", "", NOFLAGS },
  295. +    { SKIN_TOKEN_REMOTE_HOLD,           "mr", "", NOFLAGS },
  296. +    { SKIN_TOKEN_REPEAT_MODE,           "mm", "", NOFLAGS },
  297. +    { SKIN_TOKEN_PLAYBACK_STATUS,       "mp", "", NOFLAGS },
  298. +    { SKIN_TOKEN_BUTTON_VOLUME,         "mv", "|S", NOFLAGS },
  299.      
  300. -    { SKIN_TOKEN_PEAKMETER,             "pm", "" },
  301. -    { SKIN_TOKEN_PLAYER_PROGRESSBAR,    "pf", "" },
  302. -    { SKIN_TOKEN_PROGRESSBAR,           "pb" , "*|iiiis" },
  303. -    { SKIN_TOKEN_VOLUME,                "pv" , BAR_PARAMS },
  304. +    { SKIN_TOKEN_PEAKMETER,             "pm", "", NOFLAGS },
  305. +    { SKIN_TOKEN_PLAYER_PROGRESSBAR,    "pf", "", NOFLAGS },
  306. +    { SKIN_TOKEN_PROGRESSBAR,           "pb" , "*|iiiis", NOFLAGS },
  307. +    { SKIN_TOKEN_VOLUME,                "pv" , BAR_PARAMS, NOFLAGS },
  308.      
  309. -    { SKIN_TOKEN_TRACK_ELAPSED_PERCENT, "px", "" },
  310. -    { SKIN_TOKEN_TRACK_TIME_ELAPSED,    "pc", "" },
  311. -    { SKIN_TOKEN_TRACK_TIME_REMAINING,  "pr", "" },
  312. -    { SKIN_TOKEN_TRACK_LENGTH,          "pt", "" },
  313. -    { SKIN_TOKEN_TRACK_STARTING,        "pS" , "|S"},
  314. -    { SKIN_TOKEN_TRACK_ENDING,          "pE" , "|S"},
  315. -    { SKIN_TOKEN_PLAYLIST_POSITION,     "pp", "" },
  316. -    { SKIN_TOKEN_PLAYLIST_ENTRIES,      "pe", "" },
  317. -    { SKIN_TOKEN_PLAYLIST_NAME,         "pn", "" },
  318. -    { SKIN_TOKEN_PLAYLIST_SHUFFLE,      "ps", "" },
  319. +    { SKIN_TOKEN_TRACK_ELAPSED_PERCENT, "px", "", NOFLAGS },
  320. +    { SKIN_TOKEN_TRACK_TIME_ELAPSED,    "pc", "", NOFLAGS },
  321. +    { SKIN_TOKEN_TRACK_TIME_REMAINING,  "pr", "", NOFLAGS },
  322. +    { SKIN_TOKEN_TRACK_LENGTH,          "pt", "", NOFLAGS },
  323. +    { SKIN_TOKEN_TRACK_STARTING,        "pS" , "|S", NOFLAGS },
  324. +    { SKIN_TOKEN_TRACK_ENDING,          "pE" , "|S", NOFLAGS },
  325. +    { SKIN_TOKEN_PLAYLIST_POSITION,     "pp", "", NOFLAGS },
  326. +    { SKIN_TOKEN_PLAYLIST_ENTRIES,      "pe", "", NOFLAGS },
  327. +    { SKIN_TOKEN_PLAYLIST_NAME,         "pn", "", NOFLAGS },
  328. +    { SKIN_TOKEN_PLAYLIST_SHUFFLE,      "ps", "", NOFLAGS },
  329.      
  330. -    { SKIN_TOKEN_DATABASE_PLAYCOUNT,    "rp", "" },
  331. -    { SKIN_TOKEN_DATABASE_RATING,       "rr", "" },
  332. -    { SKIN_TOKEN_DATABASE_AUTOSCORE,    "ra", "" },
  333. +    { SKIN_TOKEN_DATABASE_PLAYCOUNT,    "rp", "", NOFLAGS },
  334. +    { SKIN_TOKEN_DATABASE_RATING,       "rr", "", NOFLAGS },
  335. +    { SKIN_TOKEN_DATABASE_AUTOSCORE,    "ra", "", NOFLAGS },
  336.      
  337. -    { SKIN_TOKEN_REPLAYGAIN,            "rg", "" },
  338. -    { SKIN_TOKEN_CROSSFADE,             "xf", "" },
  339. +    { SKIN_TOKEN_REPLAYGAIN,            "rg", "", NOFLAGS },
  340. +    { SKIN_TOKEN_CROSSFADE,             "xf", "", NOFLAGS },
  341.      
  342. -    { SKIN_TOKEN_HAVE_TUNER,            "tp", "" },
  343. -    { SKIN_TOKEN_TUNER_TUNED,           "tt", "" },
  344. -    { SKIN_TOKEN_TUNER_SCANMODE,        "tm", "" },
  345. -    { SKIN_TOKEN_TUNER_STEREO,          "ts", "" },
  346. -    { SKIN_TOKEN_TUNER_MINFREQ,         "ta", "" },
  347. -    { SKIN_TOKEN_TUNER_MAXFREQ,         "tb", "" },
  348. -    { SKIN_TOKEN_TUNER_CURFREQ,         "tf", "" },
  349. -    { SKIN_TOKEN_PRESET_ID,             "Ti", "" },
  350. -    { SKIN_TOKEN_PRESET_NAME,           "Tn", "" },
  351. -    { SKIN_TOKEN_PRESET_FREQ,           "Tf", "" },
  352. -    { SKIN_TOKEN_PRESET_COUNT,          "Tc", "" },
  353. -    { SKIN_TOKEN_HAVE_RDS,              "tx", "" },
  354. -    { SKIN_TOKEN_RDS_NAME,              "ty", "" },
  355. -    { SKIN_TOKEN_RDS_TEXT,              "tz", "" },
  356. +    { SKIN_TOKEN_HAVE_TUNER,            "tp", "", NOFLAGS },
  357. +    { SKIN_TOKEN_TUNER_TUNED,           "tt", "", NOFLAGS },
  358. +    { SKIN_TOKEN_TUNER_SCANMODE,        "tm", "", NOFLAGS },
  359. +    { SKIN_TOKEN_TUNER_STEREO,          "ts", "", NOFLAGS },
  360. +    { SKIN_TOKEN_TUNER_MINFREQ,         "ta", "", NOFLAGS },
  361. +    { SKIN_TOKEN_TUNER_MAXFREQ,         "tb", "", NOFLAGS },
  362. +    { SKIN_TOKEN_TUNER_CURFREQ,         "tf", "", NOFLAGS },
  363. +    { SKIN_TOKEN_PRESET_ID,             "Ti", "", NOFLAGS },
  364. +    { SKIN_TOKEN_PRESET_NAME,           "Tn", "", NOFLAGS },
  365. +    { SKIN_TOKEN_PRESET_FREQ,           "Tf", "", NOFLAGS },
  366. +    { SKIN_TOKEN_PRESET_COUNT,          "Tc", "", NOFLAGS },
  367. +    { SKIN_TOKEN_HAVE_RDS,              "tx", "", NOFLAGS },
  368. +    { SKIN_TOKEN_RDS_NAME,              "ty", "", NOFLAGS },
  369. +    { SKIN_TOKEN_RDS_TEXT,              "tz", "", NOFLAGS },
  370.      
  371. -    { SKIN_TOKEN_SUBLINE_SCROLL,        "s", "" },
  372. -    { SKIN_TOKEN_SUBLINE_TIMEOUT,       "t"  , "S" },
  373. +    { SKIN_TOKEN_SUBLINE_SCROLL,        "s", "", NOFLAGS },
  374. +    { SKIN_TOKEN_SUBLINE_TIMEOUT,       "t"  , "S", NOFLAGS },
  375.      
  376. -    { SKIN_TOKEN_ENABLE_THEME,          "we", "\n" },
  377. -    { SKIN_TOKEN_DISABLE_THEME,         "wd", "\n" },
  378. -    { SKIN_TOKEN_DRAW_INBUILTBAR,       "wi", "\n" },
  379. +    { SKIN_TOKEN_ENABLE_THEME,          "we", "", NOBREAK },
  380. +    { SKIN_TOKEN_DISABLE_THEME,         "wd", "", NOBREAK },
  381. +    { SKIN_TOKEN_DRAW_INBUILTBAR,       "wi", "", NOBREAK },
  382.      
  383. -    { SKIN_TOKEN_IMAGE_PRELOAD,         "xl", "SFII|I\n" },
  384. -    { SKIN_TOKEN_IMAGE_PRELOAD_DISPLAY, "xd", "S" },
  385. -    { SKIN_TOKEN_IMAGE_PRELOAD,         "x", "SFII\n" },
  386. +    { SKIN_TOKEN_IMAGE_PRELOAD,         "xl", "SFII|I", NOBREAK },
  387. +    { SKIN_TOKEN_IMAGE_PRELOAD_DISPLAY, "xd", "S", NOFLAGS },
  388. +    { SKIN_TOKEN_IMAGE_PRELOAD,         "x", "SFII", NOBREAK },
  389.      
  390. -    { SKIN_TOKEN_LOAD_FONT,             "Fl" , "IF\n"},
  391. -    { SKIN_TOKEN_ALBUMART_LOAD,         "Cl" , "IIII|ss\n"},
  392. -    { SKIN_TOKEN_ALBUMART_DISPLAY,      "Cd" , ""},
  393. -    { SKIN_TOKEN_ALBUMART_FOUND,        "C" , ""},
  394. +    { SKIN_TOKEN_LOAD_FONT,             "Fl" , "IF", NOBREAK },
  395. +    { SKIN_TOKEN_ALBUMART_LOAD,         "Cl" , "IIII|ss", NOBREAK },
  396. +    { SKIN_TOKEN_ALBUMART_DISPLAY,      "Cd" , "", NOFLAGS },
  397. +    { SKIN_TOKEN_ALBUMART_FOUND,        "C" , "", NOFLAGS },
  398.      
  399. -    { SKIN_TOKEN_VIEWPORT_ENABLE,       "Vd" , "S"},
  400. -    { SKIN_TOKEN_UIVIEWPORT_ENABLE,     "VI" , "S"},
  401. +    { SKIN_TOKEN_VIEWPORT_ENABLE,       "Vd" , "S", NOFLAGS },
  402. +    { SKIN_TOKEN_UIVIEWPORT_ENABLE,     "VI" , "S", NOFLAGS },
  403.      
  404. -    { SKIN_TOKEN_VIEWPORT_CUSTOMLIST,   "Vp" , "ICC\n"},
  405. -    { SKIN_TOKEN_LIST_TITLE_TEXT,       "Lt" , ""},
  406. -    { SKIN_TOKEN_LIST_TITLE_ICON,       "Li" , ""},
  407. +    { SKIN_TOKEN_VIEWPORT_CUSTOMLIST,   "Vp" , "ICC", NOBREAK },
  408. +    { SKIN_TOKEN_LIST_TITLE_TEXT,       "Lt" , "", NOFLAGS },
  409. +    { SKIN_TOKEN_LIST_TITLE_ICON,       "Li" , "", NOFLAGS },
  410.      
  411. -    { SKIN_TOKEN_VIEWPORT_FGCOLOUR,       "Vf" , "S"},
  412. -    { SKIN_TOKEN_VIEWPORT_BGCOLOUR,       "Vb" , "S"},
  413. +    { SKIN_TOKEN_VIEWPORT_FGCOLOUR,       "Vf" , "S", NOBREAK },
  414. +    { SKIN_TOKEN_VIEWPORT_BGCOLOUR,       "Vb" , "S", NOBREAK },
  415.      
  416. -    { SKIN_TOKEN_VIEWPORT_CONDITIONAL,  "Vl" , "SIIiii"},
  417. -    { SKIN_TOKEN_UIVIEWPORT_LOAD,       "Vi" , "sIIiii"},
  418. -    { SKIN_TOKEN_VIEWPORT_LOAD,         "V"  , "IIiii"},
  419. +    { SKIN_TOKEN_VIEWPORT_CONDITIONAL,  "Vl" , "SIIiii", NOFLAGS },
  420. +    { SKIN_TOKEN_UIVIEWPORT_LOAD,       "Vi" , "sIIiii", NOFLAGS },
  421. +    { SKIN_TOKEN_VIEWPORT_LOAD,         "V"  , "IIiii", NOFLAGS },
  422.      
  423. -    { SKIN_TOKEN_IMAGE_BACKDROP,        "X"  , "f\n"},
  424. +    { SKIN_TOKEN_IMAGE_BACKDROP,        "X"  , "f", NOBREAK },
  425.      
  426. -    { SKIN_TOKEN_SETTING,               "St" , "S"},
  427. -    { SKIN_TOKEN_TRANSLATEDSTRING,      "Sx" , "S"},
  428. -    { SKIN_TOKEN_LANG_IS_RTL,           "Sr" , ""},
  429. +    { SKIN_TOKEN_SETTING,               "St" , "S", NOFLAGS },
  430. +    { SKIN_TOKEN_TRANSLATEDSTRING,      "Sx" , "S", NOFLAGS },
  431. +    { SKIN_TOKEN_LANG_IS_RTL,           "Sr" , "", NOFLAGS },
  432.      
  433. -    { SKIN_TOKEN_LASTTOUCH,             "Tl" , "|S"},
  434. -    { SKIN_TOKEN_CURRENT_SCREEN,        "cs", "" },
  435. -    { SKIN_TOKEN_TOUCHREGION,           "T"  , "IIiiS\n"},
  436. +    { SKIN_TOKEN_LASTTOUCH,             "Tl" , "|S", NOFLAGS },
  437. +    { SKIN_TOKEN_CURRENT_SCREEN,        "cs", "", NOFLAGS },
  438. +    { SKIN_TOKEN_TOUCHREGION,           "T"  , "IIiiS", NOBREAK },
  439.      
  440. -    { SKIN_TOKEN_HAVE_RECORDING,        "Rp"   , ""},
  441. -    { SKIN_TOKEN_IS_RECORDING,          "Rr"   , ""},
  442. -    { SKIN_TOKEN_REC_FREQ,              "Rf"   , ""},
  443. -    { SKIN_TOKEN_REC_ENCODER,           "Re"   , ""},
  444. -    { SKIN_TOKEN_REC_BITRATE,           "Rb"   , ""},
  445. -    { SKIN_TOKEN_REC_MONO,              "Rm"   , ""},
  446. -    { SKIN_TOKEN_REC_SECONDS,           "Rs"   , ""},
  447. -    { SKIN_TOKEN_REC_MINUTES,           "Rn"   , ""},
  448. -    { SKIN_TOKEN_REC_HOURS,             "Rh"   , ""},
  449. +    { SKIN_TOKEN_HAVE_RECORDING,        "Rp"   , "", NOFLAGS },
  450. +    { SKIN_TOKEN_IS_RECORDING,          "Rr"   , "", NOFLAGS },
  451. +    { SKIN_TOKEN_REC_FREQ,              "Rf"   , "", NOFLAGS },
  452. +    { SKIN_TOKEN_REC_ENCODER,           "Re"   , "", NOFLAGS },
  453. +    { SKIN_TOKEN_REC_BITRATE,           "Rb"   , "", NOFLAGS },
  454. +    { SKIN_TOKEN_REC_MONO,              "Rm"   , "", NOFLAGS },
  455. +    { SKIN_TOKEN_REC_SECONDS,           "Rs"   , "", NOFLAGS },
  456. +    { SKIN_TOKEN_REC_MINUTES,           "Rn"   , "", NOFLAGS },
  457. +    { SKIN_TOKEN_REC_HOURS,             "Rh"   , "", NOFLAGS },
  458.      
  459. -    { SKIN_TOKEN_UNKNOWN,                ""   , ""}
  460. +    { SKIN_TOKEN_UNKNOWN,                ""   , "", NOFLAGS }
  461.      /* Keep this here to mark the end of the table */
  462.  };
  463.  
  464. Index: lib/skin_parser/tag_table.h
  465. ===================================================================
  466. --- lib/skin_parser/tag_table.h (revision 27267)
  467. +++ lib/skin_parser/tag_table.h (working copy)
  468. @@ -27,7 +27,11 @@
  469.  {
  470.  #endif
  471.  
  472. +#define NOFLAGS 0
  473. +    /* Flag to tell the renderer not to insert a line break */
  474. +#define NOBREAK 0x1
  475.  
  476. +
  477.  enum skin_token_type {
  478.      
  479.      SKIN_TOKEN_UNKNOWN,
  480. @@ -271,7 +275,7 @@
  481.      enum skin_token_type type;
  482.      char* name;
  483.      char* params;
  484. -
  485. +    int flags;
  486.  };
  487.  
  488.  /*
clone this paste RAW Paste Data