Add a command line option to disable native titlebar

This commit is contained in:
Paul Rouget 2015-09-29 08:49:01 +02:00
parent d39c8546b6
commit 5be60f2c79
2 changed files with 7 additions and 0 deletions

View file

@ -167,6 +167,9 @@ pub struct Opts {
/// True to exit after the page load (`-x`).
pub exit_after_load: bool,
/// Do not use native titlebar
pub no_native_titlebar: bool,
}
fn print_usage(app: &str, opts: &Options) {
@ -411,6 +414,7 @@ pub fn default_opts() -> Opts {
disable_share_style_cache: false,
parallel_display_list_building: false,
exit_after_load: false,
no_native_titlebar: false,
}
}
@ -451,6 +455,7 @@ pub fn from_cmdline_args(args: &[String]) {
opts.optflag("", "sniff-mime-types" , "Enable MIME sniffing");
opts.optmulti("", "pref",
"A preference to set to enable", "dom.mozbrowser.enabled");
opts.optflag("b", "no-native-titlebar", "Do not use native titlebar");
let opt_match = match opts.parse(args) {
Ok(m) => m,
@ -614,6 +619,7 @@ pub fn from_cmdline_args(args: &[String]) {
disable_share_style_cache: debug_options.disable_share_style_cache,
parallel_display_list_building: debug_options.parallel_display_list_building,
exit_after_load: opt_match.opt_present("x"),
no_native_titlebar: opt_match.opt_present("b"),
};
set_defaults(opts);