Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
ximper-system-updater
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
ximper-system-updater
Commits
b06d78d9
Commit
b06d78d9
authored
Dec 01, 2025
by
Roman Alifanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix ui freeze
parent
40bc9bed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
17 deletions
+22
-17
packagerows.go
packagerows.go
+22
-17
No files found.
packagerows.go
View file @
b06d78d9
...
@@ -10,6 +10,7 @@ import (
...
@@ -10,6 +10,7 @@ import (
_
"embed"
_
"embed"
"github.com/diamondburned/gotk4-adwaita/pkg/adw"
"github.com/diamondburned/gotk4-adwaita/pkg/adw"
"github.com/diamondburned/gotk4/pkg/glib/v2"
"github.com/diamondburned/gotk4/pkg/gtk/v4"
"github.com/diamondburned/gotk4/pkg/gtk/v4"
)
)
...
@@ -79,7 +80,6 @@ func NewUpdateRow(name string, info apm.PackageChanges, runUpgradeCallback func(
...
@@ -79,7 +80,6 @@ func NewUpdateRow(name string, info apm.PackageChanges, runUpgradeCallback func(
}
}
pkgsWithInfo
:=
make
(
map
[
string
]
apm
.
InfoResponse
)
pkgsWithInfo
:=
make
(
map
[
string
]
apm
.
InfoResponse
)
var
mu
sync
.
Mutex
var
mu
sync
.
Mutex
var
wg
sync
.
WaitGroup
var
wg
sync
.
WaitGroup
...
@@ -87,8 +87,8 @@ func NewUpdateRow(name string, info apm.PackageChanges, runUpgradeCallback func(
...
@@ -87,8 +87,8 @@ func NewUpdateRow(name string, info apm.PackageChanges, runUpgradeCallback func(
for
_
,
p
:=
range
pkgs
{
for
_
,
p
:=
range
pkgs
{
wg
.
Add
(
1
)
wg
.
Add
(
1
)
pkg
:=
p
go
func
(
pkg
string
)
{
go
func
()
{
defer
wg
.
Done
()
defer
wg
.
Done
()
sem
<-
struct
{}{}
sem
<-
struct
{}{}
...
@@ -99,26 +99,31 @@ func NewUpdateRow(name string, info apm.PackageChanges, runUpgradeCallback func(
...
@@ -99,26 +99,31 @@ func NewUpdateRow(name string, info apm.PackageChanges, runUpgradeCallback func(
mu
.
Lock
()
mu
.
Lock
()
pkgsWithInfo
[
pkg
]
=
info
pkgsWithInfo
[
pkg
]
=
info
mu
.
Unlock
()
mu
.
Unlock
()
}(
p
)
}()
}
}
wg
.
Wait
()
go
func
(
title
string
)
{
wg
.
Wait
()
row
:=
adw
.
NewActionRow
()
glib
.
IdleAdd
(
func
()
{
row
.
SetTitle
(
title
)
row
:=
adw
.
NewActionRow
()
row
.
SetActivatable
(
true
)
row
.
SetTitle
(
title
)
row
.
SetActivatable
(
true
)
page
:=
NewListPage
(
runUpgradeCallback
)
page
:=
NewListPage
(
runUpgradeCallback
)
row
.
ConnectActivated
(
func
()
{
row
.
ConnectActivated
(
func
()
{
win
.
navView
.
Push
(
page
.
nav
)
win
.
navView
.
Push
(
page
.
nav
)
})
})
for
p
,
info
:=
range
pkgsWithInfo
{
for
p
,
info
:=
range
pkgsWithInfo
{
ar
:=
NewPackageRow
(
p
,
info
.
PackageInfo
)
ar
:=
NewPackageRow
(
p
,
info
.
PackageInfo
)
page
.
listbox
.
Append
(
ar
)
page
.
listbox
.
Append
(
ar
)
}
}
upage
.
listbox
.
Append
(
row
)
upage
.
listbox
.
Append
(
row
)
})
}(
title
)
}
}
return
urow
return
urow
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment