about dialog: no need for a specific file for it.

This commit is contained in:
Bilal Elmoussaoui 2019-02-12 11:12:38 +01:00
parent 2b7402ee98
commit 0edc4da4cc
4 changed files with 6 additions and 38 deletions

View file

@ -2,7 +2,7 @@
<!-- Generated with glade 3.22.0 -->
<interface>
<requires lib="gtk+" version="3.22"/>
<template class="AboutDialog" parent="GtkAboutDialog">
<object class="GtkAboutDialog" id="about_dialog">
<property name="can_focus">False</property>
<property name="type_hint">dialog</property>
<property name="program_name">Authenticator</property>
@ -45,5 +45,5 @@ Tobias Bernard</property>
<child type="titlebar">
<placeholder/>
</child>
</template>
</object>
</interface>

View file

@ -19,7 +19,7 @@
from gettext import gettext as _
from gi.repository import Gtk, GLib, Gio, Gdk, GObject
from Authenticator.widgets import Window, WindowState, AboutDialog, import_json, export_json
from Authenticator.widgets import Window, WindowState, import_json, export_json
from Authenticator.models import Database, Settings, Clipboard, Logger, Keyring
@ -164,7 +164,9 @@ class Application(Gtk.Application):
"""
Shows about dialog
"""
dialog = AboutDialog()
builder = Gtk.Builder()
builder.add_from_resource("/com/github/bilelmoussaoui/Authenticator/about_dialog.ui")
dialog = builder.get_object("about_dialog")
dialog.set_transient_for(Window.get_default())
dialog.run()
dialog.destroy()

View file

@ -16,7 +16,6 @@
You should have received a copy of the GNU General Public License
along with Authenticator. If not, see <http://www.gnu.org/licenses/>.
"""
from .about import AboutDialog
from .accounts import AccountsList, AccountRow
from .window import Window, WindowState
from .settings import SettingsWindow

View file

@ -1,33 +0,0 @@
"""
Copyright © 2017 Bilal Elmoussaoui <bil.elmoussaoui@gmail.com>
This file is part of Authenticator.
Authenticator 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.
Authenticator 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 Authenticator. If not, see <http://www.gnu.org/licenses/>.
"""
from gi.repository import Gtk
@Gtk.Template(resource_path='/com/github/bilelmoussaoui/Authenticator/about_dialog.ui')
class AboutDialog(Gtk.AboutDialog):
"""
AboutDialog Widget.
"""
__gtype_name__ ="AboutDialog"
def __init__(self):
super(AboutDialog, self).__init__()
def __repr__(self):
return '<AboutDialog>'