diff options
author | Will Song <incertia9474@gmail.com> | 2015-05-29 19:53:37 -0500 |
---|---|---|
committer | Will Song <incertia9474@gmail.com> | 2015-05-29 19:53:37 -0500 |
commit | 9463c6719036957c8468e1363a48afbfe751fd3e (patch) | |
tree | aed6ccd050fc182a0d4d111bef6f743d28a42a73 /src/ui/titlebar.c | |
parent | 7f436d614b11d72893d856f1c3d817ab34b0b9eb (diff) | |
parent | 304e08a9c0bfa27ed84dc1ff0a2e2d32b36529f8 (diff) | |
download | profani-tty-9463c6719036957c8468e1363a48afbfe751fd3e.tar.gz |
fix conflicts
Diffstat (limited to 'src/ui/titlebar.c')
-rw-r--r-- | src/ui/titlebar.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/ui/titlebar.c b/src/ui/titlebar.c index 326dbf8b..9bb84f9d 100644 --- a/src/ui/titlebar.c +++ b/src/ui/titlebar.c @@ -1,7 +1,7 @@ /* * titlebar.c * - * Copyright (C) 2012 - 2014 James Booth <boothj5@gmail.com> + * Copyright (C) 2012 - 2015 James Booth <boothj5@gmail.com> * * This file is part of Profanity. * @@ -80,7 +80,7 @@ title_bar_update_virtual(void) { ProfWin *window = wins_get_current(); if (window->type != WIN_CONSOLE) { - if (typing_elapsed != NULL) { + if (typing_elapsed) { gdouble seconds = g_timer_elapsed(typing_elapsed, NULL); if (seconds >= 10) { @@ -109,8 +109,11 @@ void title_bar_console(void) { werase(win); - typing = FALSE; + if (typing_elapsed) { + g_timer_destroy(typing_elapsed); + } typing_elapsed = NULL; + typing = FALSE; _title_bar_draw(); } @@ -125,7 +128,7 @@ title_bar_set_presence(contact_presence_t presence) void title_bar_switch(void) { - if (typing_elapsed != NULL) { + if (typing_elapsed) { g_timer_destroy(typing_elapsed); typing_elapsed = NULL; typing = FALSE; @@ -138,7 +141,7 @@ void title_bar_set_typing(gboolean is_typing) { if (is_typing) { - if (typing_elapsed != NULL) { + if (typing_elapsed) { g_timer_start(typing_elapsed); } else { typing_elapsed = g_timer_new(); @@ -249,7 +252,7 @@ _show_privacy(ProfChatWin *chatwin) { int bracket_attrs = theme_attrs(THEME_TITLE_BRACKET); - if (!chatwin->is_otr) { + if (chatwin->enc_mode == PROF_ENC_NONE) { if (prefs_get_boolean(PREF_OTR_WARN)) { int unencrypted_attrs = theme_attrs(THEME_TITLE_UNENCRYPTED); wprintw(win, " "); |