spicec: Add a --title cmdline option (rhbz#662452)

This commit is contained in:
Hans de Goede 2010-12-13 15:37:37 +01:00
parent 367a5c8c3a
commit 4009747d2c

View File

@ -2177,6 +2177,7 @@ bool Application::process_cmd_line(int argc, char** argv)
SPICE_OPT_DISPLAY_COLOR_DEPTH,
SPICE_OPT_DISABLE_DISPLAY_EFFECTS,
SPICE_OPT_CONTROLLER,
SPICE_OPT_TITLE,
};
#ifdef USE_GUI
@ -2235,6 +2236,8 @@ bool Application::process_cmd_line(int argc, char** argv)
parser.add(SPICE_OPT_CONTROLLER, "controller", "enable external controller");
parser.add(SPICE_OPT_TITLE, "title", "set window title", "title", true, 't');
for (int i = SPICE_CHANNEL_MAIN; i < SPICE_END_CHANNEL; i++) {
_peer_con_opt[i] = RedPeer::ConnectionOptions::CON_OP_INVALID;
}
@ -2340,6 +2343,9 @@ bool Application::process_cmd_line(int argc, char** argv)
}
_enable_controller = true;
return true;
case SPICE_OPT_TITLE:
set_title(val);
break;
case CmdLineParser::OPTION_HELP:
parser.show_help();
return false;