Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:munix9
gambas3
bp-ae06e0c18a140b422304481425d00e0d076a4532.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bp-ae06e0c18a140b422304481425d00e0d076a4532.patch of Package gambas3
From ae06e0c18a140b422304481425d00e0d076a4532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= <benoit.minisini@gambas-basic.org> Date: Wed, 20 Mar 2024 23:41:54 +0100 Subject: [PATCH] System information dialog: Read '/etc/os-release' first. [DEVELOPMENT ENVIRONMENT] * BUG: Project open dialog: Clip branch name when it is too long. * BUG: System information dialog: Read '/etc/os-release' first. --- app/src/gambas3/.src/Project/ProjectBox.class | 7 +++-- .../gambas3/.src/Welcome/FSystemInfo.class | 26 ++++++++++++++----- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/app/src/gambas3/.src/Project/ProjectBox.class b/app/src/gambas3/.src/Project/ProjectBox.class index af530f288..a6d67e434 100644 --- a/app/src/gambas3/.src/Project/ProjectBox.class +++ b/app/src/gambas3/.src/Project/ProjectBox.class @@ -374,13 +374,16 @@ Public Sub DrawingArea_Draw() DRAW_BRANCH: Paint.Font.Grade = -2 - WB = Paint.TextSize($hProjectInfo.Branch).Width + P * 2 + + sText = Paint.TrimText($hProjectInfo.Branch, Paint.W - XB - P * 2) + + WB = Paint.TextSize(sText).Width + P * 2 Paint.Rectangle(XB, YB, WB, HB, P * 2) Paint.Background = VersionControl.GetBranchColor($hProjectInfo.Branch) Paint.Fill Paint.Background = Color.TextBackground - Paint.DrawText($hProjectInfo.Branch, XB, YB, WB, HB, Align.Center) + Paint.DrawText(sText, XB, YB, WB, HB, Align.Center) Paint.Background = Color.TextForeground Paint.Font.Grade = 0 diff --git a/app/src/gambas3/.src/Welcome/FSystemInfo.class b/app/src/gambas3/.src/Welcome/FSystemInfo.class index f0ccbacaf..32c39a885 100644 --- a/app/src/gambas3/.src/Welcome/FSystemInfo.class +++ b/app/src/gambas3/.src/Welcome/FSystemInfo.class @@ -55,8 +55,8 @@ End Static Private Sub GetDistribution() As String - Dim cDist As Collection = ["lsb-release": "/etc/lsb-release", "vector": "/etc/vector-version", "slackware": "/etc/slackware-version", "debian": "/etc/debian_version", - "redhat": "/etc/redhat-release", "arch": "/etc/arch-release", "SuSE": "/etc/os-release", "gentoo": "/etc/gentoo-release", "conectiva": "/etc/conectiva-release", + Dim cDist As Collection = ["os-release": "/etc/os-release", "lsb-release": "/etc/lsb-release", "vector": "/etc/vector-version", "slackware": "/etc/slackware-version", "debian": "/etc/debian_version", + "redhat": "/etc/redhat-release", "arch": "/etc/arch-release", "gentoo": "/etc/gentoo-release", "conectiva": "/etc/conectiva-release", "mandriva": "/etc/mandriva-release", "pardus": "/etc/pardus-release", "kanotix": "/etc/kanotix-release"] Dim sPath As String Dim sDistro As String @@ -73,6 +73,9 @@ Static Private Sub GetDistribution() As String sDistro = cData["DISTRIB_DESCRIPTION"] If sDistro Then Return sDistro Return cData["DISTRIB_ID"] & " " & cData["DISTRIB_RELEASE"] + Else If sDistro = "os-release" Then + cData = ReadLsbRelease(sPath) + Return cData["NAME"] & " " & cData["VERSION"] Else Return sDistro & " " & Trim(File.Load(sPath)) Endif @@ -320,18 +323,29 @@ Public Sub Process_Read() Dim hProcess As Process = Last Dim sData As String + Dim iPos As Integer + Dim sBuffer As String sData = Read #hProcess, Lof(hProcess) - Try sData = Split(sData, "\n", "", True)[0] - $aText[$iRowVersion] &= sData - gvwInfo[$iRowVersion, 2].Text = sData - Inc $iRowVersion + + If gvwInfo[$iRowVersion, 2].Text Then Return + + sBuffer = hProcess.Tag & sData + iPos = InStr(sBuffer, "\n") + If iPos = 0 Then + hProcess.Tag = sBuffer + Return + Endif + + $aText[$iRowVersion] &= Left(sBuffer, iPos - 1) + gvwInfo[$iRowVersion, 2].Text = Left(sBuffer, iPos - 1) End Public Sub Process_Kill() GetNextVersion() + Inc $iRowVersion End -- GitLab
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor