Skip to content

Commit ff45cd1

Browse files
authored
linux: don't use GNOME's custom title bar
1 parent a156253 commit ff45cd1

File tree

1 file changed

+2
-27
lines changed

1 file changed

+2
-27
lines changed

scripts/app_config/templates/linux/my_application.cc

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -20,32 +20,7 @@ static void my_application_activate(GApplication* application) {
2020
GtkWindow* window =
2121
GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application)));
2222

23-
// Use a header bar when running in GNOME as this is the common style used
24-
// by applications and is the setup most users will be using (e.g. Ubuntu
25-
// desktop).
26-
// If running on X and not using GNOME then just use a traditional title bar
27-
// in case the window manager does more exotic layout, e.g. tiling.
28-
// If running on Wayland assume the header bar will work (may need changing
29-
// if future cases occur).
30-
gboolean use_header_bar = TRUE;
31-
#ifdef GDK_WINDOWING_X11
32-
GdkScreen* screen = gtk_window_get_screen(window);
33-
if (GDK_IS_X11_SCREEN(screen)) {
34-
const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen);
35-
if (g_strcmp0(wm_name, "GNOME Shell") != 0) {
36-
use_header_bar = FALSE;
37-
}
38-
}
39-
#endif
40-
if (use_header_bar) {
41-
GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
42-
gtk_widget_show(GTK_WIDGET(header_bar));
43-
gtk_header_bar_set_title(header_bar, "PlaceHolderName");
44-
gtk_header_bar_set_show_close_button(header_bar, TRUE);
45-
gtk_window_set_titlebar(window, GTK_WIDGET(header_bar));
46-
} else {
47-
gtk_window_set_title(window, "PlaceHolderName");
48-
}
23+
gtk_window_set_title(window, "Stack Wallet");
4924

5025
gtk_window_set_default_size(window, 1220, 500);
5126
gtk_widget_show(GTK_WIDGET(window));
@@ -98,7 +73,7 @@ static void my_application_init(MyApplication* self) {}
9873

9974
MyApplication* my_application_new() {
10075
return MY_APPLICATION(g_object_new(my_application_get_type(),
101-
"application-id", APPLICATION_ID,
76+
"stack_wallet", APPLICATION_ID,
10277
"flags", G_APPLICATION_NON_UNIQUE,
10378
nullptr));
10479
}

0 commit comments

Comments
 (0)