Depend on libhandy-1.0

This commit is contained in:
Bleak Grey 2020-06-01 15:40:50 +03:00
parent df58394a35
commit c7740785fd
6 changed files with 30 additions and 12 deletions

3
.gitmodules vendored Normal file
View File

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

View File

@ -18,7 +18,7 @@ To build the app, make sure you have these dependencies:
* libsoup2.4-dev
* libgranite-dev
* libjson-glib-dev
* libhandy-0.0-dev
* libhandy-1.0-dev
Then run `install.sh` in the project directory to install the app.

View File

@ -12,8 +12,8 @@
<!--Application-->
<child>
<object class="HdyPreferencesPage">
<property name="icon_name">preferences-other-symbolic</property>
<property name="title" translatable="yes">Application</property>
<property name="icon_name">applications-system-symbolic</property>
<property name="title" translatable="yes">General</property>
<property name="visible">True</property>
<child>
@ -25,7 +25,7 @@
<property name="visible">True</property>
<property name="activatable_widget">dark_theme</property>
<property name="title" translatable="yes">Dark theme</property>
<child type="action">
<child>
<object class="GtkSwitch" id="dark_theme">
<property name="visible">True</property>
<property name="valign">center</property>
@ -46,7 +46,7 @@
<property name="activatable_widget">autostart</property>
<property name="title" translatable="yes">Autostart</property>
<property name="subtitle" translatable="yes">Start minimized at boot</property>
<child type="action">
<child>
<object class="GtkSwitch" id="autostart">
<property name="visible">True</property>
<property name="valign">center</property>
@ -60,7 +60,7 @@
<property name="activatable_widget">work_in_background</property>
<property name="title" translatable="yes">Background work</property>
<property name="subtitle" translatable="yes">Receive notifications even when the app window is closed</property>
<child type="action">
<child>
<object class="GtkSwitch" id="work_in_background">
<property name="visible">True</property>
<property name="valign">center</property>
@ -96,7 +96,7 @@
<property name="visible">True</property>
<property name="activatable_widget">timeline_page_size</property>
<property name="title" translatable="yes">Posts per page</property>
<child type="action">
<child>
<object class="GtkSpinButton" id="timeline_page_size">
<property name="visible">True</property>
<property name="can_focus">True</property>
@ -112,7 +112,7 @@
<property name="visible">True</property>
<property name="activatable_widget">post_text_size</property>
<property name="title" translatable="yes">Post text size (%)</property>
<child type="action">
<child>
<object class="GtkSpinButton" id="post_text_size">
<property name="visible">True</property>
<property name="can_focus">True</property>
@ -136,7 +136,7 @@
<property name="activatable_widget">live_updates</property>
<property name="title" translatable="yes">Stream timelines</property>
<property name="subtitle" translatable="yes">Add and remove posts in real-time</property>
<child type="action">
<child>
<object class="GtkSwitch" id="live_updates">
<property name="visible">True</property>
<property name="valign">center</property>
@ -151,7 +151,7 @@
<property name="sensitive" bind-source="live_updates" bind-property="state" bind-flags="sync-create"></property>
<property name="title" translatable="yes">Stream public timelines</property>
<property name="subtitle" translatable="yes">Warning: This will use more resources on crowded instances</property>
<child type="action">
<child>
<object class="GtkSwitch" id="public_live_updates">
<property name="visible">True</property>
<property name="valign">center</property>

View File

@ -16,6 +16,21 @@ asresources = gnome.compile_resources(
c_name: 'as'
)
libhandy_dep = dependency('libhandy-1', version: '>= 0.80.0')
if not libhandy_dep.found()
libhandy = subproject(
'libhandy',
install: false,
default_options: [
'examples=false',
'package_subdir=' + meson.project_name(),
'tests=false',
]
)
libhandy_dep = libhandy.get_variable('libhandy_dep')
endif
executable(
meson.project_name(),
asresources,
@ -75,7 +90,7 @@ executable(
dependency('granite', version: '>=5.2.0'),
dependency('json-glib-1.0'),
dependency('libsoup-2.4'),
dependency('libhandy-0.0', version: '>=0.0.13'),
libhandy_dep,
],
install: true,
)

View File

@ -61,7 +61,6 @@ namespace Tootle {
public static int main (string[] args) {
Gtk.init (ref args);
Hdy.init (ref args);
try {
var opt_context = new OptionContext ("- Options");
opt_context.add_main_entries (app_options, null);

1
subprojects/libhandy Submodule

@ -0,0 +1 @@
Subproject commit b61eefde06040703026f49a0b979588e69f77d3a