mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-26 12:27:52 +00:00
More build fixes.
This commit is contained in:
parent
198cc9230a
commit
94a854cfa2
12
src/conky.cc
12
src/conky.cc
@ -1253,13 +1253,18 @@ std::string string_replace_all(std::string original, const std::string &oldpart,
|
||||
}
|
||||
|
||||
static void draw_string(const char *s) {
|
||||
int i, i2, pos, width_of_s;
|
||||
int i, i2, pos;
|
||||
#ifdef BUILD_X11
|
||||
int width_of_s;
|
||||
#endif /* BUILD_X11 */
|
||||
int max = 0;
|
||||
int added;
|
||||
|
||||
if (s[0] == '\0') { return; }
|
||||
|
||||
#ifdef BUILD_X11
|
||||
width_of_s = get_string_width(s);
|
||||
#endif /* BUILD_X11 */
|
||||
if (out_to_stdout.get(*state) && draw_mode == FG) {
|
||||
printf("%s\n", s);
|
||||
if (extra_newline.get(*state)) { fputc('\n', stdout); }
|
||||
@ -1864,13 +1869,12 @@ static void draw_text() {
|
||||
}
|
||||
|
||||
static void draw_stuff() {
|
||||
#ifndef BUILD_X11
|
||||
static int text_offset_x, text_offset_y; /* offset for start position */
|
||||
#endif
|
||||
#ifdef BUILD_X11
|
||||
text_offset_x = text_offset_y = 0;
|
||||
#ifdef BUILD_IMLIB2
|
||||
cimlib_render(text_start_x, text_start_y, window.width, window.height);
|
||||
#endif /* BUILD_IMLIB2 */
|
||||
#endif /* BUILD_X11 */
|
||||
if (static_cast<unsigned int>(!overwrite_file.get(*state).empty()) != 0u) {
|
||||
overwrite_fpointer = fopen(overwrite_file.get(*state).c_str(), "we");
|
||||
if (overwrite_fpointer == nullptr) {
|
||||
|
@ -291,13 +291,15 @@ std::pair<uint16_t, bool> window_hints_traits::convert(
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef OWN_WINDOW
|
||||
namespace {
|
||||
// used to set the default value for own_window_title
|
||||
std::string gethostnamecxx() {
|
||||
std::string ethostnamecxx() {
|
||||
update_uname();
|
||||
return info.uname_s.nodename;
|
||||
}
|
||||
} // namespace
|
||||
#endif /* OWN_WINDOW */
|
||||
|
||||
/*
|
||||
* The order of these settings cannot be completely arbitrary. Some of them
|
||||
@ -356,8 +358,8 @@ conky::simple_config_setting<bool> use_argb_visual("own_window_argb_visual",
|
||||
false, false);
|
||||
conky::range_config_setting<int> own_window_argb_value("own_window_argb_value",
|
||||
0, 255, 255, false);
|
||||
#endif
|
||||
#endif /*OWN_WINDOW*/
|
||||
#endif /* BUILD_ARGB */
|
||||
#endif /* OWN_WINDOW */
|
||||
priv::own_window_setting own_window;
|
||||
|
||||
#ifdef BUILD_XDBE
|
||||
|
Loading…
Reference in New Issue
Block a user