Merge branch 'master' into feat/ai
Some checks failed
CI Code / Check spelling (pull_request) Successful in 18s
CI Code / Check coding style (pull_request) Successful in 33s
CI Code / Code Coverage (pull_request) Successful in 2m29s
CI Code / Linux (debian) (pull_request) Failing after 3m35s
CI Code / Linux (ubuntu) (pull_request) Failing after 3m46s
CI Code / Linux (arch) (pull_request) Failing after 4m32s
Some checks failed
CI Code / Check spelling (pull_request) Successful in 18s
CI Code / Check coding style (pull_request) Successful in 33s
CI Code / Code Coverage (pull_request) Successful in 2m29s
CI Code / Linux (debian) (pull_request) Failing after 3m35s
CI Code / Linux (ubuntu) (pull_request) Failing after 3m46s
CI Code / Linux (arch) (pull_request) Failing after 4m32s
This commit is contained in:
@@ -52,6 +52,7 @@
|
||||
|
||||
#include "config/theme.h"
|
||||
#include "config/preferences.h"
|
||||
#include "database.h"
|
||||
#include "ui/ui.h"
|
||||
#include "ui/statusbar.h"
|
||||
#include "ui/inputwin.h"
|
||||
@@ -83,6 +84,7 @@ static WINDOW* statusbar_win;
|
||||
void _get_range_bounds(int* start, int* end, gboolean is_static);
|
||||
static int _status_bar_draw_time(int pos);
|
||||
static int _status_bar_draw_maintext(int pos);
|
||||
static int _status_bar_draw_dbbackend(int pos);
|
||||
static int _status_bar_draw_bracket(gboolean current, int pos, const char* ch);
|
||||
static int _status_bar_draw_extended_tabs(int pos, gboolean prefix, int start, int end, gboolean is_static);
|
||||
static int _status_bar_draw_tab(StatusBarTab* tab, int pos, int num, gboolean include_brackets);
|
||||
@@ -313,6 +315,7 @@ status_bar_draw(void)
|
||||
|
||||
pos = _status_bar_draw_time(pos);
|
||||
pos = _status_bar_draw_maintext(pos);
|
||||
pos = _status_bar_draw_dbbackend(pos);
|
||||
if (max_tabs != 0)
|
||||
pos = _status_bar_draw_tabs(pos);
|
||||
|
||||
@@ -603,6 +606,17 @@ _status_bar_draw_maintext(int pos)
|
||||
return pos;
|
||||
}
|
||||
|
||||
static int
|
||||
_status_bar_draw_dbbackend(int pos)
|
||||
{
|
||||
if (!active_db_backend || !active_db_backend->name)
|
||||
return pos;
|
||||
|
||||
auto_gchar gchar* label = g_strdup_printf(" [%s]", active_db_backend->name);
|
||||
mvwprintw(statusbar_win, 0, pos, "%s", label);
|
||||
return pos + utf8_display_len(label);
|
||||
}
|
||||
|
||||
static void
|
||||
_destroy_tab(StatusBarTab* tab)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user