diff --git a/sw/lib/ocaml/gtk_tools.ml b/sw/lib/ocaml/gtk_tools.ml index fc902bdafc..ed2cfe1ee0 100644 --- a/sw/lib/ocaml/gtk_tools.ml +++ b/sw/lib/ocaml/gtk_tools.ml @@ -78,9 +78,9 @@ let combo_values_list = fun (combo : combo) -> let combo_separator = "--" -let combo = fun strings vbox -> +let combo = fun ?width strings vbox -> let (combo, (tree, column)) = - GEdit.combo_box_text ~packing:vbox#add ~strings () in + GEdit.combo_box_text ~packing:vbox#add ~strings ?width () in combo#set_active 0; combo#set_row_separator_func (Some (fun m row -> m#get ~row ~column = combo_separator)) ; diff --git a/sw/lib/ocaml/gtk_tools.mli b/sw/lib/ocaml/gtk_tools.mli index 33b6676c8c..417e13ca0d 100644 --- a/sw/lib/ocaml/gtk_tools.mli +++ b/sw/lib/ocaml/gtk_tools.mli @@ -48,7 +48,7 @@ type combo val combo_widget : combo -> GEdit.combo_box val combo_model : combo -> (GTree.list_store * string GTree.column) -val combo : string list -> < add : GObj.widget -> unit; .. > -> combo +val combo : ?width:int -> string list -> < add : GObj.widget -> unit; .. > -> combo val add_to_combo : combo -> string -> unit val combo_separator : string diff --git a/sw/supervision/paparazzicenter.ml b/sw/supervision/paparazzicenter.ml index 3f23c903aa..91bc80111b 100644 --- a/sw/supervision/paparazzicenter.ml +++ b/sw/supervision/paparazzicenter.ml @@ -209,8 +209,8 @@ let () = Utils.build_aircrafts (); let ac_combo = AC.parse_conf_xml gui#vbox_ac - and target_combo = Gtk_tools.combo ["sim";"fbw";"ap"] gui#vbox_target - and flash_combo = Gtk_tools.combo ["Default mode"] gui#vbox_flash in + and target_combo = Gtk_tools.combo ~width:50 ["sim";"fbw";"ap"] gui#vbox_target + and flash_combo = Gtk_tools.combo ~width:50 ["Default mode"] gui#vbox_flash in (Gtk_tools.combo_widget target_combo)#misc#set_sensitive false; (Gtk_tools.combo_widget flash_combo)#misc#set_sensitive false; diff --git a/sw/supervision/pc_control_panel.ml b/sw/supervision/pc_control_panel.ml index 6db7dff0b3..3d867fdb69 100644 --- a/sw/supervision/pc_control_panel.ml +++ b/sw/supervision/pc_control_panel.ml @@ -213,7 +213,7 @@ let supervision = fun ?file gui log (ac_combo : Gtk_tools.combo) (target_combo : in (* Sessions *) - let session_combo = Gtk_tools.combo [] gui#vbox_session in + let session_combo = Gtk_tools.combo ~width:50 [] gui#vbox_session in let remove_custom_sessions = fun () -> let (store, _column) = Gtk_tools.combo_model session_combo in