ditch gdlib

This commit is contained in:
Bilal Elmoussaoui 2019-02-11 01:52:41 +01:00
parent 077b2afb61
commit e43abc64ef
11 changed files with 16 additions and 56 deletions

View file

@ -2,7 +2,6 @@ include: 'https://gitlab.gnome.org/GNOME/citemplates/raw/master/flatpak/flatpak_
variables:
BUNDLE: "authenticator-dev.flatpak"
GIT_SUBMODULE_STRATEGY: recursive
flatpak:
image: 'registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master'

3
.gitmodules vendored
View file

@ -1,3 +0,0 @@
[submodule "subprojects/libgd"]
path = subprojects/libgd
url = https://gitlab.gnome.org/GNOME/libgd.git

View file

@ -1,20 +1,16 @@
Hey newcomer, welcome to Authenticator.
# Hey newcomer, welcome to Authenticator
The application is built using Python3, Gtk 3, GLib and other GNOME technologies around it. It's built to run on GNOME & Librem 5 phone.
## If you're a translator:
## If you're a translator
You can translate Authenticator here: https://hosted.weblate.org/engage/authenticator/
## If you're a developer:
## If you're a developer
You want to work on fixing a bug, adding a new feature, please first join our Matrix Channel and ask if there's anyone working on that already.
The Matrix Channel: https://matrix.to/#/#authenticator:matrix.org
We suggest you to use [GNOME Builder](https://flathub.org/apps/details/org.gnome.Builder) as the IDE supports Flatpak and you can hack on Authenticator, click on run and voilà, you have got to test your modifications without having to think about installing the dependencies or how to build the application itself.
Thanks and good hacking.

View file

@ -192,6 +192,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="action_name">win.toggle-searchbar</property>
<property name="image">search_image</property>
<signal name="toggled" handler="search_btn_toggled" swapped="no"/>
</object>

View file

@ -37,22 +37,10 @@ else
message('Found python3 binary')
endif
PKGLIB_DIR = join_paths(get_option('prefix'), get_option('libdir'), meson.project_name())
LOCALE_DIR = join_paths(get_option('prefix'), get_option('localedir'))
PKGDATA_DIR = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
LIBEXEC_DIR = join_paths(get_option('prefix'), get_option('libexecdir'))
libgd_dep = dependency('gdlib', required: false)
if not libgd_dep.found()
libgd_proj = subproject('libgd',
default_options: [
'with-introspection=true',
'with-notification=true',
'static=false',
'pkgdatadir=' + PKGDATA_DIR,
'pkglibdir=' + PKGLIB_DIR
]
)
endif
# Configuration params
conf = configuration_data()
@ -63,7 +51,6 @@ conf.set('LOCALE_DIR', LOCALE_DIR)
conf.set('PYTHON_DIR', join_paths(get_option('prefix'), python.sysconfig_path('purelib')))
conf.set('PYTHON_EXEC_DIR', join_paths(get_option('prefix'), python.sysconfig_path('stdlib')))
conf.set('VERSION', meson.project_version())
conf.set('PKGLIB_DIR', PKGLIB_DIR)
conf.set('PROFILE', profile)
conf.set('NAME_SUFFIX', name_suffix)
conf.set('libexecdir', LIBEXEC_DIR)

View file

@ -22,9 +22,8 @@ from gettext import gettext as _
from gi import require_version
require_version("Gtk", "3.0")
require_version('Gd', '1.0')
from gi.repository import Gd, Gio, Gtk, GObject, Gdk, GLib
from gi.repository import Gio, Gtk, GObject, Gdk, GLib
from ..headerbar import HeaderBarButton
from ...models import OTP
@ -195,7 +194,6 @@ class AccountConfig(Gtk.Box, GObject.GObject):
else:
self.token_entry.get_style_context().remove_class("error")
valid_token = True
self.emit("changed", all([valid_name, valid_provider, valid_token]))
def scan_qr(self):

View file

@ -21,9 +21,8 @@ from gettext import gettext as _
from gi import require_version
require_version('Gd', '1.0')
require_version("Gtk", "3.0")
from gi.repository import Gd, Gtk, GObject
from gi.repository import Gtk, GObject
from .window import Window
from ..models import Settings, Keyring
@ -252,7 +251,7 @@ class SettingsWindow(Gtk.Window):
self.add(self.stack)
def __on_app_can_be_locked_changed(self, __, state):
notification = Gd.Notification()
"""notification = Gd.Notification()
notification.set_timeout(5)
notification_lbl = Gtk.Label()
@ -262,6 +261,7 @@ class SettingsWindow(Gtk.Window):
notification_parent = self.stack.get_child_by_name("behaviour")
notification_parent.add(notification)
notification_parent.reorder_child(notification, 0)
"""
self.show_all()
if state and not Keyring.has_password():
@ -279,6 +279,7 @@ class SettingsWindow(Gtk.Window):
state)
def __on_clear_database_clicked(self, *__):
"""
notification = Gd.Notification()
notification.set_timeout(5)
notification.connect("dismissed", self.__clear_database)
@ -297,6 +298,7 @@ class SettingsWindow(Gtk.Window):
notification_parent = self.stack.get_child_by_name("behaviour")
notification_parent.add(notification)
notification_parent.reorder_child(notification, 0)
"""
self.show_all()
@staticmethod

View file

@ -19,13 +19,10 @@
from gettext import gettext as _
from gi import require_version
require_version('Gd', '1.0')
require_version("Gtk", "3.0")
from gi.repository import Gd, Gtk, GObject, Gio, GLib
from gi.repository import Gtk, GObject, Gio, GLib
from ..models import Logger, Settings, Database, AccountsManager
from .headerbar import HeaderBar, HeaderBarState
from .accounts import AccountsWidget, AddAccountWindow
from .search_bar import SearchBar
from . import LoginWidget
class WindowState:

View file

@ -23,16 +23,7 @@ import sy
sys.path.insert(1, '@PYTHON_EXEC_DIR@')
sys.path.insert(1, '@PYTHON_DIR@')
from os import path
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('GIRepository', '2.0')
from gi.repository import Gio, GIRepository, GLib
GIRepository.Repository.prepend_search_path(
path.join('@PKGLIB_DIR@', 'girepository-1.0'))
GIRepository.Repository.prepend_library_path('@PKGLIB_DIR@')
from gi.repository import Gio, GLib
from Authenticator.models.database import Database
from Authenticator.models.account import Account

View file

@ -27,8 +27,7 @@ from os import path
from gettext import gettext as _
from gi import require_version
require_version('GIRepository', '2.0')
from gi.repository import Gio, GIRepository
from gi.repository import Gio
sys.path.insert(1, '@PYTHON_EXEC_DIR@')
sys.path.insert(1, '@PYTHON_DIR@')
@ -40,14 +39,8 @@ def prepare_locale():
gettext.textdomain('@GETTEXT_PACKAGE@')
def prepare_gir():
gir_repository_path = path.join('@PKGLIB_DIR@', 'girepository-1.0')
GIRepository.Repository.prepend_search_path(gir_repository_path)
GIRepository.Repository.prepend_library_path('@PKGLIB_DIR@')
if __name__ == "__main__":
prepare_locale()
prepare_gir()
parser = argparse.ArgumentParser(prog="Authenticator")
parser.add_argument("--debug", "-d", action="store_true",

@ -1 +0,0 @@
Subproject commit 7ae254bfc5f641c60566614e08245176f7bc5aa8