Verified Kaydet (Commit) 067cfba4 authored tarafından Erdem Ersoy's avatar Erdem Ersoy

Update Info window

* Move "Copy to Clipboard" button to header
* Add "FlatHub Page" button to header for visiting the app on FlatHub.
üst 0c570797
...@@ -8,7 +8,7 @@ msgid "" ...@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-05-05 09:19+0300\n" "POT-Creation-Date: 2020-05-05 09:43+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
...@@ -37,7 +37,7 @@ msgstr "" ...@@ -37,7 +37,7 @@ msgstr ""
msgid "There are too many arguments. Argument count: " msgid "There are too many arguments. Argument count: "
msgstr "" msgstr ""
#: pardusflatpakgui/infowindow.py:45 #: pardusflatpakgui/infowindow.py:46
#: pardusflatpakgui/installfromfilewindow.py:73 #: pardusflatpakgui/installfromfilewindow.py:73
#: pardusflatpakgui/installwindow.py:87 pardusflatpakgui/mainwindow.py:51 #: pardusflatpakgui/installwindow.py:87 pardusflatpakgui/mainwindow.py:51
#: pardusflatpakgui/uninstallwindow.py:86 #: pardusflatpakgui/uninstallwindow.py:86
...@@ -45,11 +45,15 @@ msgstr "" ...@@ -45,11 +45,15 @@ msgstr ""
msgid "Error reading GUI file: " msgid "Error reading GUI file: "
msgstr "" msgstr ""
#: pardusflatpakgui/infowindow.py:53 #: pardusflatpakgui/infowindow.py:54
msgid "_Copy to Clipboard" msgid "_Copy to Clipboard"
msgstr "" msgstr ""
#: pardusflatpakgui/infowindow.py:57 #: pardusflatpakgui/infowindow.py:57
msgid "_FlatHub Page"
msgstr ""
#: pardusflatpakgui/infowindow.py:61
msgid "Info About " msgid "Info About "
msgstr "" msgstr ""
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
import gettext import gettext
import locale import locale
import webbrowser
import gi import gi
gi.require_version('Gtk', '3.0') gi.require_version('Gtk', '3.0')
gi.require_version('Gdk', '3.0') gi.require_version('Gdk', '3.0')
...@@ -32,10 +33,11 @@ gettext.install("pardus-flatpak-gui", "/usr/share/locale/") ...@@ -32,10 +33,11 @@ gettext.install("pardus-flatpak-gui", "/usr/share/locale/")
class InfoWindow(object): class InfoWindow(object):
def __init__(self, application, info_string, app): def __init__(self, application, info_string, app, real_name):
self.Application = application self.Application = application
self.InfoString = info_string self.InfoString = info_string
self.App = app self.App = app
self.real_name = real_name
try: try:
info_gui_file = "/usr/share/pardus/pardus-flatpak-gui/ui/infowindow.glade" info_gui_file = "/usr/share/pardus/pardus-flatpak-gui/ui/infowindow.glade"
...@@ -49,8 +51,11 @@ class InfoWindow(object): ...@@ -49,8 +51,11 @@ class InfoWindow(object):
"InfoTextBuffer") "InfoTextBuffer")
info_text_buffer.set_text(info_string) info_text_buffer.set_text(info_string)
info_button = info_builder.get_object("InfoButton") info_button_copy_to_clipboard = info_builder.get_object("InfoButtonCopyToClipboard")
info_button.set_label(_("_Copy to Clipboard")) info_button_copy_to_clipboard.set_label(_("_Copy to Clipboard"))
info_button_flathub_page = info_builder.get_object("InfoButtonFlatHubPage")
info_button_flathub_page.set_label(_("_FlatHub Page"))
self.InfoWindow = info_builder.get_object("InfoWindow") self.InfoWindow = info_builder.get_object("InfoWindow")
self.InfoWindow.set_application(application) self.InfoWindow.set_application(application)
...@@ -63,3 +68,6 @@ class InfoWindow(object): ...@@ -63,3 +68,6 @@ class InfoWindow(object):
def on_copy_to_clipboard(self, button): def on_copy_to_clipboard(self, button):
clipboard_current = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD) clipboard_current = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD)
clipboard_current.set_text(self.InfoString, -1) clipboard_current.set_text(self.InfoString, -1)
def on_flathub_page(self, button):
webbrowser.open_new_tab("https://flathub.org/apps/details/" + self.real_name)
...@@ -588,7 +588,7 @@ class MainWindow(object): ...@@ -588,7 +588,7 @@ class MainWindow(object):
self.MessageDialogError.hide() self.MessageDialogError.hide()
return None return None
InfoWindow(self.Application, info_str, ref) InfoWindow(self.Application, info_str, ref, real_name)
def on_uninstall(self, menu_item): def on_uninstall(self, menu_item):
if not self.HeaderBarShowButton.get_active(): if not self.HeaderBarShowButton.get_active():
......
...@@ -7,8 +7,8 @@ msgid "" ...@@ -7,8 +7,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Flatpak GUI 1.0-rc1\n" "Project-Id-Version: Flatpak GUI 1.0-rc1\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-05-05 09:19+0300\n" "POT-Creation-Date: 2020-05-05 09:43+0300\n"
"PO-Revision-Date: 2020-05-05 09:20+0300\n" "PO-Revision-Date: 2020-05-05 09:39+0300\n"
"Last-Translator: Erdem Ersoy <<erdem.ersoy@pardus.org.tr>>\n" "Last-Translator: Erdem Ersoy <<erdem.ersoy@pardus.org.tr>>\n"
"Language-Team: Erdem Ersoy <erdem.ersoy@pardus.org.tr>\n" "Language-Team: Erdem Ersoy <erdem.ersoy@pardus.org.tr>\n"
"Language: en\n" "Language: en\n"
...@@ -39,7 +39,7 @@ msgstr "<big><b>Argument Error</b></big>" ...@@ -39,7 +39,7 @@ msgstr "<big><b>Argument Error</b></big>"
msgid "There are too many arguments. Argument count: " msgid "There are too many arguments. Argument count: "
msgstr "There are too many arguments. Argument count: " msgstr "There are too many arguments. Argument count: "
#: pardusflatpakgui/infowindow.py:45 #: pardusflatpakgui/infowindow.py:46
#: pardusflatpakgui/installfromfilewindow.py:73 #: pardusflatpakgui/installfromfilewindow.py:73
#: pardusflatpakgui/installwindow.py:87 pardusflatpakgui/mainwindow.py:51 #: pardusflatpakgui/installwindow.py:87 pardusflatpakgui/mainwindow.py:51
#: pardusflatpakgui/uninstallwindow.py:86 #: pardusflatpakgui/uninstallwindow.py:86
...@@ -47,11 +47,15 @@ msgstr "There are too many arguments. Argument count: " ...@@ -47,11 +47,15 @@ msgstr "There are too many arguments. Argument count: "
msgid "Error reading GUI file: " msgid "Error reading GUI file: "
msgstr "Error reading GUI file: " msgstr "Error reading GUI file: "
#: pardusflatpakgui/infowindow.py:53 #: pardusflatpakgui/infowindow.py:54
msgid "_Copy to Clipboard" msgid "_Copy to Clipboard"
msgstr "_Copy to Clipboard" msgstr "_Copy to Clipboard"
#: pardusflatpakgui/infowindow.py:57 #: pardusflatpakgui/infowindow.py:57
msgid "_FlatHub Page"
msgstr "_FlatHub Page"
#: pardusflatpakgui/infowindow.py:61
msgid "Info About " msgid "Info About "
msgstr "Info About " msgstr "Info About "
...@@ -390,11 +394,21 @@ msgstr "Updating canceled!" ...@@ -390,11 +394,21 @@ msgstr "Updating canceled!"
#~ msgid "Install From _Entry" #~ msgid "Install From _Entry"
#~ msgstr "Install From _Entry" #~ msgstr "Install From _Entry"
#~ msgid "Please enter an application name (Ex: org.libreoffice.LibreOffice) what you want to install from Flathub." #~ msgid ""
#~ msgstr "Please enter an application name (Ex: org.libreoffice.LibreOffice) what you want to install from Flathub." #~ "Please enter an application name (Ex: org.libreoffice.LibreOffice) what "
#~ "you want to install from Flathub."
#~ msgid "NOTE: Installing an application from third party remote repositories isn't secured as installing an application from official repositories of your distribution." #~ msgstr ""
#~ msgstr "NOTE: Installing an application from third party remote repositories isn't secured as installing an application from official repositories of your distribution." #~ "Please enter an application name (Ex: org.libreoffice.LibreOffice) what "
#~ "you want to install from Flathub."
#~ msgid ""
#~ "NOTE: Installing an application from third party remote repositories "
#~ "isn't secured as installing an application from official repositories of "
#~ "your distribution."
#~ msgstr ""
#~ "NOTE: Installing an application from third party remote repositories "
#~ "isn't secured as installing an application from official repositories of "
#~ "your distribution."
#~ msgid "Enter an application name" #~ msgid "Enter an application name"
#~ msgstr "Enter an application name" #~ msgstr "Enter an application name"
......
...@@ -7,8 +7,8 @@ msgid "" ...@@ -7,8 +7,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-05-05 09:19+0300\n" "POT-Creation-Date: 2020-05-05 09:43+0300\n"
"PO-Revision-Date: 2020-05-05 09:23+0300\n" "PO-Revision-Date: 2020-05-05 09:39+0300\n"
"Last-Translator: Erdem Ersoy <<erdem.ersoy@pardus.org.tr>>\n" "Last-Translator: Erdem Ersoy <<erdem.ersoy@pardus.org.tr>>\n"
"Language-Team: \n" "Language-Team: \n"
"Language: tr\n" "Language: tr\n"
...@@ -38,7 +38,7 @@ msgstr "<big><b>Argüman Hatası</b></big>" ...@@ -38,7 +38,7 @@ msgstr "<big><b>Argüman Hatası</b></big>"
msgid "There are too many arguments. Argument count: " msgid "There are too many arguments. Argument count: "
msgstr "Çok fazla argüman var. Argüman sayısı: " msgstr "Çok fazla argüman var. Argüman sayısı: "
#: pardusflatpakgui/infowindow.py:45 #: pardusflatpakgui/infowindow.py:46
#: pardusflatpakgui/installfromfilewindow.py:73 #: pardusflatpakgui/installfromfilewindow.py:73
#: pardusflatpakgui/installwindow.py:87 pardusflatpakgui/mainwindow.py:51 #: pardusflatpakgui/installwindow.py:87 pardusflatpakgui/mainwindow.py:51
#: pardusflatpakgui/uninstallwindow.py:86 #: pardusflatpakgui/uninstallwindow.py:86
...@@ -46,11 +46,15 @@ msgstr "Çok fazla argüman var. Argüman sayısı: " ...@@ -46,11 +46,15 @@ msgstr "Çok fazla argüman var. Argüman sayısı: "
msgid "Error reading GUI file: " msgid "Error reading GUI file: "
msgstr "GUI dosyasını okumada hata: " msgstr "GUI dosyasını okumada hata: "
#: pardusflatpakgui/infowindow.py:53 #: pardusflatpakgui/infowindow.py:54
msgid "_Copy to Clipboard" msgid "_Copy to Clipboard"
msgstr "_Panoya Kopyala" msgstr "_Panoya Kopyala"
#: pardusflatpakgui/infowindow.py:57 #: pardusflatpakgui/infowindow.py:57
msgid "_FlatHub Page"
msgstr "_FlatHub Sayfası"
#: pardusflatpakgui/infowindow.py:61
msgid "Info About " msgid "Info About "
msgstr "Hakkında Bilgi: " msgstr "Hakkında Bilgi: "
...@@ -389,11 +393,20 @@ msgstr "Güncellenme iptal edildi!" ...@@ -389,11 +393,20 @@ msgstr "Güncellenme iptal edildi!"
#~ msgid "Install From _Entry" #~ msgid "Install From _Entry"
#~ msgstr "_Girdiden Yükle" #~ msgstr "_Girdiden Yükle"
#~ msgid "Please enter an application name (Ex: org.libreoffice.LibreOffice) what you want to install from Flathub." #~ msgid ""
#~ msgstr "Lütfen Flathub'tan yüklemek istediğiniz bir uygulama adı (Ör: org.libreoffice.LibreOffice) giriniz." #~ "Please enter an application name (Ex: org.libreoffice.LibreOffice) what "
#~ "you want to install from Flathub."
#~ msgid "NOTE: Installing an application from third party remote repositories isn't secured as installing an application from official repositories of your distribution." #~ msgstr ""
#~ msgstr "NOT: Üçüncü parti uzak depolardan bir uygulama yüklemek dağıtımınızın resmî depolarından bir uygulama yükleme kadar güvenli değildir." #~ "Lütfen Flathub'tan yüklemek istediğiniz bir uygulama adı (Ör: org."
#~ "libreoffice.LibreOffice) giriniz."
#~ msgid ""
#~ "NOTE: Installing an application from third party remote repositories "
#~ "isn't secured as installing an application from official repositories of "
#~ "your distribution."
#~ msgstr ""
#~ "NOT: Üçüncü parti uzak depolardan bir uygulama yüklemek dağıtımınızın "
#~ "resmî depolarından bir uygulama yükleme kadar güvenli değildir."
#~ msgid "Enter an application name" #~ msgid "Enter an application name"
#~ msgstr "Bir uygulama adı giriniz" #~ msgstr "Bir uygulama adı giriniz"
......
...@@ -28,6 +28,11 @@ Author: Erdem Ersoy ...@@ -28,6 +28,11 @@ Author: Erdem Ersoy
<!-- interface-description A GUI for Flatpak --> <!-- interface-description A GUI for Flatpak -->
<!-- interface-copyright 2020 Erdem Ersoy --> <!-- interface-copyright 2020 Erdem Ersoy -->
<!-- interface-authors Erdem Ersoy --> <!-- interface-authors Erdem Ersoy -->
<object class="GtkImage" id="CopyToClipboardButtonImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-go-forward</property>
</object>
<object class="GtkImage" id="InfoButtonImage"> <object class="GtkImage" id="InfoButtonImage">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
...@@ -43,8 +48,41 @@ Author: Erdem Ersoy ...@@ -43,8 +48,41 @@ Author: Erdem Ersoy
<property name="icon_name">dialog-information</property> <property name="icon_name">dialog-information</property>
<property name="type_hint">dialog</property> <property name="type_hint">dialog</property>
<signal name="delete-event" handler="on_delete_info_window" swapped="no"/> <signal name="delete-event" handler="on_delete_info_window" swapped="no"/>
<child> <child type="titlebar">
<placeholder/> <object class="GtkHeaderBar" id="InfoHeader">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="show_close_button">True</property>
<child>
<object class="GtkButton" id="InfoButtonCopyToClipboard">
<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="on_copy_to_clipboard" swapped="no"/>
</object>
<packing>
<property name="pack_type">end</property>
</packing>
</child>
<child>
<object class="GtkButton" id="InfoButtonFlatHubPage">
<property name="label" translatable="yes">_FlatHub Page</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="image">CopyToClipboardButtonImage</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="on_flathub_page" swapped="no"/>
</object>
<packing>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child> </child>
<child> <child>
<object class="GtkBox" id="InfoBox"> <object class="GtkBox" id="InfoBox">
...@@ -74,34 +112,6 @@ Author: Erdem Ersoy ...@@ -74,34 +112,6 @@ Author: Erdem Ersoy
<property name="position">0</property> <property name="position">0</property>
</packing> </packing>
</child> </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="on_copy_to_clipboard" 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> </object>
</child> </child>
</object> </object>
......
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