Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
**1.4.3**
- Show the url and a button for certificate display in the Login window (thanks to GB609)
- Speed up loading games from the GOG API (thanks to GB609 and sharkwouter)
- Canceling an automatic windows game installation will not retry with the fallback any longer (thanks to GB609)
- Fix not-installed Linux games missing from the library (thanks to slowsage)
Expand Down
31 changes: 31 additions & 0 deletions minigalaxy/ui/cert_dialog.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
from minigalaxy.ui.gtk import Gtk, load_ui
from minigalaxy.translation import _


@Gtk.Template(string=load_ui("cert_window.ui"))
class CertDialog(Gtk.Dialog):
__gtype_name__ = "CertDialog"

entry_issuer = Gtk.Template.Child()
entry_subject = Gtk.Template.Child()
entry_valid_from = Gtk.Template.Child()
entry_valid_to = Gtk.Template.Child()
text_cert_raw = Gtk.Template.Child()

def __init__(self, parent=None, cert=None):
Gtk.Dialog.__init__(self, title=_('Show certificate'), parent=parent)
self.add_button(_('Close'), Gtk.ResponseType.CLOSE)

valid_from = cert.get_not_valid_before()
valid_from = valid_from.format_iso8601() if valid_from else '-'
valid_to = cert.get_not_valid_after()
valid_to = valid_to.format_iso8601() if valid_to else '-'

self.entry_issuer.set_text(cert.get_issuer_name())
self.entry_subject.set_text(cert.get_subject_name())
self.entry_valid_from.set_text(valid_from)
self.entry_valid_to.set_text(valid_to)

buffer = self.text_cert_raw.get_buffer()
buffer.set_text(cert.props.certificate_pem)
self.connect('response', lambda *args: self.destroy())
57 changes: 57 additions & 0 deletions minigalaxy/ui/data/browser.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.40.0 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<template class="Browser" parent="GtkDialog">
<property name="can-focus">False</property>
<property name="modal">True</property>
<property name="default-width">390</property>
<property name="default-height">550</property>
<property name="type-hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="box">
<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>
<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>
<child>
<object class="GtkEntry" id="urlbar">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="valign">start</property>
<property name="editable">False</property>
<property name="caps-lock-warning">False</property>
<property name="primary-icon-name">system-lock-screen</property>
<property name="secondary-icon-activatable">False</property>
<property name="secondary-icon-sensitive">False</property>
<property name="primary-icon-tooltip-text" translatable="yes">Show page certificate...</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
</template>
</interface>
226 changes: 226 additions & 0 deletions minigalaxy/ui/data/cert_window.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.40.0 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<template class="CertDialog" parent="GtkDialog">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="modal">True</property>
<property name="type-hint">dialog</property>
<property name="accept-focus">False</property>
<property name="focus-on-map">False</property>
<child internal-child="vbox">
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">2</property>
<property name="margin-end">2</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>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
<child>
<!-- n-columns=2 n-rows=5 -->
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="valign">start</property>
<property name="row-spacing">1</property>
<property name="column-spacing">10</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Issuer:</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Subject:</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="margin-top">5</property>
<property name="label" translatable="yes">Validity</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">- from:</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">- to:</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="entry_issuer">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="valign">center</property>
<property name="hexpand">True</property>
<property name="editable">False</property>
<property name="has-frame">False</property>
<property name="max-width-chars">65</property>
<property name="caps-lock-warning">False</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="entry_subject">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="valign">center</property>
<property name="hexpand">True</property>
<property name="editable">False</property>
<property name="has-frame">False</property>
<property name="max-width-chars">65</property>
<property name="caps-lock-warning">False</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="entry_valid_from">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="valign">center</property>
<property name="hexpand">True</property>
<property name="editable">False</property>
<property name="has-frame">False</property>
<property name="max-width-chars">65</property>
<property name="caps-lock-warning">False</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="entry_valid_to">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="valign">center</property>
<property name="hexpand">True</property>
<property name="editable">False</property>
<property name="has-frame">False</property>
<property name="max-width-chars">65</property>
<property name="caps-lock-warning">False</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="margin-top">10</property>
<property name="label" translatable="yes">Raw certificate data:</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkTextView" id="text_cert_raw">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="editable">False</property>
<property name="accepts-tab">False</property>
<property name="monospace">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
</child>
</template>
</interface>
42 changes: 0 additions & 42 deletions minigalaxy/ui/data/login.ui

This file was deleted.

Loading
Loading