Skip to content

Commit

Permalink
Add Options dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
eloaders committed Jan 14, 2012
1 parent bc19f2b commit a787295
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/i-nex/.src/Options.class
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
' Gambas class file



Public Sub Form_Open()
Me.Center
ButtonBox1.Text = Setting.Settings["battery/patch", ButtonBox1.Text]
CheckBox1.Value = Setting.Settings["battery/active", CheckBox1.Value]
End

Public Sub ButtonBox1_Click()
Dialog.OpenFile
ButtonBox1.Text = Dialog.Path
End

Public Sub Button1_Click()

Setting.Settings["battery/patch"] = ButtonBox1.Text
Setting.Settings["battery/active"] = CheckBox1.Value
Object.Call(battery, "_init")
Object.Call(Finfosys, "battery_info")
Options.Close

End
20 changes: 20 additions & 0 deletions src/i-nex/.src/Options.form
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Gambas Form File 3.0

{ Form Form
MoveScaled(0,0,85,12)
Text = ("Options")
Icon = Picture["icon:/16/properties"]
Resizable = False
{ ButtonBox1 ButtonBox
MoveScaled(41,2,43,4)
}
{ Button1 Button
MoveScaled(68,7,16,4)
Text = ("Close & Save")
Picture = Picture["icon:/16/apply"]
}
{ CheckBox1 CheckBox
MoveScaled(1,1,40,5)
Text = ("Battery info patch\nExample: /proc/acpi/battery/BAT1/info")
}
}

0 comments on commit a787295

Please sign in to comment.