Merge branch 'mjog/port-to-libhandy-1' into 'mainline'
Port to libhandy-1 Closes #924 See merge request GNOME/geary!544
This commit is contained in:
commit
f84dd80d70
18 changed files with 92 additions and 45 deletions
|
|
@ -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
|
||||
|
|
|
|||
4
.gitmodules
vendored
4
.gitmodules
vendored
|
|
@ -0,0 +1,4 @@
|
|||
[submodule "subprojects/libhandy"]
|
||||
path = subprojects/libhandy
|
||||
url = https://gitlab.gnome.org/GNOME/libhandy.git
|
||||
branch = master
|
||||
4
INSTALL
4
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
|
||||
|
||||
|
|
|
|||
22
meson.build
22
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)
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -113,8 +113,7 @@ public class Components.ProblemReportInfoBar : InfoBar {
|
|||
main.application,
|
||||
this.report
|
||||
);
|
||||
dialog.run();
|
||||
dialog.destroy();
|
||||
dialog.show();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
1
subprojects/libhandy
Submodule
1
subprojects/libhandy
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit d22356ef5f0cc6c6080896ae5611677d59849f51
|
||||
|
|
@ -7,15 +7,13 @@
|
|||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="HdyColumn">
|
||||
<object class="HdyClamp">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">16</property>
|
||||
<property name="margin_right">16</property>
|
||||
<property name="margin_top">32</property>
|
||||
<property name="margin_bottom">32</property>
|
||||
<property name="maximum_width">500</property>
|
||||
<property name="linear_growth_width">1</property>
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
|
|
|
|||
|
|
@ -19,15 +19,13 @@
|
|||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="HdyColumn">
|
||||
<object class="HdyClamp">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">16</property>
|
||||
<property name="margin_right">16</property>
|
||||
<property name="margin_top">32</property>
|
||||
<property name="margin_bottom">32</property>
|
||||
<property name="maximum_width">500</property>
|
||||
<property name="linear_growth_width">1</property>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<property name="visible">True</property>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<requires lib="gtk+" version="3.20"/>
|
||||
<template class="ComponentsInspector" parent="GtkApplicationWindow">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="default_width">750</property>
|
||||
<property name="default_width">800</property>
|
||||
<property name="default_height">500</property>
|
||||
<child type="titlebar">
|
||||
<object class="GtkHeaderBar" id="header_bar">
|
||||
|
|
|
|||
|
|
@ -3,8 +3,13 @@
|
|||
<interface>
|
||||
<requires lib="gtk+" version="3.20"/>
|
||||
<requires lib="libhandy" version="0.0"/>
|
||||
<template class="DialogsProblemDetailsDialog" parent="HdyDialog">
|
||||
<template class="DialogsProblemDetailsDialog" parent="GtkDialog">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="default_width">800</property>
|
||||
<property name="default_height">500</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<property name="window_position">center</property>
|
||||
<child type="titlebar">
|
||||
<object class="GtkHeaderBar">
|
||||
<property name="visible">True</property>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue