@@ -194,6 +194,7 @@ static Autocomplete blocked_ac;
|
||||
static Autocomplete tray_ac;
|
||||
static Autocomplete presence_ac;
|
||||
static Autocomplete presence_setting_ac;
|
||||
static Autocomplete inputwin_ac;
|
||||
|
||||
void
|
||||
cmd_ac_init(void)
|
||||
@@ -735,6 +736,10 @@ cmd_ac_init(void)
|
||||
autocomplete_add(presence_setting_ac, "all");
|
||||
autocomplete_add(presence_setting_ac, "online");
|
||||
autocomplete_add(presence_setting_ac, "none");
|
||||
|
||||
inputwin_ac = autocomplete_new();
|
||||
autocomplete_add(inputwin_ac, "top");
|
||||
autocomplete_add(inputwin_ac, "bottom");
|
||||
}
|
||||
|
||||
void
|
||||
@@ -998,6 +1003,7 @@ cmd_ac_reset(ProfWin *window)
|
||||
autocomplete_reset(tray_ac);
|
||||
autocomplete_reset(presence_ac);
|
||||
autocomplete_reset(presence_setting_ac);
|
||||
autocomplete_reset(inputwin_ac);
|
||||
|
||||
autocomplete_reset(script_ac);
|
||||
if (script_show_ac) {
|
||||
@@ -1120,6 +1126,7 @@ cmd_ac_uninit(void)
|
||||
autocomplete_free(tray_ac);
|
||||
autocomplete_free(presence_ac);
|
||||
autocomplete_free(presence_setting_ac);
|
||||
autocomplete_free(inputwin_ac);
|
||||
}
|
||||
|
||||
static char*
|
||||
@@ -1200,8 +1207,8 @@ _cmd_ac_complete_params(ProfWin *window, const char *const input)
|
||||
}
|
||||
}
|
||||
|
||||
gchar *cmds[] = { "/prefs", "/disco", "/room", "/autoping" };
|
||||
Autocomplete completers[] = { prefs_ac, disco_ac, room_ac, autoping_ac };
|
||||
gchar *cmds[] = { "/prefs", "/disco", "/room", "/autoping", "/inputwin" };
|
||||
Autocomplete completers[] = { prefs_ac, disco_ac, room_ac, autoping_ac, inputwin_ac };
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(cmds); i++) {
|
||||
result = autocomplete_param_with_ac(input, cmds[i], completers[i], TRUE);
|
||||
@@ -1250,7 +1257,7 @@ _cmd_ac_complete_params(ProfWin *window, const char *const input)
|
||||
g_hash_table_insert(ac_funcs, "/sendfile", _sendfile_autocomplete);
|
||||
g_hash_table_insert(ac_funcs, "/blocked", _blocked_autocomplete);
|
||||
g_hash_table_insert(ac_funcs, "/tray", _tray_autocomplete);
|
||||
g_hash_table_insert(ac_funcs, "/presence", _presence_autocomplete);
|
||||
g_hash_table_insert(ac_funcs, "/presence", _presence_autocomplete);
|
||||
|
||||
int len = strlen(input);
|
||||
char parsed[len+1];
|
||||
|
||||
Reference in New Issue
Block a user