mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Merge branch 'master' into readline
Conflicts: src/ui/inputwin.c
This commit is contained in:
commit
51ccb69580
2
.gitignore
vendored
2
.gitignore
vendored
@ -25,7 +25,7 @@ configure.scan
|
|||||||
stamp-h1
|
stamp-h1
|
||||||
*~
|
*~
|
||||||
*dirstamp
|
*dirstamp
|
||||||
valgrind.out
|
valgrind*.out*
|
||||||
core
|
core
|
||||||
bugs/
|
bugs/
|
||||||
TODO
|
TODO
|
||||||
|
@ -1659,7 +1659,7 @@ cmd_reset_autocomplete()
|
|||||||
autocomplete_reset(autoconnect_ac);
|
autocomplete_reset(autoconnect_ac);
|
||||||
autocomplete_reset(theme_ac);
|
autocomplete_reset(theme_ac);
|
||||||
if (theme_load_ac != NULL) {
|
if (theme_load_ac != NULL) {
|
||||||
autocomplete_reset(theme_load_ac);
|
autocomplete_free(theme_load_ac);
|
||||||
theme_load_ac = NULL;
|
theme_load_ac = NULL;
|
||||||
}
|
}
|
||||||
autocomplete_reset(account_ac);
|
autocomplete_reset(account_ac);
|
||||||
@ -2468,11 +2468,12 @@ _theme_autocomplete(const char * const input)
|
|||||||
if (theme_load_ac == NULL) {
|
if (theme_load_ac == NULL) {
|
||||||
theme_load_ac = autocomplete_new();
|
theme_load_ac = autocomplete_new();
|
||||||
GSList *themes = theme_list();
|
GSList *themes = theme_list();
|
||||||
while (themes != NULL) {
|
GSList *curr = themes;
|
||||||
autocomplete_add(theme_load_ac, themes->data);
|
while (curr != NULL) {
|
||||||
themes = g_slist_next(themes);
|
autocomplete_add(theme_load_ac, curr->data);
|
||||||
|
curr = g_slist_next(curr);
|
||||||
}
|
}
|
||||||
g_slist_free(themes);
|
g_slist_free_full(themes, g_free);
|
||||||
autocomplete_add(theme_load_ac, "default");
|
autocomplete_add(theme_load_ac, "default");
|
||||||
}
|
}
|
||||||
result = autocomplete_param_with_ac(input, "/theme set", theme_load_ac, TRUE);
|
result = autocomplete_param_with_ac(input, "/theme set", theme_load_ac, TRUE);
|
||||||
|
@ -192,7 +192,9 @@ GSList *
|
|||||||
theme_list(void)
|
theme_list(void)
|
||||||
{
|
{
|
||||||
GSList *result = NULL;
|
GSList *result = NULL;
|
||||||
_theme_list_dir(_get_themes_dir(), &result);
|
char *themes_dir = _get_themes_dir();
|
||||||
|
_theme_list_dir(themes_dir, &result);
|
||||||
|
free(themes_dir);
|
||||||
#ifdef THEMES_PATH
|
#ifdef THEMES_PATH
|
||||||
_theme_list_dir(THEMES_PATH, &result);
|
_theme_list_dir(THEMES_PATH, &result);
|
||||||
#endif
|
#endif
|
||||||
|
@ -717,20 +717,24 @@ cons_show_account(ProfAccount *account)
|
|||||||
GList *resources = jabber_get_available_resources();
|
GList *resources = jabber_get_available_resources();
|
||||||
GList *ordered_resources = NULL;
|
GList *ordered_resources = NULL;
|
||||||
|
|
||||||
if (resources != NULL) {
|
GList *curr = resources;
|
||||||
|
if (curr != NULL) {
|
||||||
win_save_println(console, "Resources:");
|
win_save_println(console, "Resources:");
|
||||||
|
|
||||||
// sort in order of availabiltiy
|
// sort in order of availabiltiy
|
||||||
while (resources != NULL) {
|
while (curr != NULL) {
|
||||||
Resource *resource = resources->data;
|
Resource *resource = curr->data;
|
||||||
ordered_resources = g_list_insert_sorted(ordered_resources,
|
ordered_resources = g_list_insert_sorted(ordered_resources,
|
||||||
resource, (GCompareFunc)resource_compare_availability);
|
resource, (GCompareFunc)resource_compare_availability);
|
||||||
resources = g_list_next(resources);
|
curr = g_list_next(curr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
while (ordered_resources != NULL) {
|
g_list_free(resources);
|
||||||
Resource *resource = ordered_resources->data;
|
|
||||||
|
curr = ordered_resources;
|
||||||
|
while (curr != NULL) {
|
||||||
|
Resource *resource = curr->data;
|
||||||
const char *resource_presence = string_from_resource_presence(resource->presence);
|
const char *resource_presence = string_from_resource_presence(resource->presence);
|
||||||
theme_item_t presence_colour = theme_main_presence_attrs(resource_presence);
|
theme_item_t presence_colour = theme_main_presence_attrs(resource_presence);
|
||||||
win_save_vprint(console, '-', NULL, NO_EOL, presence_colour, "", " %s (%d), %s", resource->name, resource->priority, resource_presence);
|
win_save_vprint(console, '-', NULL, NO_EOL, presence_colour, "", " %s (%d), %s", resource->name, resource->priority, resource_presence);
|
||||||
@ -785,8 +789,9 @@ cons_show_account(ProfAccount *account)
|
|||||||
caps_destroy(caps);
|
caps_destroy(caps);
|
||||||
}
|
}
|
||||||
|
|
||||||
ordered_resources = g_list_next(ordered_resources);
|
curr = g_list_next(curr);
|
||||||
}
|
}
|
||||||
|
g_list_free(ordered_resources);
|
||||||
}
|
}
|
||||||
|
|
||||||
cons_alert();
|
cons_alert();
|
||||||
|
@ -109,8 +109,11 @@ void
|
|||||||
title_bar_console(void)
|
title_bar_console(void)
|
||||||
{
|
{
|
||||||
werase(win);
|
werase(win);
|
||||||
typing = FALSE;
|
if (typing_elapsed) {
|
||||||
|
g_timer_destroy(typing_elapsed);
|
||||||
|
}
|
||||||
typing_elapsed = NULL;
|
typing_elapsed = NULL;
|
||||||
|
typing = FALSE;
|
||||||
|
|
||||||
_title_bar_draw();
|
_title_bar_draw();
|
||||||
}
|
}
|
||||||
|
@ -337,7 +337,7 @@ win_free(ProfWin* window)
|
|||||||
ProfChatWin *chatwin = (ProfChatWin*)window;
|
ProfChatWin *chatwin = (ProfChatWin*)window;
|
||||||
free(chatwin->barejid);
|
free(chatwin->barejid);
|
||||||
free(chatwin->resource_override);
|
free(chatwin->resource_override);
|
||||||
free(chatwin->state);
|
chat_state_free(chatwin->state);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window->type == WIN_MUC) {
|
if (window->type == WIN_MUC) {
|
||||||
|
Loading…
Reference in New Issue
Block a user