1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Added occupants UI preference

This commit is contained in:
James Booth 2014-10-09 22:02:39 +01:00
parent cbe14d6e4e
commit ce7cb3f40f
3 changed files with 7 additions and 1 deletions

View File

@ -431,6 +431,7 @@ _get_group(preference_t pref)
case PREF_INTYPE: case PREF_INTYPE:
case PREF_HISTORY: case PREF_HISTORY:
case PREF_MOUSE: case PREF_MOUSE:
case PREF_OCCUPANTS:
case PREF_STATUSES: case PREF_STATUSES:
case PREF_STATUSES_CONSOLE: case PREF_STATUSES_CONSOLE:
case PREF_STATUSES_CHAT: case PREF_STATUSES_CHAT:
@ -493,6 +494,8 @@ _get_key(preference_t pref)
return "history"; return "history";
case PREF_MOUSE: case PREF_MOUSE:
return "mouse"; return "mouse";
case PREF_OCCUPANTS:
return "occupants";
case PREF_STATUSES: case PREF_STATUSES:
return "statuses"; return "statuses";
case PREF_STATUSES_CONSOLE: case PREF_STATUSES_CONSOLE:
@ -566,6 +569,7 @@ _get_default_boolean(preference_t pref)
case PREF_NOTIFY_ROOM_CURRENT: case PREF_NOTIFY_ROOM_CURRENT:
case PREF_NOTIFY_TYPING_CURRENT: case PREF_NOTIFY_TYPING_CURRENT:
case PREF_SPLASH: case PREF_SPLASH:
case PREF_OCCUPANTS:
return TRUE; return TRUE;
default: default:
return FALSE; return FALSE;

View File

@ -57,6 +57,7 @@ typedef enum {
PREF_INTYPE, PREF_INTYPE,
PREF_HISTORY, PREF_HISTORY,
PREF_MOUSE, PREF_MOUSE,
PREF_OCCUPANTS,
PREF_STATUSES, PREF_STATUSES,
PREF_STATUSES_CONSOLE, PREF_STATUSES_CONSOLE,
PREF_STATUSES_CHAT, PREF_STATUSES_CHAT,

View File

@ -46,6 +46,7 @@
#endif #endif
#include "config/theme.h" #include "config/theme.h"
#include "config/preferences.h"
#include "ui/ui.h" #include "ui/ui.h"
#include "ui/window.h" #include "ui/window.h"
#include "xmpp/xmpp.h" #include "xmpp/xmpp.h"
@ -60,7 +61,7 @@ win_create(const char * const title, int cols, win_type_t type)
ProfWin *new_win = malloc(sizeof(struct prof_win_t)); ProfWin *new_win = malloc(sizeof(struct prof_win_t));
new_win->from = strdup(title); new_win->from = strdup(title);
if (type == WIN_MUC) { if (type == WIN_MUC && prefs_get_boolean(PREF_OCCUPANTS)) {
new_win->win = newpad(PAD_SIZE, (cols/OCCUPANT_WIN_RATIO) * (OCCUPANT_WIN_RATIO-1)); new_win->win = newpad(PAD_SIZE, (cols/OCCUPANT_WIN_RATIO) * (OCCUPANT_WIN_RATIO-1));
wbkgd(new_win->win, COLOUR_TEXT); wbkgd(new_win->win, COLOUR_TEXT);