mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Removed dirty flag from titlebar
This commit is contained in:
parent
ecf323de31
commit
af1eab7810
@ -31,7 +31,6 @@ static WINDOW *title_bar;
|
|||||||
static char *current_title = NULL;
|
static char *current_title = NULL;
|
||||||
static char *recipient = NULL;
|
static char *recipient = NULL;
|
||||||
static GTimer *typing_elapsed;
|
static GTimer *typing_elapsed;
|
||||||
static int dirty;
|
|
||||||
static contact_presence_t current_status;
|
static contact_presence_t current_status;
|
||||||
|
|
||||||
static void _title_bar_draw_title(void);
|
static void _title_bar_draw_title(void);
|
||||||
@ -46,7 +45,8 @@ _create_title_bar(void)
|
|||||||
wbkgd(title_bar, COLOUR_TITLE_TEXT);
|
wbkgd(title_bar, COLOUR_TITLE_TEXT);
|
||||||
title_bar_title();
|
title_bar_title();
|
||||||
title_bar_set_status(CONTACT_OFFLINE);
|
title_bar_set_status(CONTACT_OFFLINE);
|
||||||
dirty = TRUE;
|
wrefresh(title_bar);
|
||||||
|
inp_put_back();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -57,7 +57,8 @@ _title_bar_title(void)
|
|||||||
typing_elapsed = NULL;
|
typing_elapsed = NULL;
|
||||||
title_bar_show("Profanity. Type /help for help information.");
|
title_bar_show("Profanity. Type /help for help information.");
|
||||||
_title_bar_draw_status();
|
_title_bar_draw_status();
|
||||||
dirty = TRUE;
|
wrefresh(title_bar);
|
||||||
|
inp_put_back();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -70,7 +71,8 @@ _title_bar_resize(void)
|
|||||||
werase(title_bar);
|
werase(title_bar);
|
||||||
_title_bar_draw_title();
|
_title_bar_draw_title();
|
||||||
_title_bar_draw_status();
|
_title_bar_draw_status();
|
||||||
dirty = TRUE;
|
wrefresh(title_bar);
|
||||||
|
inp_put_back();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -95,16 +97,11 @@ _title_bar_refresh(void)
|
|||||||
g_timer_destroy(typing_elapsed);
|
g_timer_destroy(typing_elapsed);
|
||||||
typing_elapsed = NULL;
|
typing_elapsed = NULL;
|
||||||
|
|
||||||
dirty = TRUE;
|
wrefresh(title_bar);
|
||||||
|
inp_put_back();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dirty) {
|
|
||||||
wrefresh(title_bar);
|
|
||||||
inp_put_back();
|
|
||||||
dirty = FALSE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -142,7 +139,8 @@ _title_bar_set_recipient(const char * const from)
|
|||||||
current_title = (char *) malloc(strlen(from) + 1);
|
current_title = (char *) malloc(strlen(from) + 1);
|
||||||
strcpy(current_title, from);
|
strcpy(current_title, from);
|
||||||
|
|
||||||
dirty = TRUE;
|
wrefresh(title_bar);
|
||||||
|
inp_put_back();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -168,7 +166,8 @@ _title_bar_set_typing(gboolean is_typing)
|
|||||||
strcpy(current_title, recipient);
|
strcpy(current_title, recipient);
|
||||||
}
|
}
|
||||||
|
|
||||||
dirty = TRUE;
|
wrefresh(title_bar);
|
||||||
|
inp_put_back();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -214,7 +213,8 @@ _title_bar_draw_status(void)
|
|||||||
mvwaddch(title_bar, 0, cols - 2, ']');
|
mvwaddch(title_bar, 0, cols - 2, ']');
|
||||||
wattroff(title_bar, COLOUR_TITLE_BRACKET);
|
wattroff(title_bar, COLOUR_TITLE_BRACKET);
|
||||||
|
|
||||||
dirty = TRUE;
|
wrefresh(title_bar);
|
||||||
|
inp_put_back();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -226,7 +226,8 @@ _title_bar_draw_title(void)
|
|||||||
waddch(title_bar, ' ');
|
waddch(title_bar, ' ');
|
||||||
mvwprintw(title_bar, 0, 0, " %s", current_title);
|
mvwprintw(title_bar, 0, 0, " %s", current_title);
|
||||||
|
|
||||||
dirty = TRUE;
|
wrefresh(title_bar);
|
||||||
|
inp_put_back();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user