Skip to content

Commit

Permalink
Better EDID Window
Browse files Browse the repository at this point in the history
  • Loading branch information
eloaders committed Jan 18, 2014
1 parent a80aeb8 commit fa1e35d
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 14 deletions.
2 changes: 2 additions & 0 deletions src/i-nex/.settings
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[Bookmarks]
CFlags=[9]
Finfosys=[]
FEDID=[]

[Breakpoints]
Count=0
Expand Down
59 changes: 57 additions & 2 deletions src/i-nex/.src/FEDID.class
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,77 @@
'
' You should have received a copy of the GNU General Public License
' along with this program. If not, see <http://www.gnu.org/licenses/>.

Private Label[200] As Label
Private ToolButton[200] As ToolButton
Public Logs As New Logger
Public Sub Form_Open()
Dim data As Stream
Dim i, MaxCount As Integer
Dim sLine As String
Dim EDID As New String[]

If Settings["Window/X"] = Null Then
Me.Center
Else
Me.X = Settings["Window/X", Me.X]
Me.Y = Settings["Window/Y", Me.Y]
Endif

Logs("Execute edid", Logger.Info)
Shell "xrandr --verbose | inex-edid" Wait To TextArea1.Text

data = Shell "xrandr --verbose | inex-edid" For Input

While Not Eof(data)
Line Input #data, sLine
MaxCount += 1
EDID.Add(sLine, MaxCount)
Wend

For i = 1 To MaxCount
Label[i] = New Label(ScrollView1)
With Label[i]
.X = 2
If i = 1 Then
.Y = 2
Else
.Y = Int(i * 20)
Endif
.Width = 440
.Height = 21
.Border = Border.Raised
.Padding = 3
.Font.Bold = True
.Text = EDID[i - 1]
End With
Next

For i = 1 To MaxCount
ToolButton[i] = New ToolButton(ScrollView1) As "CopyGroup"
With ToolButton[i]
.X = 420
If i = 1 Then
.Y = 2
Else
.Y = Int(i * 20)
Endif
.Width = 21
.Height = 21
.Picture = Picture["AppIcons/edit-copy.png"]
.Tooltip = "Copy"
.Name = EDID[i - 1]
End With
Next
End

Public Sub Button1_Click()

Me.Close

End

Public Sub CopyGroup_Click()

Clipboard.Copy(Last.Name)

End

17 changes: 5 additions & 12 deletions src/i-nex/.src/FEDID.form
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,16 @@
{ Form Form
MoveScaled(0,0,68,77)
Font = Font["8"]
Text = ("EDID")
Icon = Picture["i-nex.png"]
Resizable = False
{ VBox1 VBox
MoveScaled(0,0,68,73)
Expand = True
{ TextArea1 TextArea
MoveScaled(0,0,62,62)
#Translate = False
Font = Font["8"]
Expand = True
Text = "TextArea1"
ReadOnly = True
}
}
{ Button1 Button
MoveScaled(59,73,9,4)
Font = Font["Bold,8"]
Text = ("Close")
Picture = Picture["icon:/16/quit"]
}
{ ScrollView1 ScrollView
MoveScaled(0,0,68,73)
}
}

0 comments on commit fa1e35d

Please sign in to comment.