Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
P
pardus-flatpak-gui
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Pardus
ondokuz
pardus-flatpak-gui
Commits
1aca5eaa
Verified
Kaydet (Commit)
1aca5eaa
authored
May 06, 2020
tarafından
Erdem Ersoy
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add Cancel button for (un)installing and updating
üst
71714c78
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
2 deletions
+52
-2
installwindow.py
pardusflatpakgui/installwindow.py
+11
-0
uninstallwindow.py
pardusflatpakgui/uninstallwindow.py
+11
-0
updateallwindow.py
pardusflatpakgui/updateallwindow.py
+11
-0
actionwindow.glade
ui/actionwindow.glade
+19
-2
No files found.
pardusflatpakgui/installwindow.py
Dosyayı görüntüle @
1aca5eaa
...
...
@@ -94,6 +94,9 @@ class InstallWindow(object):
self
.
InstallWindow
.
set_title
(
_
(
"Installing..."
))
self
.
InstallWindow
.
show
()
self
.
InstallButtonCancel
=
install_builder
.
get_object
(
"ActionButtonCancel"
)
self
.
InstallButtonCancel
.
set_sensitive
(
True
)
self
.
InstallProgressBar
=
install_builder
.
get_object
(
"ActionProgressBar"
)
self
.
ProgressBarValue
=
int
(
self
.
InstallProgressBar
.
get_fraction
()
*
100
)
...
...
@@ -142,7 +145,11 @@ class InstallWindow(object):
GLib
.
idle_add
(
self
.
InstallTextBuffer
.
set_text
,
self
.
StatusText
,
priority
=
GLib
.
PRIORITY_DEFAULT
)
time
.
sleep
(
0.2
)
self
.
disconnect_handlers
(
handler_id_cancel
)
GLib
.
idle_add
(
self
.
InstallButtonCancel
.
set_sensitive
,
False
,
priority
=
GLib
.
PRIORITY_DEFAULT
)
def
install_progress_callback
(
self
,
transaction
,
operation
,
progress
):
ref_to_install
=
Flatpak
.
Ref
.
parse
(
operation
.
get_ref
())
...
...
@@ -251,6 +258,10 @@ class InstallWindow(object):
self
.
FlatpakTransaction
.
disconnect
(
self
.
handler_id_2
)
self
.
FlatpakTransaction
.
disconnect
(
self
.
handler_id_error
)
def
on_press_cancel
(
self
,
button
):
self
.
InstallCancellation
.
cancel
()
self
.
InstallWindow
.
hide_on_delete
()
def
on_delete_action_window
(
self
,
widget
,
event
):
self
.
InstallCancellation
.
cancel
()
widget
.
hide_on_delete
()
pardusflatpakgui/uninstallwindow.py
Dosyayı görüntüle @
1aca5eaa
...
...
@@ -93,6 +93,9 @@ class UninstallWindow(object):
self
.
UninstallWindow
.
set_title
(
_
(
"Uninstalling..."
))
self
.
UninstallWindow
.
show
()
self
.
UninstallButtonCancel
=
uninstall_builder
.
get_object
(
"ActionButtonCancel"
)
self
.
UninstallButtonCancel
.
set_sensitive
(
True
)
self
.
UninstallProgressBar
=
uninstall_builder
.
get_object
(
"ActionProgressBar"
)
self
.
ProgressBarValue
=
int
(
...
...
@@ -143,7 +146,11 @@ class UninstallWindow(object):
GLib
.
idle_add
(
self
.
UninstallTextBuffer
.
set_text
,
self
.
StatusText
,
priority
=
GLib
.
PRIORITY_DEFAULT
)
time
.
sleep
(
0.2
)
self
.
disconnect_handlers
(
handler_id_cancel
)
GLib
.
idle_add
(
self
.
UninstallButtonCancel
.
set_sensitive
,
False
,
priority
=
GLib
.
PRIORITY_DEFAULT
)
time
.
sleep
(
0.5
)
if
self
.
ButtonNotPressedAlready
:
...
...
@@ -268,6 +275,10 @@ class UninstallWindow(object):
self
.
FlatpakTransaction
.
disconnect
(
self
.
handler_id_2
)
self
.
FlatpakTransaction
.
disconnect
(
self
.
handler_id_error
)
def
on_press_cancel
(
self
,
button
):
self
.
InstallCancellation
.
cancel
()
self
.
UninstallWindow
.
hide_on_delete
()
def
on_delete_action_window
(
self
,
widget
,
event
):
self
.
UninstallCancellation
.
cancel
()
widget
.
hide_on_delete
()
pardusflatpakgui/updateallwindow.py
Dosyayı görüntüle @
1aca5eaa
...
...
@@ -91,6 +91,9 @@ class UpdateAllWindow(object):
self
.
UpdateAllWindow
.
set_title
(
_
(
"Updating All"
))
self
.
UpdateAllWindow
.
show
()
self
.
UpdateAllButtonCancel
=
update_all_builder
.
get_object
(
"ActionButtonCancel"
)
self
.
UpdateAllButtonCancel
.
set_sensitive
(
True
)
self
.
UpdateAllProgressBar
=
update_all_builder
.
get_object
(
"ActionProgressBar"
)
self
.
ProgressBarValue
=
int
(
...
...
@@ -146,7 +149,11 @@ class UpdateAllWindow(object):
GLib
.
idle_add
(
self
.
UpdateAllTextBuffer
.
set_text
,
self
.
StatusText
,
priority
=
GLib
.
PRIORITY_DEFAULT
)
time
.
sleep
(
0.2
)
self
.
disconnect_handlers
(
handler_id_cancel
)
GLib
.
idle_add
(
self
.
UpdateAllButtonCancel
.
set_sensitive
,
False
,
priority
=
GLib
.
PRIORITY_DEFAULT
)
time
.
sleep
(
0.5
)
UpdateAllWindow
.
at_updating
=
False
...
...
@@ -286,6 +293,10 @@ class UpdateAllWindow(object):
self
.
FlatpakTransaction
.
disconnect
(
self
.
handler_id_2
)
self
.
FlatpakTransaction
.
disconnect
(
self
.
handler_id_error
)
def
on_press_cancel
(
self
,
button
):
self
.
InstallCancellation
.
cancel
()
self
.
UpdateAllWindow
.
hide_on_delete
()
def
on_delete_action_window
(
self
,
widget
,
event
):
self
.
UpdateAllCancellation
.
cancel
()
widget
.
hide_on_delete
()
ui/actionwindow.glade
Dosyayı görüntüle @
1aca5eaa
...
...
@@ -38,8 +38,25 @@ Author: Erdem Ersoy
<property
name=
"icon_name"
>
document-save
</property>
<property
name=
"show_menubar"
>
False
</property>
<signal
name=
"delete-event"
handler=
"on_delete_action_window"
swapped=
"no"
/>
<child>
<placeholder/>
<child
type=
"titlebar"
>
<object
class=
"GtkHeaderBar"
id=
"ActionHeader"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"show_close_button"
>
True
</property>
<child>
<object
class=
"GtkButton"
id=
"ActionButtonCancel"
>
<property
name=
"label"
>
gtk-cancel
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
True
</property>
<property
name=
"use_stock"
>
True
</property>
<signal
name=
"clicked"
handler=
"on_press_cancel"
swapped=
"no"
/>
</object>
<packing>
<property
name=
"pack_type"
>
end
</property>
</packing>
</child>
</object>
</child>
<child>
<object
class=
"GtkBox"
id=
"ActionBox"
>
...
...
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