Verified Kaydet (Commit) 52e2b3bc authored tarafından Erdem Ersoy's avatar Erdem Ersoy

Initial commit

* Add files from flatpak-gui-old
üst
flatpakgui/__pycache__/
*.po~
This diff is collapsed.
# Flatpak GUI
A GUI for Flatpak. You can run, install (from FlatHub and from Flatpak ref file), uninstall, update and get information about Flatpak softwares via this GUI. Written in PyGObject and Glade used.
## Versioning
X.Y version number scheme used. X means major version number indicates major changes, Y means minor version number indicates minor changes. 1.0 is the first version. For preview versions, X.Y-rcZ version number scheme used. Z means release candidate version number indicates changes for candidate of X.Y version release.
## Status
I won't maintain this project anymore. Because, I'll write different, store-like GUI for Flatpak.
## Roadmap
See ROADMAP.md file for roadmap.
## Copyright
Copyright (C) 2020 Erdem Ersoy.
## Licensing
Licensed under GPLv3. See COPYING file for license.
# Roadmap for Flatpak GUI
## TODOs for 1.0:
* Fix pycodestyle linting errors left
* Add comments to source code where appropriate
## TODOs for 1.0-rc1:
* Add screenshot for README.md
* Implement setup.py
* Implement Pardus (Debian) packaging
* Test Flatpak GUI on clean English and Turkish latest Pardus 19.x installations
#!/usr/bin/env python3
#
# Flatpak GUI main exectuable script (new)
# Copyright (C) 2020 Erdem Ersoy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from flatpakgui.flatpakguiapp import FlatpakGUIApp
import gi
gi.require_version('Gio', '2.0')
from gi.repository import Gio
def main():
app = FlatpakGUIApp("tr.org.pardus.flatpak-gui",
Gio.ApplicationFlags.FLAGS_NONE)
app.run()
if __name__ == "__main__":
main()
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-24 08:29+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: flatpakgui/flatpakguiapp.py:49 flatpakgui/installinputwindow.py:57
#: flatpakgui/mainwindow.py:69
msgid "Error reading message dialogs GUI file: "
msgstr ""
#: flatpakgui/flatpakguiapp.py:69
msgid "<big><b>File Not Found Error</b></big>"
msgstr ""
#: flatpakgui/flatpakguiapp.py:71
msgid "File not found: "
msgstr ""
#: flatpakgui/flatpakguiapp.py:87
msgid "<big><b>Installing Error</b></big>"
msgstr ""
#: flatpakgui/flatpakguiapp.py:89
msgid "The selected file doesn't indicate a Flatpak application: "
msgstr ""
#: flatpakgui/flatpakguiapp.py:99
msgid "<big><b>Argument Error</b></big>"
msgstr ""
#: flatpakgui/flatpakguiapp.py:101
msgid "There are too many arguments. Argument count: "
msgstr ""
#: flatpakgui/infowindow.py:45 flatpakgui/installdirectwindow.py:77
#: flatpakgui/installfromfileinputwindow.py:48
#: flatpakgui/installfromfilewindow.py:73 flatpakgui/installinputwindow.py:49
#: flatpakgui/installwindow.py:72 flatpakgui/mainwindow.py:53
#: flatpakgui/uninstallwindow.py:70 flatpakgui/updateallwindow.py:57
msgid "Error reading GUI file: "
msgstr ""
#: flatpakgui/infowindow.py:53
msgid "_Copy to Clipboard"
msgstr ""
#: flatpakgui/infowindow.py:57
msgid "Info About "
msgstr ""
#: flatpakgui/installdirectwindow.py:82 flatpakgui/installdirectwindow.py:95
#: flatpakgui/installdirectwindow.py:189
#: flatpakgui/installfromfilewindow.py:191 flatpakgui/installwindow.py:77
#: flatpakgui/installwindow.py:90 flatpakgui/installwindow.py:184
msgid "Installing: "
msgstr ""
#: flatpakgui/installdirectwindow.py:118
#: flatpakgui/installfromfilewindow.py:116 flatpakgui/installwindow.py:113
msgid "Error at installation!"
msgstr ""
#: flatpakgui/installdirectwindow.py:127
#: flatpakgui/installfromfilewindow.py:125 flatpakgui/installwindow.py:122
msgid "Installing completed!"
msgstr ""
#: flatpakgui/installdirectwindow.py:211
#: flatpakgui/installfromfilewindow.py:213 flatpakgui/installwindow.py:206
msgid "Not installed: "
msgstr ""
#: flatpakgui/installfromfileinputwindow.py:55
msgid "Please choose a Flatpak reference file."
msgstr ""
#: flatpakgui/installfromfileinputwindow.py:61
#: flatpakgui/installinputwindow.py:72
msgid ""
"NOTE: Installing an application from third party remote repositories isn't "
"secured as installing an application from official repositories of your "
"distribution."
msgstr ""
#: flatpakgui/installfromfileinputwindow.py:66
#: flatpakgui/installinputwindow.py:76 flatpakgui/mainwindow.py:90
msgid "I_nstall"
msgstr ""
#: flatpakgui/installfromfileinputwindow.py:71
msgid "Choose a file"
msgstr ""
#: flatpakgui/installfromfilewindow.py:79
#: flatpakgui/installfromfilewindow.py:93
msgid "Installing from file..."
msgstr ""
#: flatpakgui/installinputwindow.py:67
msgid ""
"Please enter an application name (Ex: org.libreoffice.LibreOffice) what you "
"want to install from Flathub."
msgstr ""
#: flatpakgui/installinputwindow.py:80
msgid "Enter an application name"
msgstr ""
#: flatpakgui/installinputwindow.py:90
msgid "<big><b>Input Error</b></big>"
msgstr ""
#: flatpakgui/installinputwindow.py:92
msgid "Input entered is invalid."
msgstr ""
#: flatpakgui/mainwindow.py:61
msgid "Error reading About dialog GUI file: "
msgstr ""
#: flatpakgui/mainwindow.py:77 flatpakgui/mainwindow.py:185
msgid "Flatpak GUI"
msgstr ""
#: flatpakgui/mainwindow.py:78
msgid "Manage Flatpak softwares via GUI"
msgstr ""
#: flatpakgui/mainwindow.py:81
msgid "_Run"
msgstr ""
#: flatpakgui/mainwindow.py:84
msgid "_Info"
msgstr ""
#: flatpakgui/mainwindow.py:87
msgid "_Uninstall"
msgstr ""
#: flatpakgui/mainwindow.py:93
msgid "Install From _Entry"
msgstr ""
#: flatpakgui/mainwindow.py:97
msgid "Install _From File"
msgstr ""
#: flatpakgui/mainwindow.py:100
msgid "Up_date All"
msgstr ""
#: flatpakgui/mainwindow.py:103
msgid "_About"
msgstr ""
#: flatpakgui/mainwindow.py:107
msgid "Real Name"
msgstr ""
#: flatpakgui/mainwindow.py:110
msgid "Arch"
msgstr ""
#: flatpakgui/mainwindow.py:113
msgid "Branch"
msgstr ""
#: flatpakgui/mainwindow.py:117
msgid "Remote Name"
msgstr ""
#: flatpakgui/mainwindow.py:121
msgid "Installed Size"
msgstr ""
#: flatpakgui/mainwindow.py:125
msgid "Download Size"
msgstr ""
#: flatpakgui/mainwindow.py:128
msgid "Name"
msgstr ""
#: flatpakgui/mainwindow.py:183
msgid "A GUI for Flatpak"
msgstr ""
#: flatpakgui/mainwindow.py:184
msgid "Copyright (C) 2020 Erdem Ersoy"
msgstr ""
#: flatpakgui/mainwindow.py:186
msgid "Flatpak GUI Web Site"
msgstr ""
#: flatpakgui/mainwindow.py:221 flatpakgui/mainwindow.py:261
#: flatpakgui/mainwindow.py:420 flatpakgui/mainwindow.py:450
msgid "<big><b>Selection Error</b></big>"
msgstr ""
#: flatpakgui/mainwindow.py:223 flatpakgui/mainwindow.py:263
#: flatpakgui/mainwindow.py:422 flatpakgui/mainwindow.py:452
msgid "None of the applications are selected."
msgstr ""
#: flatpakgui/mainwindow.py:250
msgid "<big><b>Running Error</b></big>"
msgstr ""
#: flatpakgui/mainwindow.py:252
msgid "The selected application couldn't run."
msgstr ""
#: flatpakgui/mainwindow.py:291 flatpakgui/mainwindow.py:308
#: flatpakgui/mainwindow.py:312 flatpakgui/mainwindow.py:316
#: flatpakgui/mainwindow.py:320 flatpakgui/mainwindow.py:324
#: flatpakgui/mainwindow.py:328 flatpakgui/mainwindow.py:332
#: flatpakgui/mainwindow.py:346 flatpakgui/mainwindow.py:350
#: flatpakgui/mainwindow.py:354 flatpakgui/mainwindow.py:387
#: flatpakgui/mainwindow.py:391 flatpakgui/mainwindow.py:399
msgid "None"
msgstr ""
#: flatpakgui/mainwindow.py:340 flatpakgui/mainwindow.py:366
#: flatpakgui/mainwindow.py:406
msgid "Yes"
msgstr ""
#: flatpakgui/mainwindow.py:342
msgid "No"
msgstr ""
#: flatpakgui/mainwindow.py:361 flatpakgui/mainwindow.py:401
msgid "Real Name: "
msgstr ""
#: flatpakgui/mainwindow.py:362 flatpakgui/mainwindow.py:402
msgid "Arch: "
msgstr ""
#: flatpakgui/mainwindow.py:363 flatpakgui/mainwindow.py:403
msgid "Branch: "
msgstr ""
#: flatpakgui/mainwindow.py:364 flatpakgui/mainwindow.py:404
msgid "Collection ID: "
msgstr ""
#: flatpakgui/mainwindow.py:365 flatpakgui/mainwindow.py:405
msgid "Commit: "
msgstr ""
#: flatpakgui/mainwindow.py:366 flatpakgui/mainwindow.py:406
msgid "Is Installed: "
msgstr ""
#: flatpakgui/mainwindow.py:367
msgid "License: "
msgstr ""
#: flatpakgui/mainwindow.py:368
msgid "Name: "
msgstr ""
#: flatpakgui/mainwindow.py:369
msgid "Summary: "
msgstr ""
#: flatpakgui/mainwindow.py:370
msgid "Version: "
msgstr ""
#: flatpakgui/mainwindow.py:371
msgid "Deploy Dir: "
msgstr ""
#: flatpakgui/mainwindow.py:372 flatpakgui/mainwindow.py:408
msgid "EOL Reason: "
msgstr ""
#: flatpakgui/mainwindow.py:373 flatpakgui/mainwindow.py:409
msgid "EOL Rebased: "
msgstr ""
#: flatpakgui/mainwindow.py:374 flatpakgui/mainwindow.py:410
msgid "Installed Size: "
msgstr ""
#: flatpakgui/mainwindow.py:375
msgid "Is Current: "
msgstr ""
#: flatpakgui/mainwindow.py:376
msgid "Latest Commit: "
msgstr ""
#: flatpakgui/mainwindow.py:377
msgid "Origin: "
msgstr ""
#: flatpakgui/mainwindow.py:378
msgid "Subpaths: "
msgstr ""
#: flatpakgui/mainwindow.py:407
msgid "Download Size: "
msgstr ""
#: flatpakgui/mainwindow.py:411
msgid "Remote Name: "
msgstr ""
#: flatpakgui/uninstallwindow.py:75
msgid "Uninstalling "
msgstr ""
#: flatpakgui/uninstallwindow.py:89 flatpakgui/uninstallwindow.py:183
msgid "Uninstalling: "
msgstr ""
#: flatpakgui/uninstallwindow.py:112
msgid "Error at uninstallation!"
msgstr ""
#: flatpakgui/uninstallwindow.py:121
msgid "Uninstalling completed!"
msgstr ""
#: flatpakgui/uninstallwindow.py:205
msgid "Not uninstalled: "
msgstr ""
#: flatpakgui/updateallwindow.py:62
msgid "Updating All"
msgstr ""
#: flatpakgui/updateallwindow.py:75
msgid "Updating..."
msgstr ""
#: flatpakgui/updateallwindow.py:104
msgid "Not updated: "
msgstr ""
#: flatpakgui/updateallwindow.py:113
msgid "Updated: "
msgstr ""
#: flatpakgui/updateallwindow.py:123
msgid "Updating completed!"
msgstr ""
#!/usr/bin/env python3
#
# Flatpak GUI Application module
# Copyright (C) 2020 Erdem Ersoy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from flatpakgui.mainwindow import MainWindow
from flatpakgui.installwindow import InstallWindow
import gettext
import locale
import sys
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('GLib', '2.0')
gi.require_version('Flatpak', '1.0')
gi.require_version('Gio', '2.0')
from gi.repository import Gtk, GLib, Flatpak, Gio
locale.setlocale(locale.LC_ALL, "")
gettext.bindtextdomain("flatpak-gui", "po/")
gettext.textdomain("flatpak-gui")
_ = gettext.gettext
gettext.install("flatpak-gui", "po/")
class FlatpakGUIApp(Gtk.Application):
def __init__(self, application_id, flags):
Gtk.Application.__init__(self, application_id=application_id,
flags=flags)
try:
MessagesGUIFile = "ui/messagedialogs.glade"
MessagesBuilder = Gtk.Builder.new_from_file(MessagesGUIFile)
MessagesBuilder.connect_signals(self)
except GLib.GError:
print(_("Error reading message dialogs GUI file: ")
+ MessagesGUIFile)
raise
self.MessageDialogError = MessagesBuilder.get_object(
"MessageDialogError")
self.connect("activate", self.new_window)
def new_window(self, *args):
if len(sys.argv) == 1:
MainWindow(self)
elif len(sys.argv) == 2:
self.FlatpakInstallation = Flatpak.Installation.new_system()
self.FileFlatpakRefName = sys.argv[1]
try:
self.FileFlatpakRef = open(self.FileFlatpakRefName, "r")
except FileNotFoundError:
self.MessageDialogError.set_markup(
_("<big><b>File Not Found Error</b></big>"))
self.MessageDialogError.format_secondary_text(
_("File not found: ") + self.FileFlatpakRefName)
self.MessageDialogError.run()
self.MessageDialogError.hide()
return None
else:
self.FileFlatpakRefContents = self.FileFlatpakRef.read(-1)
self.FileFlatpakRefContentsAsBytes = bytes(
self.FileFlatpakRefContents, "utf-8")
self.FileFlatpakRefContentsAsGLibBytes = GLib.Bytes.new(
self.FileFlatpakRefContentsAsBytes)
self.AppToInstall = self.FlatpakInstallation.install_ref_file(
self.FileFlatpakRefContentsAsGLibBytes,
Gio.Cancellable.new())
if not self.AppToInstall.get_kind() == Flatpak.RefKind.APP:
self.MessageDialogError.set_markup(
_("<big><b>Installing Error</b></big>"))
self.MessageDialogError.format_secondary_text(
_("The selected file doesn't indicate a Flatpak application: ") +
self.FileFlatpakRefName)
self.MessageDialogError.run()
self.MessageDialogError.hide()
return None
InstallWindow(self, self.AppToInstall,
self.FlatpakInstallation, None)
else:
self.MessageDialogError.set_markup(
_("<big><b>Argument Error</b></big>"))
self.MessageDialogError.format_secondary_text(
_("There are too many arguments. Argument count: ") +
str(len(sys.argv)))
self.MessageDialogError.run()
self.MessageDialogError.hide()
return None
#!/usr/bin/env python3
#
# Flatpak GUI info window module
# Copyright (C) 2020 Erdem Ersoy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import gettext
import locale
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('Gdk', '3.0')
gi.require_version('GLib', '2.0')
from gi.repository import Gtk, Gdk, GLib
locale.setlocale(locale.LC_ALL, "")
gettext.bindtextdomain("flatpak-gui", "po/")
gettext.textdomain("flatpak-gui")
_ = gettext.gettext
gettext.install("flatpak-gui", "po/")
class InfoWindow(object):
def __init__(self, application, infostring, app):
self.Application = application
self.InfoString = infostring
self.App = app
try:
InfoGUIFile = "ui/infowindow.glade"
InfoBuilder = Gtk.Builder.new_from_file(InfoGUIFile)
InfoBuilder.connect_signals(self)
except GLib.GError:
print(_("Error reading GUI file: ") + InfoGUIFile)
raise
InfoTextBuffer = InfoBuilder.get_object(
"InfoTextBuffer")
InfoTextBuffer.set_text(infostring)
InfoButton = InfoBuilder.get_object("InfoButton")
InfoButton.set_label(_("_Copy to Clipboard"))
self.InfoWindow = InfoBuilder.get_object("InfoWindow")
self.InfoWindow.set_application(application)
self.InfoWindow.set_title(_("Info About ") + app.get_name())
self.InfoWindow.show()
def onDestroy(self, *args):
self.InfoWindow.destroy()
def onPressedCopyToClipboard(self, button):
ClipboardCurrent = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD)
ClipboardCurrent.set_text(self.InfoString, -1)
#!/usr/bin/env python3
#
# Flatpak GUI direct install window module
# Copyright (C) 2020 Erdem Ersoy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import gettext
import locale
import sys
import threading
import time
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('Flatpak', '1.0')
gi.require_version('GLib', '2.0')
gi.require_version('Gio', '2.0')
from gi.repository import Gtk, Flatpak, GLib, Gio
locale.setlocale(locale.LC_ALL, "")
gettext.bindtextdomain("flatpak-gui", "po/")
gettext.textdomain("flatpak-gui")
_ = gettext.gettext
gettext.install("flatpak-gui", "po/")
class InstallDirectWindow(object):
def __init__(self, application, apptoinstrealname, apptoinstarch,
apptoinstbranch, apptoinstremote, flatpakinstallation,
liststore):
self.Application = application
self.AppToInstallRealName = apptoinstrealname
self.AppToInstallArch = apptoinstarch
self.AppToInstallBranch = apptoinstbranch
self.AppToInstallRemote = apptoinstremote
self.AppToInstall = Flatpak.Ref.parse("app/" +
self.AppToInstallRealName + "/" +
self.AppToInstallArch + "/" +
self.AppToInstallBranch)
self.FlatpakInstallation = flatpakinstallation
self.FlatpakTransaction = \
Flatpak.Transaction.new_for_installation(
self.FlatpakInstallation,
Gio.Cancellable.new())
self.FlatpakTransaction.set_default_arch(self.AppToInstallArch)
self.FlatpakTransaction.set_disable_dependencies(False)
self.FlatpakTransaction.set_disable_prune(False)
self.FlatpakTransaction.set_disable_related(False)
self.FlatpakTransaction.set_disable_static_deltas(False)
self.FlatpakTransaction.set_no_deploy(False)
self.FlatpakTransaction.set_no_pull(False)
self.FlatpakTransaction.add_install(
self.AppToInstallRemote,
self.AppToInstall.format_ref(),
None)
self.ListStoreMain = liststore
try:
InstallGUIFile = "ui/actionwindow.glade"
InstallBuilder = Gtk.Builder.new_from_file(InstallGUIFile)
InstallBuilder.connect_signals(self)
except GLib.GError:
print(_("Error reading GUI file: ") + InstallGUIFile)
raise
self.InstallWindow = InstallBuilder.get_object("ActionWindow")
self.InstallWindow.set_application(application)
self.InstallWindow.set_title(_("Installing: ") + self.AppToInstallRealName)
self.InstallWindow.show()
self.InstallProgressBar = InstallBuilder.get_object(
"ActionProgressBar")
self.ProgressBarValue = int(
self.InstallProgressBar.get_fraction() * 100)
self.InstallLabel = InstallBuilder.get_object("ActionLabel")
self.InstallTextBuffer = InstallBuilder.get_object(
"ActionTextBuffer")
self.InstallTextBuffer.set_text("\0", -1)
self.StatusText = _("Installing: ") + self.AppToInstallRealName
self.InstallLabel.set_text(self.StatusText)
self.InstallTextBuffer.set_text(self.StatusText)
self.InstallThread = threading.Thread(
target=self.Install,
args=())
self.InstallThread.start()
GLib.threads_init()
def Install(self):
self.handler_id = self.FlatpakTransaction.connect(
"new-operation",
self.InstallProgressCallback)
self.handler_id_2 = self.FlatpakTransaction.connect(
"operation-done",
self.InstallProgressCallbackDisconnect)
self.handler_id_error = self.FlatpakTransaction.connect(
"operation-error",
self.InstallProgressCallbackError)
try:
self.FlatpakTransaction.run(Gio.Cancellable.new())
except GLib.Error:
statustext = _("Error at installation!")
self.StatusText = self.StatusText + "\n" + statustext
GLib.idle_add(self.InstallLabel.set_text,
statustext,
priority=GLib.PRIORITY_DEFAULT)
GLib.idle_add(self.InstallTextBuffer.set_text,
self.StatusText,
priority=GLib.PRIORITY_DEFAULT)
else:
statustext = _("Installing completed!")
self.StatusText = self.StatusText + "\n" + statustext
GLib.idle_add(self.InstallLabel.set_text,
statustext,
priority=GLib.PRIORITY_DEFAULT)
GLib.idle_add(self.InstallTextBuffer.set_text,
self.StatusText,
priority=GLib.PRIORITY_DEFAULT)
self.FlatpakTransaction.disconnect(self.handler_id)
self.FlatpakTransaction.disconnect(self.handler_id_2)
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())
for item in flatpakrefslist:
for item2 in flathubrefslist:
if item.get_name() == item2.get_name():
flathubrefslist.remove(item2)
flatpakrefslist = flatpakrefslist + flathubrefslist
for listitem in flatpakrefslist:
if listitem.get_kind() == Flatpak.RefKind.APP and \
listitem.get_arch() == Flatpak.get_default_arch():
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])
else:
continue
def InstallProgressCallback(self, *args):
self.RefToInstall = Flatpak.Ref.parse(args[1].get_ref())
self.RefToInstallRealName = self.RefToInstall.get_name()
if self.RefToInstallRealName != self.AppToInstallRealName:
statustext = _("Installing: ") + self.RefToInstallRealName
self.StatusText = self.StatusText + "\n" + statustext
GLib.idle_add(self.InstallLabel.set_text,
statustext,
priority=GLib.PRIORITY_DEFAULT)
GLib.idle_add(self.InstallTextBuffer.set_text,
self.StatusText,
priority=GLib.PRIORITY_DEFAULT)
self.TransactionProgress = args[2]
self.TransactionProgress.set_update_frequency(200)
self.handler_id_progress = self.TransactionProgress.connect(
"changed",
self.ProgressBarUpdate)
def InstallProgressCallbackDisconnect(self, *args):
self.TransactionProgress.disconnect(self.handler_id_progress)
def InstallProgressCallbackError(self, *args):
self.RefToInstall = Flatpak.Ref.parse(args[1].get_ref())
self.RefToInstallRealName = self.RefToInstall.get_name()
if self.RefToInstallRealName != self.AppToInstallRealName:
statustext = _("Not installed: ") + self.RefToInstallRealName
self.StatusText = self.StatusText + "\n" + statustext
GLib.idle_add(self.InstallLabel.set_text,
statustext,
priority=GLib.PRIORITY_DEFAULT)
GLib.idle_add(self.InstallTextBuffer.set_text,
self.StatusText,
priority=GLib.PRIORITY_DEFAULT)
return True
else:
return False
def ProgressBarUpdate(self, transaction_progress):
GLib.idle_add(self.InstallProgressBar.set_fraction,
float(transaction_progress.get_progress()) / 100.0,
priority=GLib.PRIORITY_DEFAULT)
def onDestroy(self, *args):
self.InstallWindow.destroy()
#!/usr/bin/env python3
#
# Flatpak GUI install from file input window module
# Copyright (C) 2020 Erdem Ersoy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from .installfromfilewindow import InstallFromFileWindow
import gettext
import locale
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('Flatpak', '1.0')
gi.require_version('GLib', '2.0')
from gi.repository import Gtk, Flatpak, GLib
locale.setlocale(locale.LC_ALL, "")
gettext.bindtextdomain("flatpak-gui", "po/")
gettext.textdomain("flatpak-gui")
_ = gettext.gettext
gettext.install("flatpak-gui", "po/")
class InstallFromFileInputWindow(object):
def __init__(self, application, flatpakinstallation, liststore):
self.Application = application
self.FlatpakInstallation = flatpakinstallation
self.ListStoreMain = liststore
try:
InstallFromFileInputGUIFile = "ui/installfromfileinputwindow.glade"
self.InstallFromFileInputBuilder = \
Gtk.Builder.new_from_file(InstallFromFileInputGUIFile)
self.InstallFromFileInputBuilder.connect_signals(self)
except GLib.GError:
print(_("Error reading GUI file: ") + InstallFromFileInputGUIFile)
raise
self.InstallFromFileInputLabel = \
self.InstallFromFileInputBuilder.get_object(
"InstallFromFileInputLabel")
self.InstallFromFileInputLabel.set_text(
_("Please choose a Flatpak reference file."))
self.InstallFromFileInputLabel2 = \
self.InstallFromFileInputBuilder.get_object(
"InstallFromFileInputLabel2")
self.InstallFromFileInputLabel2.set_text(
_("NOTE: Installing an application from third party remote repositories isn't secured as installing an application from official repositories of your distribution."))
self.InstallFromFileInputButton = \
self.InstallFromFileInputBuilder.get_object(
"InstallFromFileInputButton")
self.InstallFromFileInputButton.set_label(_("I_nstall"))
self.InstallFromFileInputWindow = \
self.InstallFromFileInputBuilder.get_object(
"InstallFromFileInputWindow")
self.InstallFromFileInputWindow.set_title(_("Choose a file"))
self.InstallFromFileInputWindow.set_application(application)
self.InstallFromFileInputWindow.show()
def onInstallAtInstallFromFile(self, button):
self.InstallFromFileInputFileChooser = \
self.InstallFromFileInputBuilder.get_object(
"InstallFromFileInputFileChooser")
self.FileFlatpakRefName = \
self.InstallFromFileInputFileChooser.get_filename()
InstallFromFileWindow(self.Application, self.FlatpakInstallation,
self.FileFlatpakRefName,
self.ListStoreMain)
self.InstallFromFileInputFileChooser.unselect_filename(
self.FileFlatpakRefName)
self.onDestroy()
def onDestroy(self, *args):
self.InstallFromFileInputWindow.destroy()
This diff is collapsed.
#!/usr/bin/env python3
#
# Flatpak GUI install input window module
# Copyright (C) 2020 Erdem Ersoy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from .installwindow import InstallWindow
import gettext
import locale
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('Flatpak', '1.0')
gi.require_version('GLib', '2.0')
gi.require_version('Gio', '2.0')
from gi.repository import Gtk, Flatpak, GLib, Gio
locale.setlocale(locale.LC_ALL, "")
gettext.bindtextdomain("flatpak-gui", "po/")
gettext.textdomain("flatpak-gui")
_ = gettext.gettext
gettext.install("flatpak-gui", "po/")
class InstallInputWindow(object):
def __init__(self, application, flatpakinstallation, liststore):
self.Application = application
self.FlatpakInstallation = flatpakinstallation
self.ListStoreMain = liststore
try:
InstallInputGUIFile = "ui/installinputwindow.glade"
self.InstallInputBuilder = Gtk.Builder.new_from_file(
InstallInputGUIFile)
self.InstallInputBuilder.connect_signals(self)
except GLib.GError:
print(_("Error reading GUI file: ") + InstallInputGUIFile)
raise
try:
MessagesGUIFile = "ui/messagedialogs.glade"
MessagesBuilder = Gtk.Builder.new_from_file(MessagesGUIFile)
MessagesBuilder.connect_signals(self)
except GLib.GError:
print(_("Error reading message dialogs GUI file: ") +
MessagesGUIFile)
raise
self.MessageDialogError = MessagesBuilder.get_object(
"MessageDialogError")
self.InstallInputLabel = self.InstallInputBuilder.get_object(
"InstallInputLabel")
self.InstallInputLabel.set_text(
_("Please enter an application name (Ex: org.libreoffice.LibreOffice) what you want to install from Flathub."))
self.InstallInputLabel2 = self.InstallInputBuilder.get_object(
"InstallInputLabel2")
self.InstallInputLabel2.set_text(
_("NOTE: Installing an application from third party remote repositories isn't secured as installing an application from official repositories of your distribution."))
self.InstallInputButton = self.InstallInputBuilder.get_object(
"InstallInputButton")
self.InstallInputButton.set_label(_("I_nstall"))
self.InstallInputWindow = \
self.InstallInputBuilder.get_object("InstallInputWindow")
self.InstallInputWindow.set_title(_("Enter an application name"))
self.InstallInputWindow.set_application(application)
self.InstallInputWindow.show()
def onInstallAtInstall(self, button):
self.InstallInputEntry = self.InstallInputBuilder.get_object(
"InstallInputEntry")
self.AppToInstallRealName = self.InstallInputEntry.get_text()
if len(self.AppToInstallRealName.split(".")) < 3:
self.MessageDialogError.set_markup(
_("<big><b>Input Error</b></big>"))
self.MessageDialogError.format_secondary_text(
_("Input entered is invalid."))
self.MessageDialogError.run()
self.MessageDialogError.hide()
return None
self.FlatpakRefsList = \
self.FlatpakInstallation.list_installed_refs()
self.FlatHubRefsList = \
self.FlatpakInstallation.list_remote_refs_sync(
"flathub", Gio.Cancellable.new())
for item in self.FlatpakRefsList:
for item2 in self.FlatHubRefsList:
if item.get_name() == item2.get_name():
self.FlatHubRefsList.remove(item2)
self.FlatpakRefsList = self.FlatpakRefsList + self.FlatHubRefsList
for listitem in self.FlatpakRefsList:
if listitem.get_name() == self.AppToInstallRealName and \
listitem.get_arch() == Flatpak.get_default_arch():
self.AppToInstall = listitem
self.InstallInputEntry.set_text("")
InstallWindow(self.Application, self.AppToInstall,
self.FlatpakInstallation, self.ListStoreMain)
self.onDestroy()
def onDestroy(self, *args):
self.InstallInputWindow.destroy()
#!/usr/bin/env python3
#
# Flatpak GUI install window module
# Copyright (C) 2020 Erdem Ersoy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import gettext
import locale
import sys
import threading
import time
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('Flatpak', '1.0')
gi.require_version('GLib', '2.0')
gi.require_version('Gio', '2.0')
from gi.repository import Gtk, Flatpak, GLib, Gio
locale.setlocale(locale.LC_ALL, "")
gettext.bindtextdomain("flatpak-gui", "po/")
gettext.textdomain("flatpak-gui")
_ = gettext.gettext
gettext.install("flatpak-gui", "po/")
class InstallWindow(object):
def __init__(self, application, apptoinst, flatpakinstallation,
liststore):
self.Application = application
self.AppToInstall = apptoinst
self.AppToInstallRealName = self.AppToInstall.get_name()
self.AppToInstallArch = self.AppToInstall.get_arch()
self.AppToInstallBranch = self.AppToInstall.get_branch()
self.FlatpakInstallation = flatpakinstallation
self.FlatpakTransaction = \
Flatpak.Transaction.new_for_installation(
self.FlatpakInstallation,
Gio.Cancellable.new())
self.FlatpakTransaction.set_default_arch(self.AppToInstallArch)
self.FlatpakTransaction.set_disable_dependencies(False)
self.FlatpakTransaction.set_disable_prune(False)
self.FlatpakTransaction.set_disable_related(False)
self.FlatpakTransaction.set_disable_static_deltas(False)
self.FlatpakTransaction.set_no_deploy(False)
self.FlatpakTransaction.set_no_pull(False)
self.FlatpakTransaction.add_install(
self.AppToInstall.get_remote_name(),
self.AppToInstall.format_ref(),
None)
self.ListStoreMain = liststore
try:
InstallGUIFile = "ui/actionwindow.glade"
InstallBuilder = Gtk.Builder.new_from_file(InstallGUIFile)
InstallBuilder.connect_signals(self)
except GLib.GError:
print(_("Error reading GUI file: ") + InstallGUIFile)
raise
self.InstallWindow = InstallBuilder.get_object("ActionWindow")
self.InstallWindow.set_application(application)
self.InstallWindow.set_title(_("Installing: ") + self.AppToInstallRealName)
self.InstallWindow.show()
self.InstallProgressBar = InstallBuilder.get_object(
"ActionProgressBar")
self.ProgressBarValue = int(
self.InstallProgressBar.get_fraction() * 100)
self.InstallLabel = InstallBuilder.get_object("ActionLabel")
self.InstallTextBuffer = InstallBuilder.get_object(
"ActionTextBuffer")
self.InstallTextBuffer.set_text("\0", -1)
self.StatusText = _("Installing: ") + self.AppToInstallRealName
self.InstallLabel.set_text(self.StatusText)
self.InstallTextBuffer.set_text(self.StatusText)
self.InstallThread = threading.Thread(
target=self.Install,
args=())
self.InstallThread.start()
GLib.threads_init()
def Install(self):
self.handler_id = self.FlatpakTransaction.connect(
"new-operation",
self.InstallProgressCallback)
self.handler_id_2 = self.FlatpakTransaction.connect(
"operation-done",
self.InstallProgressCallbackDisconnect)
self.handler_id_error = self.FlatpakTransaction.connect(
"operation-error",
self.InstallProgressCallbackError)
try:
self.FlatpakTransaction.run(Gio.Cancellable.new())
except GLib.Error:
statustext = _("Error at installation!")
self.StatusText = self.StatusText + "\n" + statustext
GLib.idle_add(self.InstallLabel.set_text,
statustext,
priority=GLib.PRIORITY_DEFAULT)
GLib.idle_add(self.InstallTextBuffer.set_text,
self.StatusText,
priority=GLib.PRIORITY_DEFAULT)
else:
statustext = _("Installing completed!")
self.StatusText = self.StatusText + "\n" + statustext
GLib.idle_add(self.InstallLabel.set_text,
statustext,
priority=GLib.PRIORITY_DEFAULT)
GLib.idle_add(self.InstallTextBuffer.set_text,
self.StatusText,
priority=GLib.PRIORITY_DEFAULT)
self.FlatpakTransaction.disconnect(self.handler_id)
self.FlatpakTransaction.disconnect(self.handler_id_2)
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())
for item in flatpakrefslist:
for item2 in flathubrefslist:
if item.get_name() == item2.get_name():
flathubrefslist.remove(item2)
flatpakrefslist = flatpakrefslist + flathubrefslist
for listitem in flatpakrefslist:
if listitem.get_kind() == Flatpak.RefKind.APP and \
listitem.get_arch() == Flatpak.get_default_arch():
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])
else:
continue
def InstallProgressCallback(self, *args):
self.RefToInstall = Flatpak.Ref.parse(args[1].get_ref())
self.RefToInstallRealName = self.RefToInstall.get_name()
if self.RefToInstallRealName != self.AppToInstallRealName:
statustext = _("Installing: ") + self.RefToInstallRealName
self.StatusText = self.StatusText + "\n" + statustext
GLib.idle_add(self.InstallLabel.set_text,
statustext,
priority=GLib.PRIORITY_DEFAULT)
GLib.idle_add(self.InstallTextBuffer.set_text,
self.StatusText,
priority=GLib.PRIORITY_DEFAULT)
self.TransactionProgress = args[2]
self.TransactionProgress.set_update_frequency(200)
self.handler_id_progress = self.TransactionProgress.connect(
"changed",
self.ProgressBarUpdate)
def InstallProgressCallbackDisconnect(self, *args):
self.TransactionProgress.disconnect(self.handler_id_progress)
def InstallProgressCallbackError(self, *args):
self.RefToInstall = Flatpak.Ref.parse(args[1].get_ref())
self.RefToInstallRealName = self.RefToInstall.get_name()
if self.RefToInstallRealName != self.AppToInstallRealName:
statustext = _("Not installed: ") + self.RefToInstallRealName
self.StatusText = self.StatusText + "\n" + statustext
GLib.idle_add(self.InstallLabel.set_text,
statustext,
priority=GLib.PRIORITY_DEFAULT)
GLib.idle_add(self.InstallTextBuffer.set_text,
self.StatusText,
priority=GLib.PRIORITY_DEFAULT)
return True
else:
return False
def ProgressBarUpdate(self, transaction_progress):
GLib.idle_add(self.InstallProgressBar.set_fraction,
float(transaction_progress.get_progress()) / 100.0,
priority=GLib.PRIORITY_DEFAULT)
def onDestroy(self, *args):
self.InstallWindow.destroy()
This diff is collapsed.
#!/usr/bin/env python3
#
# Flatpak GUI uninstall from file window module
# Copyright (C) 2020 Erdem Ersoy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import gettext
import locale
import threading
import time
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('GLib', '2.0')
gi.require_version('Flatpak', '1.0')
gi.require_version('Gio', '2.0')
from gi.repository import Gtk, GLib, Flatpak, Gio
locale.setlocale(locale.LC_ALL, "")
gettext.bindtextdomain("flatpak-gui", "po/")
gettext.textdomain("flatpak-gui")
_ = gettext.gettext
gettext.install("flatpak-gui", "po/")
class UninstallWindow(object):
def __init__(self, application, realname, arch, branch,
flatpakinstallation, liststore):
self.Application = application
self.AppToUninstallRealName = realname
self.AppToUninstallArch = arch
self.AppToUninstallBranch = branch
self.FlatpakInstallation = flatpakinstallation
self.FlatpakTransaction = \
Flatpak.Transaction.new_for_installation(
self.FlatpakInstallation,
Gio.Cancellable.new())
self.FlatpakTransaction.set_default_arch(self.AppToUninstallArch)
self.FlatpakTransaction.set_disable_dependencies(False)
self.FlatpakTransaction.set_disable_prune(False)
self.FlatpakTransaction.set_disable_related(False)
self.FlatpakTransaction.set_disable_static_deltas(False)
self.FlatpakTransaction.set_no_deploy(False)
self.FlatpakTransaction.set_no_pull(False)
self.FlatpakTransaction.add_uninstall(
"app/" + self.AppToUninstallRealName + "/" +
self.AppToUninstallArch + "/" + self.AppToUninstallBranch)
self.ListStoreMain = liststore
try:
UninstallGUIFile = "ui/actionwindow.glade"
UninstallBuilder = Gtk.Builder.new_from_file(UninstallGUIFile)
UninstallBuilder.connect_signals(self)
except GLib.GError:
print(_("Error reading GUI file: ") + UninstallGUIFile)
raise
self.UninstallWindow = UninstallBuilder.get_object("ActionWindow")
self.UninstallWindow.set_application(application)
self.UninstallWindow.set_title(_("Uninstalling ") +
self.AppToUninstallRealName)
self.UninstallWindow.show()
self.UninstallProgressBar = UninstallBuilder.get_object(
"ActionProgressBar")
self.ProgressBarValue = int(
self.UninstallProgressBar.get_fraction() * 100)
self.UninstallLabel = UninstallBuilder.get_object("ActionLabel")
self.UninstallTextBuffer = UninstallBuilder.get_object(
"ActionTextBuffer")
self.UninstallTextBuffer.set_text("\0", -1)
self.StatusText = _("Uninstalling: ") + self.AppToUninstallRealName
self.UninstallLabel.set_text(self.StatusText)
self.UninstallTextBuffer.set_text(self.StatusText)
self.UninstallThread = threading.Thread(
target=self.Uninstall,
args=())
self.UninstallThread.start()
GLib.threads_init()
def Uninstall(self):
self.handler_id = self.FlatpakTransaction.connect(
"new-operation",
self.UninstallProgressCallback)
self.handler_id_2 = self.FlatpakTransaction.connect(
"operation-done",
self.UninstallProgressCallbackDisconnect)
self.handler_id_error = self.FlatpakTransaction.connect(
"operation-error",
self.UninstallProgressCallbackError)
try:
self.FlatpakTransaction.run(Gio.Cancellable.new())
except GLib.Error:
statustext = _("Error at uninstallation!")
self.StatusText = self.StatusText + "\n" + statustext
GLib.idle_add(self.UninstallLabel.set_text,
statustext,
priority=GLib.PRIORITY_DEFAULT)
GLib.idle_add(self.UninstallTextBuffer.set_text,
self.StatusText,
priority=GLib.PRIORITY_DEFAULT)
else:
statustext = _("Uninstalling completed!")
self.StatusText = self.StatusText + "\n" + statustext
GLib.idle_add(self.UninstallLabel.set_text,
statustext,
priority=GLib.PRIORITY_DEFAULT)
GLib.idle_add(self.UninstallTextBuffer.set_text,
self.StatusText,
priority=GLib.PRIORITY_DEFAULT)
self.FlatpakTransaction.disconnect(self.handler_id)
self.FlatpakTransaction.disconnect(self.handler_id_2)
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())
for item in flatpakrefslist:
for item2 in flathubrefslist:
if item.get_name() == item2.get_name():
flathubrefslist.remove(item2)
flatpakrefslist = flatpakrefslist + flathubrefslist
for listitem in flatpakrefslist:
if listitem.get_kind() == Flatpak.RefKind.APP and \
listitem.get_arch() == Flatpak.get_default_arch():
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])
else:
continue
def UninstallProgressCallback(self, *args):
self.RefToUninstall = Flatpak.Ref.parse(args[1].get_ref())
self.RefToUninstallRealName = self.RefToUninstall.get_name()
if self.RefToUninstallRealName != self.AppToUninstallRealName:
statustext = _("Uninstalling: ") + self.RefToUninstallRealName
self.StatusText = self.StatusText + "\n" + statustext
GLib.idle_add(self.UninstallLabel.set_text,
statustext,
priority=GLib.PRIORITY_DEFAULT)
GLib.idle_add(self.UninstallTextBuffer.set_text,
self.StatusText,
priority=GLib.PRIORITY_DEFAULT)
self.TransactionProgress = args[2]
self.TransactionProgress.set_update_frequency(200)
self.handler_id_progress = self.TransactionProgress.connect(
"changed",
self.ProgressBarUpdate)
def UninstallProgressCallbackDisconnect(self, *args):
self.TransactionProgress.disconnect(self.handler_id_progress)
def UninstallProgressCallbackError(self, *args):
self.RefToUninstall = Flatpak.Ref.parse(args[1].get_ref())
self.RefToUninstallRealName = self.RefToUninstall.get_name()
if self.RefToUninstallRealName != self.AppToUninstallRealName:
statustext = _("Not uninstalled: ") + self.RefToUninstallRealName
self.StatusText = self.StatusText + "\n" + statustext
GLib.idle_add(self.UninstallLabel.set_text,
statustext,
priority=GLib.PRIORITY_DEFAULT)
GLib.idle_add(self.UninstallTextBuffer.set_text,
self.StatusText,
priority=GLib.PRIORITY_DEFAULT)
return True
else:
return False
def ProgressBarUpdate(self, transaction_progress):
GLib.idle_add(self.InstallProgressBar.set_fraction,
float(transaction_progress.get_progress()) / 100.0,
priority=GLib.PRIORITY_DEFAULT)
def onDestroy(self, *args):
self.UninstallWindow.destroy()
#!/usr/bin/env python3
#
# Flatpak GUI update all window module
# Copyright (C) 2020 Erdem Ersoy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import gettext
import locale
import threading
import time
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('GLib', '2.0')
gi.require_version('Flatpak', '1.0')
gi.require_version('Gio', '2.0')
from gi.repository import Gtk, GLib, Flatpak, Gio
locale.setlocale(locale.LC_ALL, "")
gettext.bindtextdomain("flatpak-gui", "po/")
gettext.textdomain("flatpak-gui")
_ = gettext.gettext
gettext.install("flatpak-gui", "po/")
class UpdateAllWindow(object):
def __init__(self, application, flatpakinstallation, liststore):
self.Application = application
self.FlatpakInstallation = flatpakinstallation
self.ListStoreMain = liststore
self.FlatpakRefsList = self.FlatpakInstallation.list_installed_refs()
self.FlatHubRefsList = self.FlatpakInstallation.list_remote_refs_sync(
"flathub", Gio.Cancellable.new())
for item in self.FlatpakRefsList:
for item2 in self.FlatHubRefsList:
if item.get_name() == item2.get_name():
self.FlatHubRefsList.remove(item2)
self.FlatpakRefsList = self.FlatpakRefsList + self.FlatHubRefsList
try:
UpdateAllGUIFile = "ui/actionwindow.glade"
UpdateAllBuilder = Gtk.Builder.new_from_file(UpdateAllGUIFile)
UpdateAllBuilder.connect_signals(self)
except GLib.GError:
print(_("Error reading GUI file: ") + UpdateAllGUIFile)
raise
self.UpdateAllWindow = UpdateAllBuilder.get_object("ActionWindow")
self.UpdateAllWindow.set_application(application)
self.UpdateAllWindow.set_title(_("Updating All"))
self.UpdateAllWindow.show()
self.UpdateAllProgressBar = UpdateAllBuilder.get_object(
"ActionProgressBar")
self.ProgressBarValue = int(
self.UpdateAllProgressBar.get_fraction() * 100)
self.UpdateAllLabel = UpdateAllBuilder.get_object("ActionLabel")
self.UpdateAllTextBuffer = UpdateAllBuilder.get_object(
"ActionTextBuffer")
self.UpdateAllTextBuffer.set_text("\0", -1)
self.StatusText = _("Updating...")
self.UpdateAllLabel.set_text(self.StatusText)
self.UpdateAllTextBuffer.set_text(self.StatusText)
self.UpdateAllThread = threading.Thread(
target=self.UpdateAll,
args=())
self.UpdateAllThread.start()
GLib.threads_init()
def UpdateAll(self):
for listitem in self.FlatpakRefsList:
if listitem not in self.FlatHubRefsList:
try:
self.ListItem = listitem
self.FlatpakInstallation.update(
Flatpak.UpdateFlags.NONE,
listitem.get_kind(),
listitem.get_name(),
listitem.get_arch(),
listitem.get_branch(),
self.UpdateAllProgressCallback(
"",
self.ProgressBarValue,
False,
listitem),
None,
Gio.Cancellable.new())
except GLib.Error:
statustext = _("Not updated: ") + listitem.get_name()
self.StatusText = self.StatusText + "\n" + statustext
GLib.idle_add(self.UpdateAllLabel.set_text,
statustext,
priority=GLib.PRIORITY_DEFAULT)
GLib.idle_add(self.UpdateAllTextBuffer.set_text,
self.StatusText,
priority=GLib.PRIORITY_DEFAULT)
else:
statustext = _("Updated: ") + listitem.get_name()
self.StatusText = self.StatusText + "\n" + statustext
GLib.idle_add(self.UpdateAllLabel.set_text,
statustext,
priority=GLib.PRIORITY_DEFAULT)
GLib.idle_add(self.UpdateAllTextBuffer.set_text,
self.StatusText,
priority=GLib.PRIORITY_DEFAULT)
time.sleep(0.5)
statustext = _("Updating completed!")
self.StatusText = self.StatusText + "\n" + statustext
GLib.idle_add(self.UpdateAllLabel.set_text,
statustext,
priority=GLib.PRIORITY_DEFAULT)
GLib.idle_add(self.UpdateAllTextBuffer.set_text,
self.StatusText,
priority=GLib.PRIORITY_DEFAULT)
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())
for item in flatpakrefslist:
for item2 in flathubrefslist:
if item.get_name() == item2.get_name():
flathubrefslist.remove(item2)
flatpakrefslist = flatpakrefslist + flathubrefslist
for listitem in flatpakrefslist:
if listitem.get_kind() == Flatpak.RefKind.APP and \
listitem.get_arch() == Flatpak.get_default_arch():
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])
else:
continue
def UpdateAllProgressCallback(self, *args, **kwargs):
self.ProgressBarValue = self.ProgressBarValue + \
100 / len(self.FlatpakInstallation.list_installed_refs())
self.UpdateAllProgressBar.set_fraction(
float(self.ProgressBarValue) / 100.0)
def onDestroy(self, *args):
self.UpdateAllWindow.destroy()
This diff is collapsed.
This diff is collapsed.
[Desktop Entry]
Version=1.1
Type=Application
Name=Flatpak GUI
Name[tr]=Flatpak GUI
GenericName=GUI for Flatpak
GenericName[tr]=Flatpak için GUI
Comment=Manage Flatpak softwares via GUI
Comment[tr]=GUI ile Flatpak yazılımlarını yönet
TryExec=flatpak-gui
Exec=flatpak-gui %f
Icon=applications-system
MimeType=application/vnd.flatpak.ref
Terminal=false
Categories=Settings;Utility;PackageManager;GTK;
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.1
Copyright (C) 2020 Erdem Ersoy
This file is part of Flatpak GUI.
Flatpak GUI is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Flatpak GUI is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Flatpak GUI. If not, see <http://www.gnu.org/licenses/>.
Author: Erdem Ersoy
-->
<interface>
<requires lib="gtk+" version="3.20"/>
<!-- interface-license-type gplv3 -->
<!-- interface-name Flatpak GUI -->
<!-- interface-description A GUI for Flatpak -->
<!-- interface-copyright 2020 Erdem Ersoy -->
<!-- interface-authors Erdem Ersoy -->
<object class="GtkAboutDialog" id="AboutDialog">
<property name="can_focus">False</property>
<property name="resizable">False</property>
<property name="modal">True</property>
<property name="type_hint">dialog</property>
<property name="program_name">Flatpak GUI</property>
<property name="version">1.0-rc1</property>
<property name="copyright" translatable="yes">Copyright (C) 2020 Erdem Ersoy</property>
<property name="comments" translatable="yes">A GUI for Flatpak</property>
<property name="website">https://www.pardus.org.tr/</property>
<property name="website_label" translatable="yes">Flatpak GUI Web Site</property>
<property name="authors">Erdem Ersoy</property>
<property name="documenters">Erdem Ersoy</property>
<property name="translator_credits" translatable="yes">Erdem Ersoy</property>
<property name="logo_icon_name">applications-system</property>
<property name="license_type">gpl-3-0-only</property>
<child>
<placeholder/>
</child>
<child internal-child="vbox">
<object class="GtkBox">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
</interface>
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.1
Copyright (C) 2020 Erdem Ersoy
This file is part of Flatpak GUI.
Flatpak GUI is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Flatpak GUI is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Flatpak GUI. If not, see <http://www.gnu.org/licenses/>.
Author: Erdem Ersoy
-->
<interface>
<requires lib="gtk+" version="3.20"/>
<!-- interface-license-type gplv3 -->
<!-- interface-name Flatpak GUI -->
<!-- interface-description A GUI for Flatpak -->
<!-- interface-copyright 2020 Erdem Ersoy -->
<!-- interface-authors Erdem Ersoy -->
<object class="GtkTextBuffer" id="ActionTextBuffer"/>
<object class="GtkApplicationWindow" id="ActionWindow">
<property name="can_focus">False</property>
<property name="resizable">False</property>
<property name="modal">True</property>
<property name="default_width">600</property>
<property name="default_height">400</property>
<property name="icon_name">document-save</property>
<property name="show_menubar">False</property>
<signal name="destroy" handler="onDestroy" swapped="no"/>
<child>
<placeholder/>
</child>
<child>
<object class="GtkBox" id="ActionBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="ActionLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkProgressBar" id="ActionProgressBar">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="show_text">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="ActionScrolledWindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTextView" id="ActionTextView">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">False</property>
<property name="wrap_mode">char</property>
<property name="buffer">ActionTextBuffer</property>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
</interface>
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.1
Copyright (C) 2020 Erdem Ersoy
This file is part of Flatpak GUI.
Flatpak GUI is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Flatpak GUI is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Flatpak GUI. If not, see <http://www.gnu.org/licenses/>.
Author: Erdem Ersoy
-->
<interface>
<requires lib="gtk+" version="3.20"/>
<!-- interface-license-type gplv3 -->
<!-- interface-name Flatpak GUI -->
<!-- interface-description A GUI for Flatpak -->
<!-- interface-copyright 2020 Erdem Ersoy -->
<!-- interface-authors Erdem Ersoy -->
<object class="GtkImage" id="InfoButtonImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-copy</property>
</object>
<object class="GtkTextBuffer" id="InfoTextBuffer"/>
<object class="GtkWindow" id="InfoWindow">
<property name="can_focus">False</property>
<property name="resizable">False</property>
<property name="modal">True</property>
<property name="default_width">600</property>
<property name="default_height">400</property>
<property name="icon_name">dialog-information</property>
<property name="type_hint">dialog</property>
<child>
<object class="GtkBox" id="InfoBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<signal name="destroy" handler="onDestroy" swapped="no"/>
<child>
<object class="GtkScrolledWindow" id="InfoScrolledWindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTextView" id="InfoTextView">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">False</property>
<property name="wrap_mode">char</property>
<property name="cursor_visible">False</property>
<property name="buffer">InfoTextBuffer</property>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButtonBox" id="InfoButtonBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="InfoButton">
<property name="label" translatable="yes">_Copy to Clipboard</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="image">InfoButtonImage</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="onPressedCopyToClipboard" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
</interface>
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.1
Copyright (C) 2020 Erdem Ersoy
This file is part of Flatpak GUI.
Flatpak GUI is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Flatpak GUI is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Flatpak GUI. If not, see <http://www.gnu.org/licenses/>.
Author: Erdem Ersoy
-->
<interface>
<requires lib="gtk+" version="3.20"/>
<!-- interface-license-type gplv3 -->
<!-- interface-name Flatpak GUI -->
<!-- interface-description A GUI for Flatpak -->
<!-- interface-copyright 2020 Erdem Ersoy -->
<!-- interface-authors Erdem Ersoy -->
<object class="GtkFileFilter" id="InstallFromFileInputFileFilter">
<mime-types>
<mime-type>application/vnd.flatpak.ref</mime-type>
</mime-types>
</object>
<object class="GtkWindow" id="InstallFromFileInputWindow">
<property name="can_focus">False</property>
<property name="title" translatable="yes">Choose a file</property>
<property name="modal">True</property>
<property name="default_width">600</property>
<property name="default_height">400</property>
<property name="icon_name">document-save</property>
<property name="type_hint">dialog</property>
<signal name="destroy" handler="onDestroy" swapped="no"/>
<child>
<placeholder/>
</child>
<child>
<object class="GtkBox" id="InstallFromFileInputBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
<object class="GtkLabel" id="InstallFromFileInputLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Please choose a Flatpak ref file.</property>
<property name="wrap">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkFileChooserButton" id="InstallFromFileInputFileChooser">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="filter">InstallFromFileInputFileFilter</property>
<property name="title" translatable="yes">Choose a file</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="InstallFromFileInputLabel2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">NOTE: Installing an application from third party remote repositories isn't secured as installing an application from official repositories of your distribution.</property>
<property name="wrap">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButtonBox" id="InstallFromFileInputButtonBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">2</property>
<property name="layout_style">end</property>
<child>
<placeholder/>
</child>
<child>
<object class="GtkButton" id="InstallFromFileInputButton">
<property name="label" translatable="yes">I_nstall</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="image">InstallFromFileInputImage</property>
<property name="use_underline">True</property>
<property name="always_show_image">True</property>
<signal name="clicked" handler="onInstallAtInstallFromFile" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
</child>
</object>
<object class="GtkImage" id="InstallFromFileInputImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-save</property>
</object>
</interface>
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.1
Copyright (C) 2020 Erdem Ersoy
This file is part of Flatpak GUI.
Flatpak GUI is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Flatpak GUI is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Flatpak GUI. If not, see <http://www.gnu.org/licenses/>.
Author: Erdem Ersoy
-->
<interface>
<requires lib="gtk+" version="3.20"/>
<!-- interface-license-type gplv3 -->
<!-- interface-name Flatpak GUI -->
<!-- interface-description A GUI for Flatpak -->
<!-- interface-copyright 2020 Erdem Ersoy -->
<!-- interface-authors Erdem Ersoy -->
<object class="GtkImage" id="InstallInputImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-save</property>
</object>
<object class="GtkWindow" id="InstallInputWindow">
<property name="can_focus">False</property>
<property name="title" translatable="yes">Enter an application name</property>
<property name="modal">True</property>
<property name="default_width">600</property>
<property name="default_height">400</property>
<property name="icon_name">document-save</property>
<property name="type_hint">dialog</property>
<child>
<object class="GtkBox" id="InstallInputBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
<object class="GtkLabel" id="InstallInputLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Please enter an application name (Ex: org.libreoffice.LibreOffice) what you want to install from Flathub.</property>
<property name="wrap">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="InstallInputEntry">
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="InstallInputLabel2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">NOTE: Installing an application from third party remote repositories isn't secured as installing an application from official repositories of your distribution.</property>
<property name="wrap">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButtonBox" id="InstallInputButtonBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">2</property>
<property name="layout_style">end</property>
<child>
<placeholder/>
</child>
<child>
<object class="GtkButton" id="InstallInputButton">
<property name="label" translatable="yes">I_nstall</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="image">InstallInputImage</property>
<property name="use_underline">True</property>
<property name="always_show_image">True</property>
<signal name="clicked" handler="onInstallAtInstall" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
</child>
</object>
</interface>
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.1
Copyright (C) 2020 Erdem Ersoy
This file is part of Flatpak GUI.
Flatpak GUI is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Flatpak GUI is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Flatpak GUI. If not, see <http://www.gnu.org/licenses/>.
Author: Erdem Ersoy
-->
<interface>
<requires lib="gtk+" version="3.20"/>
<!-- interface-license-type gplv3 -->
<!-- interface-name Flatpak GUI -->
<!-- interface-description A GUI for Flatpak -->
<!-- interface-copyright 2020 Erdem Ersoy -->
<!-- interface-authors Erdem Ersoy -->
<object class="GtkMessageDialog" id="MessageDialogError">
<property name="can_focus">False</property>
<property name="title" translatable="yes">Flatpak GUI Error</property>
<property name="resizable">False</property>
<property name="modal">True</property>
<property name="icon_name">dialog-error</property>
<property name="type_hint">dialog</property>
<property name="message_type">error</property>
<property name="buttons">ok</property>
<child>
<placeholder/>
</child>
<child internal-child="vbox">
<object class="GtkBox">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox">
<property name="can_focus">False</property>
<property name="homogeneous">True</property>
<property name="layout_style">end</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
</object>
</child>
</object>
<object class="GtkImage" id="MessageDialogErrorImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-dialog-error</property>
</object>
</interface>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment