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
6a5b5fab
Verified
Kaydet (Commit)
6a5b5fab
authored
Nis 16, 2020
tarafından
Erdem Ersoy
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Some changes:
- Fix "Uninstall" menu item function - Simplify some "Install" menu item function code
üst
eb1bbca8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
32 deletions
+41
-32
installwindow.py
pardusflatpakgui/installwindow.py
+3
-10
mainwindow.py
pardusflatpakgui/mainwindow.py
+5
-3
uninstallwindow.py
pardusflatpakgui/uninstallwindow.py
+33
-19
No files found.
pardusflatpakgui/installwindow.py
Dosyayı görüntüle @
6a5b5fab
...
...
@@ -38,7 +38,7 @@ gettext.install("flatpak-gui", "po/")
class
InstallWindow
(
object
):
def
__init__
(
self
,
application
,
apptoinstrealname
,
apptoinstarch
,
apptoinstbranch
,
apptoinstremote
,
flatpakinstallation
,
liststore
,
treeviewmain
,
runmenuitem
,
installmenuitem
,
treeview
,
runmenuitem
,
installmenuitem
,
uninstallmenuitem
):
self
.
Application
=
application
...
...
@@ -68,8 +68,7 @@ class InstallWindow(object):
self
.
AppToInstall
.
format_ref
(),
None
)
self
.
ListStoreMain
=
liststore
self
.
TreeViewMain
=
treeviewmain
self
.
TreeViewMain
=
treeview
self
.
Selection
=
self
.
TreeViewMain
.
get_selection
()
self
.
TreeModel
,
self
.
TreeIter
=
self
.
Selection
.
get_selected
()
...
...
@@ -165,14 +164,8 @@ class InstallWindow(object):
listitem
.
get_arch
()
==
Flatpak
.
get_default_arch
()
and
\
listitem
.
get_branch
()
==
self
.
AppToInstallBranch
and
\
listitem
.
get_name
()
==
self
.
AppToInstallRealName
:
if
listitem
in
flathubrefslist
:
if
listitem
not
in
flathubrefslist
:
RemoteName
=
"flathub"
DownloadSize
=
listitem
.
get_download_size
()
DownloadSizeMiB
=
DownloadSize
/
1048576
DownloadSizeMiBAsString
=
f
"{DownloadSizeMiB:.2f}"
+
" MiB"
Name
=
""
else
:
RemoteName
=
""
DownloadSizeMiBAsString
=
""
Name
=
listitem
.
get_appdata_name
()
...
...
pardusflatpakgui/mainwindow.py
Dosyayı görüntüle @
6a5b5fab
...
...
@@ -482,7 +482,9 @@ class MainWindow(object):
UninstallWindow
(
self
.
Application
,
AppToUninstallRealName
,
AppToUninstallArch
,
AppToUninstallBranch
,
self
.
FlatpakInstallation
,
self
.
ListStoreMain
)
self
.
FlatpakInstallation
,
self
.
TreeViewMain
,
self
.
RunMenuItem
,
self
.
InstallMenuItem
,
self
.
UninstallMenuItem
)
def
onInstall
(
self
,
menuitem
):
Selection
=
self
.
TreeViewMain
.
get_selection
()
...
...
@@ -511,8 +513,8 @@ class MainWindow(object):
InstallWindow
(
self
.
Application
,
AppToInstallRealName
,
AppToInstallArch
,
AppToInstallBranch
,
AppToInstallRemote
,
self
.
FlatpakInstallation
,
self
.
ListStoreMain
,
self
.
TreeViewMain
,
self
.
RunMenuItem
,
self
.
InstallMenuItem
,
self
.
UninstallMenuItem
)
self
.
TreeViewMain
,
self
.
RunMenuItem
,
self
.
InstallMenuItem
,
self
.
UninstallMenuItem
)
def
onInstallFromEntry
(
self
,
menuitem
):
InstallFromEntryWindow
(
self
.
Application
,
self
.
FlatpakInstallation
,
...
...
pardusflatpakgui/uninstallwindow.py
Dosyayı görüntüle @
6a5b5fab
...
...
@@ -36,7 +36,8 @@ gettext.install("pardus-flatpak-gui", "po/")
class
UninstallWindow
(
object
):
def
__init__
(
self
,
application
,
realname
,
arch
,
branch
,
flatpakinstallation
,
liststore
):
flatpakinstallation
,
treeview
,
runmenuitem
,
installmenuitem
,
uninstallmenuitem
):
self
.
Application
=
application
self
.
AppToUninstallRealName
=
realname
...
...
@@ -59,7 +60,16 @@ class UninstallWindow(object):
"app/"
+
self
.
AppToUninstallRealName
+
"/"
+
self
.
AppToUninstallArch
+
"/"
+
self
.
AppToUninstallBranch
)
self
.
ListStoreMain
=
liststore
self
.
TreeViewMain
=
treeview
self
.
Selection
=
self
.
TreeViewMain
.
get_selection
()
self
.
TreeModel
,
self
.
TreeIter
=
self
.
Selection
.
get_selected
()
self
.
TreePath
=
self
.
TreeModel
.
get_path
(
self
.
TreeIter
)
self
.
SelectedRowIndex
=
self
.
TreePath
.
get_indices
()[
0
]
self
.
RunMenuItem
=
runmenuitem
self
.
InstallMenuItem
=
installmenuitem
self
.
UninstallMenuItem
=
uninstallmenuitem
try
:
UninstallGUIFile
=
"ui/actionwindow.glade"
...
...
@@ -129,15 +139,11 @@ class UninstallWindow(object):
self
.
FlatpakTransaction
.
disconnect
(
self
.
handler_id_error
)
time
.
sleep
(
0.5
)
GLib
.
idle_add
(
self
.
ListStoreMain
.
clear
,
data
=
None
,
priority
=
GLib
.
PRIORITY_DEFAULT
)
flatpakrefslist
=
\
self
.
FlatpakInstallation
.
list_installed_refs
()
flathubrefslist
=
\
self
.
FlatpakInstallation
.
list_remote_refs_sync
(
"flathub"
,
Gio
.
Cancellable
.
new
())
"flathub"
,
Gio
.
Cancellable
.
new
())
for
item
in
flatpakrefslist
:
for
item2
in
flathubrefslist
:
...
...
@@ -147,30 +153,38 @@ class UninstallWindow(object):
for
listitem
in
flatpakrefslist
:
if
listitem
.
get_kind
()
==
Flatpak
.
RefKind
.
APP
and
\
listitem
.
get_arch
()
==
Flatpak
.
get_default_arch
():
listitem
.
get_arch
()
==
Flatpak
.
get_default_arch
()
and
\
listitem
.
get_branch
()
==
self
.
AppToUninstallBranch
and
\
listitem
.
get_name
()
==
self
.
AppToUninstallRealName
:
if
listitem
in
flathubrefslist
:
RemoteName
=
"flathub"
DownloadSize
=
listitem
.
get_download_size
()
DownloadSizeMiB
=
DownloadSize
/
1048576
DownloadSizeMiBAsString
=
f
"{DownloadSizeMiB:.2f}"
+
" MiB"
Name
=
""
else
:
RemoteName
=
""
DownloadSizeMiBAsString
=
""
Name
=
listitem
.
get_appdata_name
()
InstalledSize
=
listitem
.
get_installed_size
()
InstalledSizeMiB
=
InstalledSize
/
1048576
InstalledSizeMiBAsString
=
\
f
"{InstalledSizeMiB:.2f}"
+
" MiB"
self
.
ListStoreMain
.
append
([
listitem
.
get_name
(),
listitem
.
get_arch
(),
listitem
.
get_branch
(),
RemoteName
,
InstalledSizeMiBAsString
,
DownloadSizeMiBAsString
,
Name
])
self
.
TreeModel
.
set_row
(
self
.
TreeIter
,
[
listitem
.
get_name
(),
listitem
.
get_arch
(),
listitem
.
get_branch
(),
RemoteName
,
InstalledSizeMiBAsString
,
DownloadSizeMiBAsString
,
Name
])
self
.
RunMenuItem
.
set_sensitive
(
False
)
self
.
UninstallMenuItem
.
set_sensitive
(
False
)
self
.
InstallMenuItem
.
set_sensitive
(
True
)
GLib
.
idle_add
(
self
.
TreeModel
.
refilter
,
data
=
None
,
priority
=
GLib
.
PRIORITY_DEFAULT
)
time
.
sleep
(
0.25
)
break
else
:
continue
...
...
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