Skip to content

Commit

Permalink
Added thermal_zone.module
Browse files Browse the repository at this point in the history
Try to fix Drives
  • Loading branch information
eloaders committed Feb 14, 2012
1 parent 7ddbc0f commit bb0662c
Show file tree
Hide file tree
Showing 8 changed files with 286 additions and 240 deletions.
220 changes: 110 additions & 110 deletions src/i-nex/.lang/.pot

Large diffs are not rendered by default.

220 changes: 110 additions & 110 deletions src/i-nex/.lang/Finfosys.pot

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions src/i-nex/.lang/thermal_zone.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# /home/michal/Baazar/i-nex/src/i-nex/.src/thermal_zone.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"

11 changes: 6 additions & 5 deletions src/i-nex/.settings
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ SearchString=True

[OpenFile]
File[1]=".src/Finfosys.form"
File[2]=".src/Finfosys.class:136.12"
File[2]=".src/Finfosys.class:545.1"
File[3]=".src/Global.class:127.23"
File[4]=".src/About.form"
File[5]=".src/About.class:63.30"
File[6]=".src/distrodetect.class:12.30"
File[7]=".src/battery.module:24.17"
File[8]=".src/Disk_Drives.module:88.101"
Active=8
File[8]=".src/Disk_Drives.module:130.0"
File[9]=".src/ScreenShot.form"
File[10]=".src/ScreenShot.class:19.19"
File[11]=".src/ScreenShotM.module:2.21"
Expand All @@ -36,9 +37,9 @@ File[18]=".src/FReport_Gen.class:33.1"
File[19]=".src/Start_App_Args.form"
File[20]=".src/Start_App_Args.class:3.25"
File[21]=".src/ChkPrm.module:14.3"
Active=22
File[22]=".src/Reports/BIOS_microcode_update_recommended.module:9.96"
Count=22
File[22]=".src/BIOS_microcode_update_recommended.module:9.96"
File[23]=".src/thermal_zone.module:8.32"
Count=23

[Watches]
Count=0
Expand Down
14 changes: 10 additions & 4 deletions src/i-nex/.src/Disk_Drives.module
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,11 @@ Public Sub get_informations()
Shell "cat /sys/block/" & Finfosys.ComboBox4.Text & "/queue/read_ahead_kb" Wait To read_ahead_kb
Shell "cat /sys/block/" & Finfosys.ComboBox4.Text & "/queue/scheduler" Wait To scheduler
Shell "cat /sys/block/" & Finfosys.ComboBox4.Text & "/" & Finfosys.ComboBox3.Text & "/size" Wait To real_size
Shell "grep '" & Finfosys.ComboBox3.Text & "' /proc/mounts | awk {'print $4'}" Wait To mount_widtch
Shell "grep '" & Finfosys.ComboBox3.Text & "' /proc/mounts | awk {'print $2'}" Wait To mount_point
Shell "grep '" & Finfosys.ComboBox3.Text & "' /proc/mounts | awk {'print $3'}" Wait To filesystem_type
Shell "ls -l /dev/disk/by-uuid/ | grep " & Finfosys.ComboBox3.Text & " | awk {'print $8'}" Wait To device_uuid
Shell "swapon -s | sed -n '2p' | awk {'print $1'} | cut -d '/' -f 3" Wait To check_swap
Shell "df | grep '" & Finfosys.ComboBox3.Text & "' | awk {'print $5'} | sed -n '1p'" Wait To used
Debug "Get informations of Drives Done"
Debug "Replace new line to Null"
disks()
rm_new_line()

End
Expand Down Expand Up @@ -132,3 +129,12 @@ Public Sub rm_new_line()

End

Public Sub disks()
Shell "grep '" & Finfosys.ComboBox3.Text & "' /proc/mounts | awk {'print $4'}" Wait To mount_widtch
Shell "df | grep '" & Finfosys.ComboBox3.Text & "' | awk {'print $6'} | sed -n '1p'" Wait To mount_point
Shell "ls -l /dev/disk/by-uuid/ | grep " & Finfosys.ComboBox3.Text & " | awk {'print $8'}" Wait To device_uuid
Shell "grep '" & Finfosys.ComboBox3.Text & "' /proc/mounts | awk {'print $3'}" Wait To filesystem_type
If mount_widtch = Null And device_uuid Not Null Then
Shell "grep '" & device_uuid & "' /proc/mounts | awk {'print $4'}" Wait To mount_widtch
Endif
End
11 changes: 3 additions & 8 deletions src/i-nex/.src/Finfosys.class
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Public Sub Form_Open()
Finfosys.TabStrip1[9].Visible = False
Debug "Check for BIOS microcode update recommended"
Object.Call(BIOS_microcode_update_recommended, "_inits")
Debug "Check Thermal"
Object.Call(thermal_zone, "_inits")
Debug "Check for Battery"
Object.Call(battery, "_inits")
Debug "Check for Usb device plugged"
Expand Down Expand Up @@ -541,14 +543,7 @@ Public Sub refreshing()
Else
Label48.Visible = False
Endif
If Disk_Drives.mount_point = Null And Disk_Drives.device_uuid Not Null And Exist("/media/" & Disk_Drives.device_uuid & "", True) Then
Shell "ls /media | grep '" & Disk_Drives.device_uuid & "'" Wait To realmount
Disk_Drives.mount_point = "/media/" & realmount & ""
Endif
If Disk_Drives.mount_widtch = Null And Disk_Drives.device_uuid = Not Null Then
Shell "grep '" & Disk_Drives.device_uuid & "' /proc/mounts | awk {'print $4'}" Wait To realwith
Disk_Drives.mount_widtch = realwith
Endif

TextArea8.Text = Disk_Drives.mount_point
TextArea7.Text = Disk_Drives.device_uuid
TextArea6.Text = Disk_Drives.mount_widtch
Expand Down
18 changes: 15 additions & 3 deletions src/i-nex/.src/Finfosys.form
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,21 @@
Expand = True
}
}
{ Label92 Label
Move(6,108,360,24)
Foreground = &HFF0000&
{ HBox24 HBox
Move(6,114,252,24)
{ Label92 Label
Move(0,0,204,24)
Foreground = &HFF0000&
AutoResize = True
}
}
{ HBox25 HBox
Move(264,114,102,24)
{ Label93 Label
Move(0,0,84,24)
Font = Font["Bold"]
AutoResize = True
}
}
}
{ PictureBox3 PictureBox
Expand Down
16 changes: 16 additions & 0 deletions src/i-nex/.src/thermal_zone.module
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
' Gambas module file

Public Sub _inits()
Dim Temperature As String
Dim calculate As Float
If Exist("/sys/bus/acpi/devices/LNXTHERM:00/thermal_zone/") Then
Shell "cat /sys/bus/acpi/devices/LNXTHERM:00/thermal_zone/temp" Wait To Temperature
calculate = Replace(Replace(Temperature, " ", ""), "\n", "")
Finfosys.Label93.Text = "Temp: " & (calculate / 1000) & " C"
Else
Finfosys.Label93.Visible = False
Endif


End

0 comments on commit bb0662c

Please sign in to comment.