Skip to content

Commit

Permalink
[paparazzi center] add reload button
Browse files Browse the repository at this point in the history
Add reload button (and make padding a bit smaller).

Not sure how to call update_params from the build_handler...
Related to #1331
  • Loading branch information
flixr committed Sep 16, 2015
1 parent 0744668 commit ba8ae17
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 5 deletions.
63 changes: 58 additions & 5 deletions sw/supervision/paparazzicenter.glade
Expand Up @@ -341,13 +341,66 @@
<widget class="GtkAlignment" id="alignment65">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<property name="left_padding">8</property>
<child>
<widget class="GtkVBox" id="vbox_ac">
<widget class="GtkHBox" id="hbox_ac">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<placeholder/>
<widget class="GtkVBox" id="vbox_ac">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="button_refresh">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="has_tooltip">True</property>
<property name="tooltip" translatable="yes">Reload aircraft xml files.</property>
<property name="use_action_appearance">False</property>
<child>
<widget class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xscale">0</property>
<property name="yscale">0</property>
<child>
<widget class="GtkHBox" id="hbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">2</property>
<child>
<widget class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-refresh</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
</widget>
</child>
</widget>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
</child>
Expand Down Expand Up @@ -380,7 +433,7 @@
<widget class="GtkAlignment" id="alignment66">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<property name="left_padding">8</property>
<child>
<widget class="GtkEntry" id="entry_ac_id">
<property name="visible">True</property>
Expand Down Expand Up @@ -424,7 +477,7 @@
<widget class="GtkAlignment" id="alignment67">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<property name="left_padding">8</property>
<child>
<widget class="GtkHBox" id="hbox69">
<property name="visible">True</property>
Expand Down
3 changes: 3 additions & 0 deletions sw/supervision/pc_aircraft.ml
Expand Up @@ -403,6 +403,9 @@ let ac_combo_handler = fun gui (ac_combo:Gtk_tools.combo) target_combo flash_com
(* A/C id *)
ignore(gui#entry_ac_id#connect#changed ~callback:(fun () -> save_callback gui ac_combo tree_set tree_set_mod ()));

(* refresh button *)
ignore(gui#button_refresh#connect#clicked ~callback:(fun () -> update_params (Gtk_tools.combo_value ac_combo)));

(* Conf *)
List.iter (fun (name, subdir, label, button_browse, button_edit, editor, button_remove) ->
(* editor button callback *)
Expand Down

0 comments on commit ba8ae17

Please sign in to comment.