Option to show version in title bar with /titlebarversion

This commit is contained in:
James Booth
2012-11-29 20:34:52 +00:00
parent ed6c6b36c0
commit 1780148f59
4 changed files with 48 additions and 3 deletions

View File

@@ -118,6 +118,7 @@ static gboolean _cmd_set_history(gchar **args, struct cmd_help_t help);
static gboolean _cmd_set_states(gchar **args, struct cmd_help_t help);
static gboolean _cmd_set_outtype(gchar **args, struct cmd_help_t help);
static gboolean _cmd_set_autoping(gchar **args, struct cmd_help_t help);
static gboolean _cmd_set_titlebarversion(gchar **args, struct cmd_help_t help);
static gboolean _cmd_vercheck(gchar **args, struct cmd_help_t help);
static gboolean _cmd_away(gchar **args, struct cmd_help_t help);
static gboolean _cmd_online(gchar **args, struct cmd_help_t help);
@@ -429,6 +430,14 @@ static struct cmd_t setting_commands[] =
"and each time the /about command is run.",
NULL } } },
{ "/titlebarversion",
_cmd_set_titlebarversion, parse_args, 1, 1,
{ "/titlebarversion on|off", "Check for a new release.",
{ "/titlebarversion on|off",
"------------------",
"Show the version in the title bar of the window.",
NULL } } },
{ "/chlog",
_cmd_set_chlog, parse_args, 1, 1,
{ "/chlog on|off", "Chat logging to file",
@@ -911,6 +920,8 @@ _cmd_complete_parameters(char *input, int *size)
prefs_autocomplete_boolean_choice);
_parameter_autocomplete(input, size, "/vercheck",
prefs_autocomplete_boolean_choice);
_parameter_autocomplete(input, size, "/titlebarversion",
prefs_autocomplete_boolean_choice);
_parameter_autocomplete(input, size, "/msg",
contact_list_find_contact);
@@ -1505,6 +1516,13 @@ _cmd_set_states(gchar **args, struct cmd_help_t help)
"Sending chat states", prefs_set_states);
}
static gboolean
_cmd_set_titlebarversion(gchar **args, struct cmd_help_t help)
{
return _cmd_set_boolean_preference(args, help, "/titlebarversion",
"Show version in window title", prefs_set_titlebarversion);
}
static gboolean
_cmd_set_outtype(gchar **args, struct cmd_help_t help)
{