about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2013-04-21 01:39:36 +0100
committerJames Booth <boothj5@gmail.com>2013-04-21 01:39:36 +0100
commit0c912990c773ece4e8dd5b868b86868661009cb7 (patch)
tree3937f8d14b31757cfa185716da9dd7a0b8bff321 /src
parent3945a72484e3790d2f1259e8c2d418a2258a6721 (diff)
downloadprofani-tty-0c912990c773ece4e8dd5b868b86868661009cb7.tar.gz
Moved cons_debug() to console module
Diffstat (limited to 'src')
-rw-r--r--src/ui/console.c23
-rw-r--r--src/ui/windows.c24
2 files changed, 23 insertions, 24 deletions
diff --git a/src/ui/console.c b/src/ui/console.c
index 57fd063f..812fbac1 100644
--- a/src/ui/console.c
+++ b/src/ui/console.c
@@ -72,6 +72,29 @@ cons_show_time(void)
 }
 
 void
+cons_debug(const char * const msg, ...)
+{
+    if (strcmp(PACKAGE_STATUS, "development") == 0) {
+        va_list arg;
+        va_start(arg, msg);
+        GString *fmt_msg = g_string_new(NULL);
+        g_string_vprintf(fmt_msg, msg, arg);
+        window_show_time(console, '-');
+        wprintw(console->win, "%s\n", fmt_msg->str);
+        g_string_free(fmt_msg, TRUE);
+        va_end(arg);
+
+        dirty = TRUE;
+        if (!win_current_is_console()) {
+            status_bar_new(0);
+        }
+
+        win_current_page_off();
+        ui_refresh();
+    }
+}
+
+void
 cons_show(const char * const msg, ...)
 {
     va_list arg;
diff --git a/src/ui/windows.c b/src/ui/windows.c
index 52db5b2c..ce40eec9 100644
--- a/src/ui/windows.c
+++ b/src/ui/windows.c
@@ -1146,30 +1146,6 @@ win_room_show_status(const char * const contact)
 }
 
 void
-cons_debug(const char * const msg, ...)
-{
-    if (strcmp(PACKAGE_STATUS, "development") == 0) {
-        va_list arg;
-        va_start(arg, msg);
-        GString *fmt_msg = g_string_new(NULL);
-        g_string_vprintf(fmt_msg, msg, arg);
-        window_show_time(console, '-');
-        wprintw(console->win, "%s\n", fmt_msg->str);
-        g_string_free(fmt_msg, TRUE);
-        va_end(arg);
-
-        if (current_index == 0) {
-            dirty = TRUE;
-        } else {
-            status_bar_new(0);
-        }
-
-        win_current_page_off();
-        ui_refresh();
-    }
-}
-
-void
 cons_show_word(const char * const word)
 {
     wprintw(console->win, "%s", word);
215' href='#n215'>215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317