Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gtk4 port #877

Draft
wants to merge 77 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 75 commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
9108512
Update dependencies
leolost2605 Apr 12, 2023
d156a9b
Merge branch 'master' into gtk4-port
leolost2605 Apr 13, 2023
6c3e396
FolderList: Start work on SourceList replacement
leolost2605 Apr 13, 2023
cc8f55b
Merge branch 'master' into gtk4-port
leolost2605 Apr 14, 2023
93225d8
Working FolderList protoype
leolost2605 Apr 14, 2023
45996e8
Session: Replace E.CredentialsPrompter
leolost2605 Apr 15, 2023
83d5aa8
Merge branch 'master' into gtk4-port
leolost2605 Apr 15, 2023
53fda74
Composer: Update style classes
leolost2605 Apr 15, 2023
d56b165
Composer: Update to gtk4
leolost2605 Apr 15, 2023
537ad42
MessageList: Update to gtk4
leolost2605 Apr 15, 2023
feb7099
MessageListItem: Update for gtk4
leolost2605 Apr 15, 2023
9613ef5
AttachmentButton: Update for gtk4
leolost2605 Apr 15, 2023
c1af7e4
ConversationList: Prep for gtk4
leolost2605 Apr 16, 2023
3a6c7bb
ConversationListStore: Update for gtk4
leolost2605 Apr 16, 2023
cfcdea4
ConversationListItem: Update for gtk4
leolost2605 Apr 16, 2023
2ed1416
Derive directly from Gtk.Grid
leolost2605 Apr 16, 2023
7bc70f0
Derive from separate Gtk.Box
leolost2605 Apr 16, 2023
60120c3
Add gesture click
leolost2605 Apr 16, 2023
e5a348a
Protoype ListView rewrite
leolost2605 Apr 16, 2023
9740934
ConversationList: Remove unused method, reenable deleted filter
leolost2605 Apr 16, 2023
f08879c
ConversationList: Fix seg fault + reenable trash
leolost2605 Apr 16, 2023
6a173fd
MessageList: use get_action, use window controls
leolost2605 Apr 16, 2023
3d2cefe
AttachmentButton: refine
leolost2605 Apr 16, 2023
557405b
MessageList: Cleanup + update mark menu
leolost2605 Apr 16, 2023
8e4366b
ConversationListItem: Remove unsused variable
leolost2605 Apr 16, 2023
796d63a
ConversationList: Cleanup
leolost2605 Apr 16, 2023
949fd31
WelcomeView: Update for gtk4
leolost2605 Apr 16, 2023
fceb060
Application: Update for gtk4
leolost2605 Apr 17, 2023
6cf81bb
Update style classes
leolost2605 Apr 17, 2023
20cd037
Merge branch 'master' into gtk4-port
leolost2605 Apr 17, 2023
9299a25
FolderList: Styling updates, window controls
leolost2605 Apr 17, 2023
c7933fc
Update attachment handling
leolost2605 Apr 17, 2023
0c284ee
ConversationList: Remove unused variable
leolost2605 Apr 17, 2023
e30d28c
ConversationList: Cleanup
leolost2605 Apr 17, 2023
8fdda0f
ConversationList: Reenable archiving
leolost2605 Apr 17, 2023
b83530f
ConversationList: Formatting
leolost2605 Apr 17, 2023
64a0dde
Reenable insert link dialog
leolost2605 Apr 17, 2023
dc6c328
MessageList: Cleanup
leolost2605 Apr 17, 2023
4522f5c
Composer: Fix seg fault
leolost2605 Apr 17, 2023
c21086d
Composer: Update attachment handling and reenable file chooser
leolost2605 Apr 17, 2023
33e4644
AttachmentButton: Reenable filechooser
leolost2605 Apr 17, 2023
99ce7fb
MessageListItem: Update infobar
leolost2605 Apr 17, 2023
cac0cbf
FolderList: Remember expanded folders
leolost2605 Apr 18, 2023
45a531f
FolderList: Remember selected folder
leolost2605 Apr 18, 2023
1ea8253
FolderList: Cleanup
leolost2605 Apr 18, 2023
6614123
FolderList: Reimplement refresh context menu
leolost2605 Apr 18, 2023
4d8c8fb
FolderList: Reimplement grouped folders
leolost2605 Apr 18, 2023
7182e9c
FolderList: More reimplement grouped folders
leolost2605 Apr 18, 2023
191915b
Application: Cleanup
leolost2605 Apr 18, 2023
8ebeab1
meson: Temporarily add has soup 3 argument
leolost2605 Apr 18, 2023
f9ead60
MessageList: make windowcontrols public for fullscreen
leolost2605 Apr 18, 2023
de51b4a
FolderItemModel: Make the expander icon hidden when no children
leolost2605 Apr 18, 2023
8dc1050
MainWindow: Update for gtk4
leolost2605 Apr 18, 2023
a732c30
Reenable trash toast
leolost2605 Apr 18, 2023
3fe6f21
Data: Update keys in gschema for new state saving
leolost2605 Apr 18, 2023
3c1c677
MessageListItem: Reimplement gravatar (?)
leolost2605 Apr 18, 2023
8c932a6
MessageListItem: Update comment
leolost2605 Apr 19, 2023
342adb1
Composer: Updates
leolost2605 Apr 19, 2023
8f3d710
FolderList: Some cleanup + remember recent grouped folder
leolost2605 Apr 19, 2023
5967dd3
FolderList: Some cleanup
leolost2605 Apr 19, 2023
15c9ade
FolderList: Cleanup + add unread badge
leolost2605 Apr 19, 2023
543cda3
FolderList: Cleanup + handle folder signals
leolost2605 Apr 19, 2023
e940a4f
Remove unused stuff and update meson
leolost2605 Apr 19, 2023
7994110
Update meson + mail page
leolost2605 Apr 19, 2023
4b081d4
Update meson
leolost2605 Apr 19, 2023
9bf3b5c
Remove more unused stuff
leolost2605 Apr 19, 2023
d5c2e18
FolderList: Cleanup
leolost2605 Apr 19, 2023
1299dbd
Fix lint
leolost2605 Apr 19, 2023
1656fad
ConversationList: Cleanup
leolost2605 Apr 20, 2023
18dc9d1
ConversationListStore: Formatting
leolost2605 Apr 20, 2023
cc43517
FolderList: Cleanup
leolost2605 Apr 20, 2023
c3ac9f2
Some cleanup, make some dialogs transient
leolost2605 Apr 20, 2023
917e379
Remove SOUP 2 stuff
leolost2605 Apr 20, 2023
6df8991
Update to webkigtk 6, revert Session authenticate stuff (#879)
leolost2605 Apr 24, 2023
f48a1ad
ConversationListStore: Fixes
leolost2605 Apr 24, 2023
e08641f
MessageList: Update context_menu and scroll to focus, fix crash
leolost2605 Apr 24, 2023
c81fc85
Merge branch 'master' into gtk4-port
leolost2605 Apr 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions data/io.elementary.mail.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
<summary>Whether the window was maximized on last run</summary>
<description>Whether the window was maximized on last run</description>
</key>
<key name="window-position" type="(ii)">
<default>(-1, -1)</default>
<summary>Window position</summary>
<description>Most recent window position (x, y)</description>
</key>
<key name="window-size" type="(ii)">
<default>(1024, 750)</default>
<summary>Most recent window size</summary>
<description>Most recent window size (width, height)</description>
<key name="window-width" type="i">
<default>1024</default>
<summary>Most recent window width</summary>
<description>Most recent window width</description>
</key>
<key name="window-height" type="i">
<default>750</default>
<summary>Most recent window height</summary>
<description>Most recent window height</description>
</key>
<key name="paned-start-position" type="i">
<default>190</default>
Expand Down
29 changes: 12 additions & 17 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,31 @@ add_project_arguments(['--vapidir', join_paths(meson.current_source_dir(), 'vapi

glib_dep = dependency('glib-2.0')
gobject_dep = dependency('gobject-2.0')
granite_dep = dependency('granite', version: '>= 6.0.0')
granite_dep = dependency('granite-7', version: '>=7.1')
gee_dep = dependency('gee-0.8')
handy_dep = dependency('libhandy-1', version: '>=1.1.90')
adw_dep = dependency('libadwaita-1')
gtk_dep = dependency('gtk4')
camel_dep = dependency('camel-1.2', version: '>= 3.28')
libedataserver_dep = dependency('libedataserver-1.2', version: '>= 3.28')
libedataserverui_dep = dependency('libedataserverui-1.2', version: '>= 3.28')
if libedataserverui_dep.version().version_compare('>=3.45.1')
add_project_arguments('--define=HAS_SOUP_3', language: 'vala')
webkit2_dep = dependency('webkit2gtk-4.1')
webkit2_web_extension_dep = dependency('webkit2gtk-web-extension-4.1')
else
webkit2_dep = dependency('webkit2gtk-4.0', version: '>=2.28')
webkit2_web_extension_dep = dependency('webkit2gtk-web-extension-4.0', version: '>=2.28')
endif
libedataserver_dep = dependency('libedataserver-1.2', version: '>=3.45.1')
libedataserverui_dep = dependency('libedataserverui4-1.0', version: '>= 3.46.4')
webkit_dep = dependency('webkitgtk-6.0')
webkit_web_extension_dep = dependency('webkitgtk-web-process-extension-6.0')
folks_dep = dependency('folks')
m_dep = meson.get_compiler('c').find_library('m')

webkit2_extension_path = join_paths(get_option('prefix'), get_option('libdir'), meson.project_name(), 'webkit2')
webkit_extension_path = join_paths(get_option('prefix'), get_option('libdir'), meson.project_name(), 'webkit2')

dependencies = [
glib_dep,
gobject_dep,
granite_dep,
gee_dep,
handy_dep,
adw_dep,
gtk_dep,
camel_dep,
libedataserver_dep,
libedataserverui_dep,
webkit2_dep,
webkit_dep,
folks_dep,
m_dep
]
Expand All @@ -54,12 +50,11 @@ extension_dependencies = [
glib_dep,
gobject_dep,
gee_dep,
webkit2_web_extension_dep
webkit_web_extension_dep
]

add_global_arguments([
'-DGETTEXT_PACKAGE="@0@"'.format(meson.project_name()),
'-DHANDY_USE_UNSTABLE_API'
],
language:'c'
)
Expand Down
43 changes: 1 addition & 42 deletions src/Application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ public class Mail.Application : Gtk.Application {
string to = null;

try {
#if HAS_SOUP_3
GLib.Uri? mailto= null;
try {
mailto = GLib.Uri.parse (mailto_uri, GLib.UriFlags.NONE);
Expand All @@ -76,26 +75,6 @@ public class Mail.Application : Gtk.Application {
new Composer (to, mailto.get_query ()).present ();
});
}
#else
Soup.URI mailto = new Soup.URI (mailto_uri);
if (mailto == null) {
throw new OptionError.BAD_VALUE ("Argument is not a URL.");
}

if (mailto.scheme != "mailto") {
throw new OptionError.BAD_VALUE ("Cannot open non-mailto: URL");
}

to = Soup.URI.decode (mailto.path);

if (main_window.is_session_started) {
new Composer (to, mailto.query).present ();
} else {
main_window.session_started.connect (() => {
new Composer (to, mailto.query).present ();
});
}
#endif
} catch (OptionError e) {
warning ("Argument parsing error. %s", e.message);
}
Expand All @@ -107,8 +86,6 @@ public class Mail.Application : Gtk.Application {
protected override void startup () {
base.startup ();

Hdy.init ();

var granite_settings = Granite.Settings.get_default ();
var gtk_settings = Gtk.Settings.get_default ();

Expand All @@ -120,7 +97,7 @@ public class Mail.Application : Gtk.Application {

var css_provider = new Gtk.CssProvider ();
css_provider.load_from_resource ("io/elementary/mail/application.css");
Gtk.StyleContext.add_provider_for_screen (Gdk.Screen.get_default (), css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
Gtk.StyleContext.add_provider_for_display (Gdk.Display.get_default (), css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);

var quit_action = new SimpleAction ("quit", null);
quit_action.activate.connect (() => {
Expand Down Expand Up @@ -155,24 +132,6 @@ public class Mail.Application : Gtk.Application {
if (main_window == null) {
main_window = new MainWindow (this);
add_window (main_window);

int window_x, window_y;
var rect = Gtk.Allocation ();

settings.get ("window-position", "(ii)", out window_x, out window_y);
settings.get ("window-size", "(ii)", out rect.width, out rect.height);

if (window_x != -1 || window_y != -1) {
main_window.move (window_x, window_y);
}

main_window.set_allocation (rect);

if (settings.get_boolean ("window-maximized")) {
main_window.maximize ();
}

main_window.show_all ();
}

main_window.present ();
Expand Down
Loading