diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 379050e1..d19a3cdb 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -26,7 +26,7 @@ variables:
meson vala desktop-file-utils enchant2-devel folks-devel gcr-devel
glib2-devel gmime30-devel gnome-online-accounts-devel gspell-devel
gsound-devel gtk3-devel iso-codes-devel json-glib-devel itstool
- libappstream-glib-devel libgee-devel libhandy-devel libpeas-devel
+ libappstream-glib-devel libgee-devel libhandy1-devel libpeas-devel
libsecret-devel libunwind-devel libxml2-devel libytnef-devel
sqlite-devel webkitgtk4-devel
FEDORA_TEST_DEPS: glibc-langpack-en tar xz Xvfb
@@ -37,7 +37,7 @@ variables:
itstool libappstream-glib-dev libenchant-2-dev libfolks-dev
libgcr-3-dev libgee-0.8-dev libglib2.0-dev libgmime-3.0-dev
libgoa-1.0-dev libgspell-1-dev libgsound-dev libgtk-3-dev
- libhandy-0.0-dev libjson-glib-dev libmessaging-menu-dev
+ libhandy-1-dev libjson-glib-dev libmessaging-menu-dev
libpeas-dev libsecret-1-dev libsqlite3-dev libunwind-dev
libwebkit2gtk-4.0-dev libxml2-dev libytnef0-dev
UBUNTU_TEST_DEPS: librsvg2-common locales xauth xvfb
diff --git a/.gitmodules b/.gitmodules
index e69de29b..69a8a2ff 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -0,0 +1,4 @@
+[submodule "subprojects/libhandy"]
+ path = subprojects/libhandy
+ url = https://gitlab.gnome.org/GNOME/libhandy.git
+ branch = master
diff --git a/INSTALL b/INSTALL
index 8cb6743a..6572303f 100644
--- a/INSTALL
+++ b/INSTALL
@@ -43,7 +43,7 @@ Install them by running this command:
folks-devel gcr-devel glib2-devel gmime30-devel \
gnome-online-accounts-devel gspell-devel gsound-devel \
gtk3-devel iso-codes-devel itstool json-glib-devel \
- libappstream-glib-devel libgee-devel libhandy-devel \
+ libappstream-glib-devel libgee-devel libhandy1-devel \
libpeas-devel libsecret-devel libunwind-devel libxml2-devel \
libytnef-devel sqlite-devel webkitgtk4-devel
@@ -57,7 +57,7 @@ Install them by running this command:
libappstream-glib-dev libenchant-2-dev libfolks-dev \
libgcr-3-dev libgee-0.8-dev libglib2.0-dev libgmime-3.0-dev \
libgoa-1.0-dev libgspell-1-dev libgsound-dev libgtk-3-dev \
- libjson-glib-dev libhandy-0.0-dev libpeas-dev libsecret-1-dev \
+ libjson-glib-dev libhandy-1-dev libpeas-dev libsecret-1-dev \
libsqlite3-dev libunwind-dev libwebkit2gtk-4.0-dev libxml2-dev \
libytnef0-dev
diff --git a/meson.build b/meson.build
index 61d0e096..10062688 100644
--- a/meson.build
+++ b/meson.build
@@ -85,7 +85,7 @@ gthread = dependency('gthread-2.0', version: '>=' + target_glib)
iso_codes = dependency('iso-codes')
javascriptcoregtk = dependency('javascriptcoregtk-4.0', version: '>=' + target_webkit)
json_glib = dependency('json-glib-1.0', version: '>= 1.0')
-libhandy = dependency('libhandy-0.0', version: '>= 0.0.10')
+libhandy = dependency('libhandy-1', version: '>= 0.90', required: false)
libmath = cc.find_library('m')
libpeas = dependency('libpeas-1.0', version: '>= 1.24.0')
libpeas_gtk = dependency('libpeas-gtk-1.0', version: '>= 1.24.0')
@@ -117,6 +117,26 @@ if libunwind_dep.found()
)
endif
+# Handy 1.0 is still rather new
+libhandy_vapi = ''
+if not libhandy.found()
+ libhandy_project = subproject(
+ 'libhandy',
+ default_options: [
+ 'examples=false',
+ 'package_subdir=geary',
+ 'tests=false',
+ ]
+ )
+ libhandy = declare_dependency(
+ dependencies: [
+ libhandy_project.get_variable('libhandy_dep'),
+ libhandy_project.get_variable('libhandy_vapi')
+ ]
+ )
+ libhandy_vapi = meson.build_root() / 'subprojects' / 'libhandy' / 'src'
+endif
+
# Optional dependencies
appstream_util = find_program('appstream-util', required: false)
desktop_file_validate = find_program('desktop-file-validate', required: false)
diff --git a/org.gnome.Geary.json b/org.gnome.Geary.json
index f429bcac..99e41612 100644
--- a/org.gnome.Geary.json
+++ b/org.gnome.Geary.json
@@ -203,13 +203,15 @@
"name": "libhandy",
"buildsystem": "meson",
"config-opts": [
- "-Dglade_catalog=disabled"
+ "-Dglade_catalog=disabled",
+ "-Dexamples=false",
+ "-Dtests=false"
],
"sources": [
{
"type": "git",
- "url": "https://source.puri.sm/Librem5/libhandy.git",
- "branch": "v0.0.13"
+ "url": "https://gitlab.gnome.org/GNOME/libhandy.git",
+ "branch": "master"
}
]
},
diff --git a/org.gnome.Geary.yaml b/org.gnome.Geary.yaml
index 92fabdd8..0dd89a18 100644
--- a/org.gnome.Geary.yaml
+++ b/org.gnome.Geary.yaml
@@ -204,10 +204,12 @@ modules:
buildsystem: meson
config-opts:
- "-Dglade_catalog=disabled"
+ - "-Dexamples=false"
+ - "-Dtests=false"
sources:
- type: git
- url: https://source.puri.sm/Librem5/libhandy.git
- branch: v0.0.13
+ url: https://gitlab.gnome.org/GNOME/libhandy.git
+ branch: master
# Geary dependency
- name: libpeas
diff --git a/src/client/application/application-client.vala b/src/client/application/application-client.vala
index ff7b15b5..43002728 100644
--- a/src/client/application/application-client.vala
+++ b/src/client/application/application-client.vala
@@ -390,6 +390,7 @@ public class Application.Client : Gtk.Application {
// Calls Gtk.init(), amongst other things
base.startup();
+ Hdy.init();
this.engine = new Geary.Engine(get_resource_directory());
this.config = new Configuration(SCHEMA_ID);
@@ -967,7 +968,7 @@ public class Application.Client : Gtk.Application {
this,
new Geary.ProblemReport(err)
);
- dialog.run();
+ dialog.show();
}
if (mutex_token != Geary.Nonblocking.Mutex.INVALID_TOKEN) {
diff --git a/src/client/components/components-preferences-window.vala b/src/client/components/components-preferences-window.vala
index 65edae64..b1bdfd7b 100644
--- a/src/client/components/components-preferences-window.vala
+++ b/src/client/components/components-preferences-window.vala
@@ -35,7 +35,7 @@ public class Components.PreferencesWindow : Hdy.PreferencesWindow {
this.title = plugin.get_name();
this.subtitle = plugin.get_description();
this.activatable_widget = this.sw;
- this.add_action(this.sw);
+ this.add(this.sw);
plugins.plugin_activated.connect((info) => {
if (this.plugin == info) {
@@ -106,7 +106,7 @@ public class Components.PreferencesWindow : Hdy.PreferencesWindow {
Application.PluginManager plugins) {
Object(
application: parent.application,
- default_width: 450,
+ default_width: 540,
transient_for: parent
);
this.plugins = plugins;
@@ -124,7 +124,7 @@ public class Components.PreferencesWindow : Hdy.PreferencesWindow {
autoselect_row.title = _("_Automatically select next message");
autoselect_row.use_underline = true;
autoselect_row.activatable_widget = autoselect;
- autoselect_row.add_action(autoselect);
+ autoselect_row.add(autoselect);
var display_preview = new Gtk.Switch();
display_preview.valign = CENTER;
@@ -134,7 +134,7 @@ public class Components.PreferencesWindow : Hdy.PreferencesWindow {
display_preview_row.title = _("_Display conversation preview");
display_preview_row.use_underline = true;
display_preview_row.activatable_widget = display_preview;
- display_preview_row.add_action(display_preview);
+ display_preview_row.add(display_preview);
var three_pane_view = new Gtk.Switch();
three_pane_view.valign = CENTER;
@@ -144,7 +144,7 @@ public class Components.PreferencesWindow : Hdy.PreferencesWindow {
three_pane_view_row.title = _("Use _three pane view");
three_pane_view_row.use_underline = true;
three_pane_view_row.activatable_widget = three_pane_view;
- three_pane_view_row.add_action(three_pane_view);
+ three_pane_view_row.add(three_pane_view);
var single_key_shortucts = new Gtk.Switch();
single_key_shortucts.valign = CENTER;
@@ -157,7 +157,7 @@ public class Components.PreferencesWindow : Hdy.PreferencesWindow {
);
single_key_shortucts_row.use_underline = true;
single_key_shortucts_row.activatable_widget = single_key_shortucts;
- single_key_shortucts_row.add_action(single_key_shortucts);
+ single_key_shortucts_row.add(single_key_shortucts);
var startup_notifications = new Gtk.Switch();
startup_notifications.valign = CENTER;
@@ -171,7 +171,7 @@ public class Components.PreferencesWindow : Hdy.PreferencesWindow {
"Geary will keep running after all windows are closed"
);
startup_notifications_row.activatable_widget = startup_notifications;
- startup_notifications_row.add_action(startup_notifications);
+ startup_notifications_row.add(startup_notifications);
var group = new Hdy.PreferencesGroup();
/// Translators: Preferences group title
@@ -188,8 +188,6 @@ public class Components.PreferencesWindow : Hdy.PreferencesWindow {
/// Translators: Preferences page title
page.title = _("Preferences");
page.icon_name = "preferences-other-symbolic";
- page.propagate_natural_height = true;
- page.propagate_natural_width = true;
page.add(group);
page.show_all();
@@ -251,7 +249,6 @@ public class Components.PreferencesWindow : Hdy.PreferencesWindow {
/// Translators: Preferences page title
page.title = _("Plugins");
page.icon_name = "application-x-addon-symbolic";
- page.propagate_natural_width = true;
page.add(group);
page.show_all();
diff --git a/src/client/components/components-problem-report-info-bar.vala b/src/client/components/components-problem-report-info-bar.vala
index 63a6dfa1..d2042f8c 100644
--- a/src/client/components/components-problem-report-info-bar.vala
+++ b/src/client/components/components-problem-report-info-bar.vala
@@ -113,8 +113,7 @@ public class Components.ProblemReportInfoBar : InfoBar {
main.application,
this.report
);
- dialog.run();
- dialog.destroy();
+ dialog.show();
}
}
diff --git a/src/client/components/components-search-bar.vala b/src/client/components/components-search-bar.vala
index 3988a2aa..c5f1076a 100644
--- a/src/client/components/components-search-bar.vala
+++ b/src/client/components/components-search-bar.vala
@@ -39,8 +39,8 @@ public class SearchBar : Hdy.SearchBar {
this.entry.placeholder_text = DEFAULT_SEARCH_TEXT;
this.entry.has_focus = true;
- var column = new Hdy.Column();
- column.maximum_width = 450;
+ var column = new Hdy.Clamp();
+ column.maximum_size = 450;
column.add(this.entry);
connect_entry(this.entry);
diff --git a/src/client/components/main-toolbar.vala b/src/client/components/main-toolbar.vala
index 2a160f8b..31f87df6 100644
--- a/src/client/components/main-toolbar.vala
+++ b/src/client/components/main-toolbar.vala
@@ -95,13 +95,13 @@ public class MainToolbar : Gtk.Box {
public void set_conversation_header(Gtk.HeaderBar header) {
conversation_header.hide();
- this.header_group.add_header_bar(header);
+ this.header_group.add_gtk_header_bar(header);
pack_start(header, true, true);
}
public void remove_conversation_header(Gtk.HeaderBar header) {
remove(header);
- this.header_group.remove_header_bar(header);
+ this.header_group.remove_gtk_header_bar(header);
conversation_header.show();
}
diff --git a/src/client/dialogs/dialogs-problem-details-dialog.vala b/src/client/dialogs/dialogs-problem-details-dialog.vala
index 2dcfcb0c..43f5d311 100644
--- a/src/client/dialogs/dialogs-problem-details-dialog.vala
+++ b/src/client/dialogs/dialogs-problem-details-dialog.vala
@@ -9,7 +9,7 @@
* Displays technical details when a problem has been reported.
*/
[GtkTemplate (ui = "/org/gnome/Geary/problem-details-dialog.ui")]
-public class Dialogs.ProblemDetailsDialog : Hdy.Dialog {
+public class Dialogs.ProblemDetailsDialog : Gtk.Dialog {
private const string ACTION_CLOSE = "problem-details-close";
@@ -58,7 +58,6 @@ public class Dialogs.ProblemDetailsDialog : Hdy.Dialog {
transient_for: parent,
use_header_bar: 1
);
- set_default_size(600, 400);
Geary.AccountProblemReport? account_report =
report as Geary.AccountProblemReport;
diff --git a/src/meson.build b/src/meson.build
index f5cbbc4c..de17d396 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -26,6 +26,11 @@ geary_vala_args = [
'--enable-checking',
]
+# Remove once libhandy 1.0 has been packaged and is widely available
+if libhandy.version().version_compare('<1.0')
+ geary_vala_args += [ '--disable-since-check' ]
+endif
+
# Symbols for valac's preprocessor must be defined as compiler args,
# not in the code or in config.h
if reference_tracking
@@ -44,7 +49,6 @@ geary_c_args = [
'-DGCK_API_SUBJECT_TO_CHANGE',
'-DGCR_API_SUBJECT_TO_CHANGE',
'-DGOA_API_IS_SUBJECT_TO_CHANGE',
- '-DHANDY_USE_UNSTABLE_API',
]
subdir('sqlite3-unicodesn')
@@ -133,14 +137,33 @@ valadoc_dependencies = [
]
# Hopefully Meson will get baked-in valadoc support, so we don't have
-# to do this any more. https://github.com/mesonbuild/meson/issues/894
+# to resort to these kinds of hacks any more. See
+# https://github.com/mesonbuild/meson/issues/894
+
valadoc_dep_args = []
foreach dep : valadoc_dependencies
valadoc_dep_args += '--pkg'
- valadoc_dep_args += dep.name()
+ if dep != libhandy
+ valadoc_dep_args += dep.name()
+ else
+ valadoc_dep_args += 'libhandy-1'
+ endif
endforeach
valadoc_dep_args += [ '--pkg', 'posix' ]
+valadoc_vapi_dirs = [
+ vapi_dir,
+ meson.current_build_dir()
+]
+if libhandy_vapi != ''
+ valadoc_vapi_dirs += libhandy_vapi
+endif
+
+valadoc_vapidir_args = []
+foreach dir : valadoc_vapi_dirs
+ valadoc_vapidir_args += '--vapidir=@0@'.format(dir)
+endforeach
+
if enable_valadoc
docs = custom_target('valadoc',
build_by_default: true,
@@ -155,10 +178,8 @@ if enable_valadoc
'--package-version=@0@'.format(meson.project_version()),
'-b', meson.current_source_dir(),
'-o', '@OUTPUT@',
- '--vapidir=@0@'.format('/usr/share/vala-0.48'),
- '--vapidir=@0@'.format(vapi_dir),
- '--vapidir=@0@'.format(meson.current_build_dir()),
- '@INPUT@',
- ] + valadoc_dep_args
+ ] + valadoc_dep_args + valadoc_vapidir_args + [
+ '@INPUT@'
+ ]
)
endif
diff --git a/subprojects/libhandy b/subprojects/libhandy
new file mode 160000
index 00000000..d22356ef
--- /dev/null
+++ b/subprojects/libhandy
@@ -0,0 +1 @@
+Subproject commit d22356ef5f0cc6c6080896ae5611677d59849f51
diff --git a/ui/components-inspector-error-view.ui b/ui/components-inspector-error-view.ui
index 13340235..78df053e 100644
--- a/ui/components-inspector-error-view.ui
+++ b/ui/components-inspector-error-view.ui
@@ -7,15 +7,13 @@
True
False
-