Advertisement
Guest User

no-x11-fix.diff

a guest
Apr 2nd, 2010
311
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 3.23 KB | None | 0 0
  1. --- src/conky-1.8.0/src/conky.c 2010-03-25 16:27:32.000000000 -0400
  2. +++ src.fix/conky-1.8.0/src/conky.c 2010-04-02 01:59:06.000000000 -0400
  3. @@ -2057,19 +2057,21 @@
  4.             OBJ(xmms2_duration) {
  5.                 snprintf(p, p_max_size, "%02d:%02d",
  6.                     cur->xmms2.duration / 60000,
  7.                     (cur->xmms2.duration / 1000) % 60);
  8.             }
  9.             OBJ(xmms2_percent) {
  10.                 snprintf(p, p_max_size, "%2.0f", cur->xmms2.progress * 100);
  11.             }
  12. +#ifdef X11
  13.             OBJ(xmms2_bar) {
  14.                 new_bar(obj, p, p_max_size, (int) (cur->xmms2.progress * 255.0f));
  15.             }
  16. +#endif /* X11 */
  17.             OBJ(xmms2_playlist) {
  18.                 snprintf(p, p_max_size, "%s", cur->xmms2.playlist);
  19.             }
  20.             OBJ(xmms2_timesplayed) {
  21.                 snprintf(p, p_max_size, "%i", cur->xmms2.timesplayed);
  22.             }
  23.             OBJ(xmms2_smart) {
  24.                 if (strlen(cur->xmms2.title) < 2
  25. @@ -2240,19 +2242,21 @@
  26.                 print_smapi_bat_perc(obj, p, p_max_size);
  27.             }
  28.             OBJ(smapi_bat_temp) {
  29.                 print_smapi_bat_temp(obj, p, p_max_size);
  30.             }
  31.             OBJ(smapi_bat_power) {
  32.                 print_smapi_bat_power(obj, p, p_max_size);
  33.             }
  34. +#ifdef X11
  35.             OBJ(smapi_bat_bar) {
  36.                 print_smapi_bat_bar(obj, p, p_max_size);
  37.             }
  38. +#endif /* X11 */
  39.  #endif /* IBM */
  40.             OBJ(include) {
  41.                 if(obj->sub) {
  42.                     char buf[max_user_text];
  43.  
  44.                     generate_text_internal(buf, max_user_text, *obj->sub, cur);
  45.                     snprintf(p, p_max_size, "%s", buf);
  46.                 } else {
  47. --- src/conky-1.8.0/src/core.c  2010-03-25 16:27:32.000000000 -0400
  48. +++ src.fix/conky-1.8.0/src/core.c  2010-04-02 02:01:38.000000000 -0400
  49. @@ -878,23 +878,25 @@
  50.     END OBJ_IF_ARG(if_smapi_bat_installed, 0, "if_smapi_bat_installed needs an argument")
  51.         obj->data.s = strndup(arg, text_buffer_size);
  52.     END OBJ_ARG(smapi_bat_perc, 0, "smapi_bat_perc needs an argument")
  53.         obj->data.s = strndup(arg, text_buffer_size);
  54.     END OBJ_ARG(smapi_bat_temp, 0, "smapi_bat_temp needs an argument")
  55.         obj->data.s = strndup(arg, text_buffer_size);
  56.     END OBJ_ARG(smapi_bat_power, 0, "smapi_bat_power needs an argument")
  57.         obj->data.s = strndup(arg, text_buffer_size);
  58. +#ifdef X11
  59.     END OBJ_ARG(smapi_bat_bar, 0, "smapi_bat_bar needs an argument")
  60.         int cnt;
  61.         if(sscanf(arg, "%i %n", &obj->data.i, &cnt) <= 0) {
  62.             NORM_ERR("first argument to smapi_bat_bar must be an integer value");
  63.             obj->data.i = -1;
  64.         } else
  65.             arg = scan_bar(obj, arg + cnt);
  66. +#endif /* X11 */
  67.  #endif /* IBM */
  68.  #ifdef MPD
  69.  #define mpd_set_maxlen(name) \
  70.         if (arg) { \
  71.             int i; \
  72.             sscanf(arg, "%d", &i); \
  73.             if (i > 0) \
  74.                 obj->data.i = i + 1; \
  75. @@ -961,18 +963,20 @@
  76.     END OBJ(xmms2_bitrate, &update_xmms2)
  77.     END OBJ(xmms2_date, &update_xmms2)
  78.     END OBJ(xmms2_id, &update_xmms2)
  79.     END OBJ(xmms2_duration, &update_xmms2)
  80.     END OBJ(xmms2_elapsed, &update_xmms2)
  81.     END OBJ(xmms2_size, &update_xmms2)
  82.     END OBJ(xmms2_status, &update_xmms2)
  83.     END OBJ(xmms2_percent, &update_xmms2)
  84. +#ifdef X11
  85.     END OBJ(xmms2_bar, &update_xmms2)
  86.         scan_bar(obj, arg);
  87. +#endif /* X11 */
  88.     END OBJ(xmms2_smart, &update_xmms2)
  89.     END OBJ(xmms2_playlist, &update_xmms2)
  90.     END OBJ(xmms2_timesplayed, &update_xmms2)
  91.     END OBJ_IF(if_xmms2_connected, &update_xmms2)
  92.  #endif
  93.  #ifdef AUDACIOUS
  94.     END OBJ(audacious_status, &update_audacious)
  95.     END OBJ_ARG(audacious_title, &update_audacious, "audacious_title needs an argument")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement