hc-skins.c 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. /*
  2. Skins engine.
  3. Set of hardcoded skins
  4. Copyright (C) 2009 The Free Software Foundation, Inc.
  5. Written by:
  6. Slava Zanko <slavazanko@gmail.com>, 2009.
  7. This file is part of the Midnight Commander.
  8. The Midnight Commander is free software; you can redistribute it
  9. and/or modify it under the terms of the GNU General Public License as
  10. published by the Free Software Foundation; either version 2 of the
  11. License, or (at your option) any later version.
  12. The Midnight Commander is distributed in the hope that it will be
  13. useful, but WITHOUT ANY WARRANTY; without even the implied warranty
  14. of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. General Public License for more details.
  16. You should have received a copy of the GNU General Public License
  17. along with this program; if not, write to the Free Software
  18. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  19. MA 02110-1301, USA.
  20. */
  21. #include <config.h>
  22. #include "internal.h"
  23. /*** global variables ****************************************************************************/
  24. /*** file scope macro definitions ****************************************************************/
  25. #define set_lines(x,y) mc_config_set_string(mc_skin->config, "Lines", x, y)
  26. /*** file scope type declarations ****************************************************************/
  27. /*** file scope variables ************************************************************************/
  28. /*** file scope functions ************************************************************************/
  29. /* --------------------------------------------------------------------------------------------- */
  30. /* --------------------------------------------------------------------------------------------- */
  31. /*** public functions ****************************************************************************/
  32. /* --------------------------------------------------------------------------------------------- */
  33. void
  34. mc_skin_hardcoded_blackwhite_colors (mc_skin_t * mc_skin)
  35. {
  36. mc_config_set_string (mc_skin->config, "core", "_default_", "default;default");
  37. mc_config_set_string (mc_skin->config, "core", "selected", "A_REVERSE");
  38. mc_config_set_string (mc_skin->config, "core", "marked", "A_BOLD");
  39. mc_config_set_string (mc_skin->config, "core", "markselect", "A_BOLD_REVERSE");
  40. mc_config_set_string (mc_skin->config, "core", "disabled", "default");
  41. mc_config_set_string (mc_skin->config, "core", "reverse", "A_REVERSE");
  42. mc_config_set_string (mc_skin->config, "dialog", "_default_", "A_REVERSE");
  43. mc_config_set_string (mc_skin->config, "dialog", "dfocus", "A_BOLD");
  44. mc_config_set_string (mc_skin->config, "dialog", "dhotnormal", "A_UNDERLINE");
  45. mc_config_set_string (mc_skin->config, "dialog", "dhotfocus", "A_UNDERLINE");
  46. mc_config_set_string (mc_skin->config, "error", "_default_", "A_BOLD");
  47. mc_config_set_string (mc_skin->config, "menu", "_default_", "A_REVERSE");
  48. mc_config_set_string (mc_skin->config, "menu", "menuhot", "A_BOLD");
  49. mc_config_set_string (mc_skin->config, "menu", "menusel", "default");
  50. mc_config_set_string (mc_skin->config, "menu", "menuhotsel", "A_UNDERLINE");
  51. mc_config_set_string (mc_skin->config, "menu", "menuinactive", "A_REVERSE");
  52. mc_config_set_string (mc_skin->config, "popupmenu", "_default_", "A_REVERSE");
  53. mc_config_set_string (mc_skin->config, "popupmenu", "menusel", "default");
  54. mc_config_set_string (mc_skin->config, "popupmenu", "menutitle", "A_REVERSE");
  55. mc_config_set_string (mc_skin->config, "statusbar", "_default_", "A_REVERSE");
  56. mc_config_set_string (mc_skin->config, "help", "_default_", "A_REVERSE");
  57. mc_config_set_string (mc_skin->config, "help", "helpitalic", "A_REVERSE");
  58. mc_config_set_string (mc_skin->config, "help", "helpbold", "A_REVERSE");
  59. mc_config_set_string (mc_skin->config, "help", "helpslink", "A_BOLD");
  60. mc_config_set_string (mc_skin->config, "viewer", "viewunderline", "A_UNDERLINE");
  61. mc_config_set_string (mc_skin->config, "editor", "editbold", "A_BOLD");
  62. mc_config_set_string (mc_skin->config, "editor", "editmarked", "A_REVERSE");
  63. mc_config_set_string (mc_skin->config, "buttonbar", "hotkey", "default");
  64. mc_config_set_string (mc_skin->config, "buttonbar", "button", "A_REVERSE");
  65. }
  66. /* --------------------------------------------------------------------------------------------- */
  67. void
  68. mc_skin_hardcoded_space_lines (mc_skin_t * mc_skin)
  69. {
  70. /* single lines */
  71. set_lines ("vert", " ");
  72. set_lines ("horiz", " ");
  73. set_lines ("lefttop", " ");
  74. set_lines ("righttop", " ");
  75. set_lines ("leftbottom", " ");
  76. set_lines ("rightbottom", " ");
  77. set_lines ("topmiddle", " ");
  78. set_lines ("bottommiddle", " ");
  79. set_lines ("leftmiddle", " ");
  80. set_lines ("rightmiddle", " ");
  81. set_lines ("cross", " ");
  82. set_lines ("dvert", " ");
  83. set_lines ("dhoriz", " ");
  84. set_lines ("dlefttop", " ");
  85. set_lines ("drighttop", " ");
  86. set_lines ("dleftbottom", " ");
  87. set_lines ("drightbottom", " ");
  88. set_lines ("dtopmiddle", " ");
  89. set_lines ("dbottommiddle", " ");
  90. set_lines ("dleftmiddle", " ");
  91. set_lines ("drightmiddle", " ");
  92. }
  93. /* --------------------------------------------------------------------------------------------- */
  94. void
  95. mc_skin_hardcoded_ugly_lines (mc_skin_t * mc_skin)
  96. {
  97. /* single lines */
  98. set_lines ("vert", "|");
  99. set_lines ("horiz", "-");
  100. set_lines ("lefttop", "+");
  101. set_lines ("righttop", "+");
  102. set_lines ("leftbottom", "+");
  103. set_lines ("rightbottom", "+");
  104. set_lines ("topmiddle", "-");
  105. set_lines ("bottommiddle", "-");
  106. set_lines ("leftmiddle", "|");
  107. set_lines ("rightmiddle", "|");
  108. set_lines ("cross", "+");
  109. /* double lines */
  110. set_lines ("dvert", "|");
  111. set_lines ("dhoriz", "-");
  112. set_lines ("dlefttop", "+");
  113. set_lines ("drighttop", "+");
  114. set_lines ("dleftbottom", "+");
  115. set_lines ("drightbottom", "+");
  116. set_lines ("dtopmiddle", "-");
  117. set_lines ("dbottommiddle", "-");
  118. set_lines ("dleftmiddle", "|");
  119. set_lines ("drightmiddle", "|");
  120. }
  121. /* --------------------------------------------------------------------------------------------- */