forked from sergiotarxz/mangareader
Adding support for building in both postmarketos and flatpak.
Neat trick with dlsym employed.
This commit is contained in:
parent
155d08ac4c
commit
07537a71f1
@ -29,9 +29,14 @@ sources = [
|
||||
'src/main.c',
|
||||
]
|
||||
|
||||
link_arguments = [
|
||||
'-ldl'
|
||||
]
|
||||
|
||||
executable('openmg',
|
||||
sources,
|
||||
dependencies : openmgdeps,
|
||||
include_directories : inc,
|
||||
install : true
|
||||
install : true,
|
||||
link_args : link_arguments
|
||||
)
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <adwaita.h>
|
||||
|
||||
@ -26,7 +28,14 @@ activate (AdwApplication *app,
|
||||
GtkListView *list_view;
|
||||
GtkWidget *scroll;
|
||||
AdwLeaflet *views_leaflet = ADW_LEAFLET (adw_leaflet_new ());
|
||||
adw_leaflet_set_can_swipe_back (views_leaflet, 1);
|
||||
typedef void (*swipe_back_t)(AdwLeaflet *, gboolean);
|
||||
swipe_back_t swipe_back = (swipe_back_t) dlsym
|
||||
(NULL, "adw_leaflet_set_can_navigate_back");
|
||||
if (!swipe_back) {
|
||||
swipe_back = (swipe_back_t) dlsym
|
||||
(NULL, "adw_leaflet_set_can_swipe_back");
|
||||
}
|
||||
swipe_back (views_leaflet, 1);
|
||||
|
||||
create_headerbar (box, views_leaflet);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user