fix: removed Wayland Header (#5991)

* fix: sync AppImage recipe linux version with release

* fix: don't draw custom header on Wayland sessions

* chore(AppImage): reset `app_info.version`
This commit is contained in:
Francisco Di Marzo Borghi 2024-08-21 22:36:26 -03:00 committed by GitHub
parent b2b72d2130
commit a78752d427
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 43 deletions

View File

@ -28,38 +28,7 @@ static void my_application_activate(GApplication *application)
GtkWindow *window =
GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application)));
// Use a header bar when running in GNOME as this is the common style used
// by applications and is the setup most users will be using (e.g. Ubuntu
// desktop).
// If running on X and not using GNOME then just use a traditional title bar
// in case the window manager does more exotic layout, e.g. tiling.
// If running on Wayland assume the header bar will work (may need changing
// if future cases occur).
gboolean use_header_bar = TRUE;
#ifdef GDK_WINDOWING_X11
GdkScreen *screen = gtk_window_get_screen(window);
if (GDK_IS_X11_SCREEN(screen))
{
const gchar *wm_name = gdk_x11_screen_get_window_manager_name(screen);
if (g_strcmp0(wm_name, "GNOME Shell") != 0)
{
use_header_bar = FALSE;
}
}
#endif
if (use_header_bar)
{
GtkHeaderBar *header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
gtk_widget_show(GTK_WIDGET(header_bar));
gtk_header_bar_set_title(header_bar, "AppFlowy");
gtk_header_bar_set_show_close_button(header_bar, TRUE);
gtk_window_set_titlebar(window, GTK_WIDGET(header_bar));
}
else
{
gtk_window_set_title(window, "AppFlowy");
}
gtk_window_set_title(window, "AppFlowy");
gtk_window_set_default_size(window, 1280, 720);
gtk_widget_show(GTK_WIDGET(window));

View File

@ -22,20 +22,20 @@ AppDir:
- amd64
allow_unauthenticated: true
sources:
- sourceline: deb http://id.archive.ubuntu.com/ubuntu/ jammy main restricted
- sourceline: deb http://id.archive.ubuntu.com/ubuntu/ jammy-updates main restricted
- sourceline: deb http://id.archive.ubuntu.com/ubuntu/ jammy universe
- sourceline: deb http://id.archive.ubuntu.com/ubuntu/ jammy-updates universe
- sourceline: deb http://id.archive.ubuntu.com/ubuntu/ jammy multiverse
- sourceline: deb http://id.archive.ubuntu.com/ubuntu/ jammy-updates multiverse
- sourceline: deb http://id.archive.ubuntu.com/ubuntu/ noble main restricted
- sourceline: deb http://id.archive.ubuntu.com/ubuntu/ noble-updates main restricted
- sourceline: deb http://id.archive.ubuntu.com/ubuntu/ noble universe
- sourceline: deb http://id.archive.ubuntu.com/ubuntu/ noble-updates universe
- sourceline: deb http://id.archive.ubuntu.com/ubuntu/ noble multiverse
- sourceline: deb http://id.archive.ubuntu.com/ubuntu/ noble-updates multiverse
- sourceline:
deb http://id.archive.ubuntu.com/ubuntu/ jammy-backports main restricted
deb http://id.archive.ubuntu.com/ubuntu/ noble-backports main restricted
universe multiverse
- sourceline: deb http://security.ubuntu.com/ubuntu jammy-security main restricted
- sourceline: deb http://security.ubuntu.com/ubuntu jammy-security universe
- sourceline: deb http://security.ubuntu.com/ubuntu jammy-security multiverse
- sourceline: deb http://security.ubuntu.com/ubuntu noble-security main restricted
- sourceline: deb http://security.ubuntu.com/ubuntu noble-security universe
- sourceline: deb http://security.ubuntu.com/ubuntu noble-security multiverse
- sourceline:
deb https://ppa.launchpadcontent.net/touchegg/stable/ubuntu/ jammy
deb https://ppa.launchpadcontent.net/touchegg/stable/ubuntu/ noble
main
- sourceline:
deb https://packagecloud.io/slacktechnologies/slack/debian/ jessie