mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-02 21:37:24 +08:00
unused variables removed
This commit is contained in:
@@ -39,7 +39,7 @@ class alert (widget: GBin.frame) =
|
|||||||
in
|
in
|
||||||
let view = GText.view ~editable:false ~packing: scrolled#add () in
|
let view = GText.view ~editable:false ~packing: scrolled#add () in
|
||||||
(* the object itselft *)
|
(* the object itselft *)
|
||||||
object (self)
|
object
|
||||||
val mutable last = ""
|
val mutable last = ""
|
||||||
method add text =
|
method add text =
|
||||||
if text <> last then begin
|
if text <> last then begin
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ let table = GPack.table ~rows: 1 ~columns: 1 ~row_spacings: 5 ~packing: (scrolle
|
|||||||
|
|
||||||
|
|
||||||
type t = {
|
type t = {
|
||||||
gauge: GMisc.drawing_area * (GDraw.pixmap option ref);
|
gauge: GMisc.drawing_area;
|
||||||
labels: (string * (GBin.event_box * GMisc.label)) list;
|
labels: (string * (GBin.event_box * GMisc.label)) list;
|
||||||
buttons_box : GPack.box
|
buttons_box : GPack.box
|
||||||
}
|
}
|
||||||
@@ -78,7 +78,6 @@ let add config color select center_ac commit_moves mark =
|
|||||||
(* battery gauge *)
|
(* battery gauge *)
|
||||||
let gauge = GMisc.drawing_area ~height:60 ~show:true ~packing:(strip#attach ~top:1 ~bottom:(rows-1) ~left:0) () in
|
let gauge = GMisc.drawing_area ~height:60 ~show:true ~packing:(strip#attach ~top:1 ~bottom:(rows-1) ~left:0) () in
|
||||||
gauge#misc#realize ();
|
gauge#misc#realize ();
|
||||||
let {Gtk.x=x0; y=y0; width=width; height=height} = gauge#misc#allocation in
|
|
||||||
|
|
||||||
(* Telemetry *)
|
(* Telemetry *)
|
||||||
let eb = GBin.event_box ~packing:(strip#attach ~top:(rows-1) ~left:0) () in
|
let eb = GBin.event_box ~packing:(strip#attach ~top:(rows-1) ~left:0) () in
|
||||||
@@ -111,7 +110,7 @@ let add config color select center_ac commit_moves mark =
|
|||||||
(* User buttons *)
|
(* User buttons *)
|
||||||
let hbox = GPack.hbox ~packing:framevb#add () in
|
let hbox = GPack.hbox ~packing:framevb#add () in
|
||||||
|
|
||||||
{gauge=(gauge, ref None) ; labels= !strip_labels; buttons_box = hbox}
|
{gauge=gauge ; labels= !strip_labels; buttons_box = hbox}
|
||||||
|
|
||||||
|
|
||||||
(** set a label *)
|
(** set a label *)
|
||||||
@@ -131,8 +130,8 @@ let set_color strip name color =
|
|||||||
|
|
||||||
(** set the battery *)
|
(** set the battery *)
|
||||||
let set_bat ?(color="green") strip value =
|
let set_bat ?(color="green") strip value =
|
||||||
let gauge, drref = strip.gauge in
|
let gauge = strip.gauge in
|
||||||
let {Gtk.x=x0; y=y0; width=width; height=height} = gauge#misc#allocation in
|
let {Gtk.width=width; height=height} = gauge#misc#allocation in
|
||||||
let dr = GDraw.pixmap ~width ~height ~window:gauge () in
|
let dr = GDraw.pixmap ~width ~height ~window:gauge () in
|
||||||
dr#set_foreground (`NAME "orange");
|
dr#set_foreground (`NAME "orange");
|
||||||
dr#rectangle ~x:0 ~y:0 ~width ~height ~filled:true ();
|
dr#rectangle ~x:0 ~y:0 ~width ~height ~filled:true ();
|
||||||
|
|||||||
Reference in New Issue
Block a user