-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add gui for udisks --show-info and some fixes in GUI and more standards
I-Nex any windows have this same width and height. Change screenshot, picture is now big In drivers, add gui for udisks
- Loading branch information
Showing
7 changed files
with
205 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# /home/michal/Baazar/i-nex/src/i-nex/.src/FCPU.module | ||
# Generated by Gambas compiler | ||
|
||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | ||
# | ||
#, fuzzy | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: PACKAGE VERSION\n""POT-Creation-Date: 2002-11-01 04:27+0100\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <LL@li.org>\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# /home/michal/Baazar/git-i-nex/src/i-nex/.src/FUdisks.class | ||
# Generated by Gambas compiler | ||
|
||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | ||
# | ||
#, fuzzy | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: PACKAGE VERSION\n""POT-Creation-Date: 2002-11-01 04:27+0100\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <LL@li.org>\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
|
||
#: FUdisks.form:16 | ||
msgid "UDisks" | ||
msgstr "" | ||
|
||
#: FUdisks.form:29 | ||
msgid "Close this program" | ||
msgstr "" | ||
|
||
#: FUdisks.form:30 | ||
msgid "Close" | ||
msgstr "" | ||
|
||
#: FUdisks.form:54 | ||
msgid "About this app" | ||
msgstr "" | ||
|
||
#: FUdisks.form:60 | ||
msgid "Generate report" | ||
msgstr "" | ||
|
||
#: FUdisks.form:67 | ||
msgid "Report a bug" | ||
msgstr "" | ||
|
||
#: FUdisks.form:74 | ||
msgid "ComboBox1" | ||
msgstr "" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
' Gambas module file | ||
|
||
' | ||
Public Sub _init() | ||
|
||
Dim central_processor_unit As String = Finfosys.cpu | ||
central_processor_unit = Replace(Replace(Replace(central_processor_unit, "(", ""), "(", ""), "\n", "") | ||
central_processor_unit = Replace(Replace(central_processor_unit, "TM", ""), "R", "") | ||
|
||
End |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
' Gambas class file | ||
|
||
|
||
Public Sub Form_Open() | ||
Udisks | ||
Finfosys.Hide | ||
Me.Center | ||
End | ||
|
||
Public Sub Button1_Click() | ||
|
||
ScreenShotM.pic = Desktop.Screenshot(Me.X, Me.Y, Me.W + 4, Me.H + 30) | ||
ScreenShot.Show | ||
|
||
End | ||
|
||
Public Sub Button2_Click() | ||
|
||
Me.Close | ||
Finfosys.Show | ||
End | ||
|
||
Public Sub Form_Close() | ||
|
||
Me.Close | ||
Finfosys.Show | ||
|
||
End | ||
|
||
Public Sub Udisks() | ||
|
||
Dim sdx As String | ||
Dim Avail_HDD As Integer | ||
Dim Max_HDD As Integer | ||
Dim cache As String | ||
Debug "Add Drives to ComboBox" | ||
Shell "ls /sys/block/ | grep -e 'sd' -e 'sr' | tr ' ' '\n' | wc -l" Wait To cache | ||
Max_HDD = Val(cache) | ||
For Avail_HDD = 1 To Max_HDD | ||
Shell "ls /sys/block/ | grep -e 'sd' -e 'sr' | tr ' ' '\n' | sed -n '" & Avail_HDD & "p'" Wait To sdx | ||
sdx = Replace(sdx, "\n", "") | ||
ComboBox1.Add(sdx) | ||
Next | ||
Debug "Get information from udisks --show-info" | ||
Udisks_get_info | ||
End | ||
|
||
Public Sub Udisks_get_info() | ||
Dim native_path, device, device_file, presentation, by_id_1, by_id_2, by_id_3, by_path, detected_at, system_internal, removable, has_media As String | ||
Shell "udisks --show-info /dev/" & ComboBox1.Text & " >/tmp/udisks_inex" | ||
Shell "grep 'native-path' /tmp/udisks_inex | awl {'print $2'}" Wait To native_path | ||
Shell "sed -n '3p' /tmp/udisks_inex | awk {'print $2'}" Wait To device | ||
Shell "grep 'device-file' /tmp/udisks_inex | awk {'print $2'}" Wait To device_file | ||
Shell "sed -n '5p' /tmp/udisks_inex | awk {'print $2'}" Wait To presentation | ||
Shell "grep 'by-id' /tmp/udisks_inex | sed -n '1p' | awk {'print $2'}" Wait To by_id_1 | ||
Shell "grep 'by-id' /tmp/udisks_inex | sed -n '2p' | awk {'print $2'}" Wait To by_id_2 | ||
Shell "grep 'by-id' /tmp/udisks_inex | sed -n '3p' | awk {'print $2'}" Wait To by_id_3 | ||
Shell "grep 'by-path' /tmp/udisks_inex | awk {'print $2'}" Wait To by_path | ||
Shell "grep 'detected at:' /tmp/udisks_inex | cut -d ':' -f 2" Wait To detected_at | ||
Shell "grep 'system internal:' /tmp/udisks_inex | awk {'print $3'}" Wait To system_internal | ||
Shell "grep 'removable:' /tmp/udisks_inex | awk {'print $2'}" Wait To removable | ||
Shell "grep 'has media:' /tmp/udisks_inex | cut -d ':' -f 2" Wait To has_media | ||
|
||
End |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Gambas Form File 3.0 | ||
|
||
{ Form Form | ||
MoveScaled(0,0,70,75) | ||
ToolTip = ("UDisks") | ||
Text = ("UDisks") | ||
Icon = Picture["logo/i-nex.0.4.x.png"] | ||
Resizable = False | ||
{ Button1 Button | ||
MoveScaled(1,71,3,3.4286) | ||
Picture = Picture["icon:/16/camera"] | ||
} | ||
{ Button2 Button | ||
MoveScaled(56,71,12,3.4286) | ||
Font = Font["10"] | ||
ToolTip = ("Close this program") | ||
Text = ("Close") | ||
Picture = Picture["icon:/16/quit"] | ||
} | ||
{ HBox11 HBox | ||
MoveScaled(20,70,22.2857,5.1429) | ||
{ Label25 Label | ||
MoveScaled(11.1429,0.8571,6.8571,3.4286) | ||
Foreground = &HFF0000& | ||
AutoResize = True | ||
Alignment = Align.Center | ||
Transparent = True | ||
} | ||
} | ||
{ Button11 Button | ||
MoveScaled(15,71,3.4286,3.4286) | ||
Picture = Picture["logo/fb.png"] | ||
} | ||
{ Button3 Button | ||
MoveScaled(11,71,3.4286,3.4286) | ||
Font = Font["10"] | ||
ToolTip = ("About this app") | ||
Picture = Picture["icon:/16/help"] | ||
} | ||
{ Button12 Button | ||
MoveScaled(7,71,3.4286,3.4286) | ||
ToolTip = ("Generate report") | ||
Picture = Picture["icon:/16/printer"] | ||
} | ||
{ Button13 Button | ||
MoveScaled(4,71,3.4286,3.4286) | ||
Visible = False | ||
ToolTip = ("Report a bug") | ||
Picture = Picture["icon:/16/important"] | ||
} | ||
{ ComboBox1 ComboBox | ||
MoveScaled(48,71,9,4) | ||
ReadOnly = True | ||
Text = ("ComboBox1") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters