Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
27d1e589
Unverified
Commit
27d1e589
authored
May 07, 2021
by
stuartmorgan
Committed by
GitHub
May 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor cleanup to Linux application template format (#81561)
parent
ce75ea53
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
my_application.cc.tmpl
...ter_tools/templates/app/linux.tmpl/my_application.cc.tmpl
+9
-10
No files found.
packages/flutter_tools/templates/app/linux.tmpl/my_application.cc.tmpl
View file @
27d1e589
...
...
@@ -29,22 +29,21 @@ static void my_application_activate(GApplication* application) {
// if future cases occur).
gboolean use_header_bar = TRUE;
#ifdef GDK_WINDOWING_X11
GdkScreen
*
screen = gtk_window_get_screen(window);
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;
}
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());
GtkHeaderBar
*
header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
gtk_widget_show(GTK_WIDGET(header_bar));
gtk_header_bar_set_title(header_bar, "{{projectName}}");
gtk_header_bar_set_show_close_button(header_bar, TRUE);
gtk_window_set_titlebar(window, GTK_WIDGET(header_bar));
}
else {
} else {
gtk_window_set_title(window, "{{projectName}}");
}
...
...
@@ -64,7 +63,7 @@ static void my_application_activate(GApplication* application) {
}
// Implements GApplication::local_command_line.
static gboolean my_application_local_command_line(GApplication* application, gchar
***arguments, int *
exit_status) {
static gboolean my_application_local_command_line(GApplication* application, gchar
*** arguments, int*
exit_status) {
MyApplication* self = MY_APPLICATION(application);
// Strip out the first argument as it is the binary name.
self->dart_entrypoint_arguments = g_strdupv(*arguments + 1);
...
...
@@ -83,7 +82,7 @@ static gboolean my_application_local_command_line(GApplication* application, gch
}
// Implements GObject::dispose.
static void my_application_dispose(GObject
*
object) {
static void my_application_dispose(GObject
*
object) {
MyApplication* self = MY_APPLICATION(object);
g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev);
G_OBJECT_CLASS(my_application_parent_class)->dispose(object);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment