Commit e43abc64 authored by Bilal Elmoussaoui's avatar Bilal Elmoussaoui

ditch gdlib

parent 077b2afb
Pipeline #58131 passed with stages
in 2 minutes and 14 seconds
......@@ -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'
......
[submodule "subprojects/libgd"]
path = subprojects/libgd
url = https://gitlab.gnome.org/GNOME/libgd.git
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.
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.
\ No newline at end of file
Thanks and good hacking.
......@@ -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>
......
......@@ -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)
......
......@@ -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):
......
......@@ -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
......
......@@ -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:
......
......@@ -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
......
......@@ -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",
......
Subproject commit 7ae254bfc5f641c60566614e08245176f7bc5aa8
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