mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-12 23:45:18 +00:00
fix(linux): application window not visible after launch
This commit is contained in:
parent
2b5fd35529
commit
8fc44ed655
@ -23,7 +23,7 @@ static void my_application_activate(GApplication* application) {
|
||||
gtk_window_present(GTK_WINDOW(windows->data));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
GtkWindow* window =
|
||||
GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application)));
|
||||
|
||||
@ -55,10 +55,11 @@ static void my_application_activate(GApplication* application) {
|
||||
}
|
||||
|
||||
gtk_window_set_default_size(window, 1280, 720);
|
||||
gtk_widget_realize(GTK_WIDGET(window));
|
||||
gtk_widget_show(GTK_WIDGET(window));
|
||||
|
||||
g_autoptr(FlDartProject) project = fl_dart_project_new();
|
||||
fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments);
|
||||
fl_dart_project_set_dart_entrypoint_arguments(
|
||||
project, self->dart_entrypoint_arguments);
|
||||
|
||||
FlView* view = fl_view_new(project);
|
||||
gtk_widget_show(GTK_WIDGET(view));
|
||||
@ -70,16 +71,18 @@ 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);
|
||||
|
||||
g_autoptr(GError) error = nullptr;
|
||||
if (!g_application_register(application, nullptr, &error)) {
|
||||
g_warning("Failed to register: %s", error->message);
|
||||
*exit_status = 1;
|
||||
return TRUE;
|
||||
g_warning("Failed to register: %s", error->message);
|
||||
*exit_status = 1;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
g_application_activate(application);
|
||||
@ -97,15 +100,16 @@ static void my_application_dispose(GObject* object) {
|
||||
|
||||
static void my_application_class_init(MyApplicationClass* klass) {
|
||||
G_APPLICATION_CLASS(klass)->activate = my_application_activate;
|
||||
G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line;
|
||||
G_APPLICATION_CLASS(klass)->local_command_line =
|
||||
my_application_local_command_line;
|
||||
G_OBJECT_CLASS(klass)->dispose = my_application_dispose;
|
||||
}
|
||||
|
||||
static void my_application_init(MyApplication* self) {}
|
||||
|
||||
MyApplication* my_application_new() {
|
||||
return MY_APPLICATION(g_object_new(my_application_get_type(),
|
||||
"com.github.KRTirtho.Spotube", APPLICATION_ID,
|
||||
"flags", G_APPLICATION_HANDLES_COMMAND_LINE | G_APPLICATION_HANDLES_OPEN,
|
||||
nullptr));
|
||||
}
|
||||
return MY_APPLICATION(g_object_new(
|
||||
my_application_get_type(), "application-id", APPLICATION_ID, "flags",
|
||||
G_APPLICATION_HANDLES_COMMAND_LINE | G_APPLICATION_HANDLES_OPEN,
|
||||
nullptr));
|
||||
}
|
@ -1,209 +1 @@
|
||||
{
|
||||
"ar": [
|
||||
"local_library",
|
||||
"add_library_location",
|
||||
"remove_library_location",
|
||||
"local_tab",
|
||||
"stats"
|
||||
],
|
||||
|
||||
"bn": [
|
||||
"local_library",
|
||||
"add_library_location",
|
||||
"remove_library_location",
|
||||
"local_tab",
|
||||
"stats"
|
||||
],
|
||||
|
||||
"ca": [
|
||||
"local_library",
|
||||
"add_library_location",
|
||||
"remove_library_location",
|
||||
"local_tab",
|
||||
"stats"
|
||||
],
|
||||
|
||||
"cs": [
|
||||
"local_library",
|
||||
"add_library_location",
|
||||
"remove_library_location",
|
||||
"local_tab",
|
||||
"stats"
|
||||
],
|
||||
|
||||
"de": [
|
||||
"local_library",
|
||||
"add_library_location",
|
||||
"remove_library_location",
|
||||
"local_tab",
|
||||
"stats"
|
||||
],
|
||||
|
||||
"es": [
|
||||
"local_library",
|
||||
"add_library_location",
|
||||
"remove_library_location",
|
||||
"local_tab",
|
||||
"stats"
|
||||
],
|
||||
|
||||
"eu": [
|
||||
"local_library",
|
||||
"add_library_location",
|
||||
"remove_library_location",
|
||||
"local_tab",
|
||||
"stats"
|
||||
],
|
||||
|
||||
"fa": [
|
||||
"local_library",
|
||||
"add_library_location",
|
||||
"remove_library_location",
|
||||
"local_tab",
|
||||
"stats"
|
||||
],
|
||||
|
||||
"fi": [
|
||||
"local_library",
|
||||
"add_library_location",
|
||||
"remove_library_location",
|
||||
"local_tab",
|
||||
"stats"
|
||||
],
|
||||
|
||||
"fr": [
|
||||
"local_library",
|
||||
"add_library_location",
|
||||
"remove_library_location",
|
||||
"local_tab",
|
||||
"stats"
|
||||
],
|
||||
|
||||
"hi": [
|
||||
"local_library",
|
||||
"add_library_location",
|
||||
"remove_library_location",
|
||||
"local_tab",
|
||||
"stats"
|
||||
],
|
||||
|
||||
"id": [
|
||||
"local_library",
|
||||
"add_library_location",
|
||||
"remove_library_location",
|
||||
"local_tab",
|
||||
"stats"
|
||||
],
|
||||
|
||||
"it": [
|
||||
"local_library",
|
||||
"add_library_location",
|
||||
"remove_library_location",
|
||||
"local_tab",
|
||||
"stats"
|
||||
],
|
||||
|
||||
"ja": [
|
||||
"local_library",
|
||||
"add_library_location",
|
||||
"remove_library_location",
|
||||
"local_tab",
|
||||
"stats"
|
||||
],
|
||||
|
||||
"ka": [
|
||||
"local_library",
|
||||
"add_library_location",
|
||||
"remove_library_location",
|
||||
"local_tab",
|
||||
"stats"
|
||||
],
|
||||
|
||||
"ko": [
|
||||
"local_library",
|
||||
"add_library_location",
|
||||
"remove_library_location",
|
||||
"local_tab",
|
||||
"stats"
|
||||
],
|
||||
|
||||
"ne": [
|
||||
"local_library",
|
||||
"add_library_location",
|
||||
"remove_library_location",
|
||||
"local_tab",
|
||||
"stats"
|
||||
],
|
||||
|
||||
"nl": [
|
||||
"local_library",
|
||||
"add_library_location",
|
||||
"remove_library_location",
|
||||
"local_tab",
|
||||
"stats"
|
||||
],
|
||||
|
||||
"pl": [
|
||||
"local_library",
|
||||
"add_library_location",
|
||||
"remove_library_location",
|
||||
"local_tab",
|
||||
"stats"
|
||||
],
|
||||
|
||||
"pt": [
|
||||
"local_library",
|
||||
"add_library_location",
|
||||
"remove_library_location",
|
||||
"local_tab",
|
||||
"stats"
|
||||
],
|
||||
|
||||
"ru": [
|
||||
"local_library",
|
||||
"add_library_location",
|
||||
"remove_library_location",
|
||||
"local_tab",
|
||||
"stats"
|
||||
],
|
||||
|
||||
"th": [
|
||||
"local_library",
|
||||
"add_library_location",
|
||||
"remove_library_location",
|
||||
"local_tab",
|
||||
"stats"
|
||||
],
|
||||
|
||||
"tr": [
|
||||
"local_library",
|
||||
"add_library_location",
|
||||
"remove_library_location",
|
||||
"local_tab",
|
||||
"stats"
|
||||
],
|
||||
|
||||
"uk": [
|
||||
"local_library",
|
||||
"add_library_location",
|
||||
"remove_library_location",
|
||||
"local_tab",
|
||||
"stats"
|
||||
],
|
||||
|
||||
"vi": [
|
||||
"local_library",
|
||||
"add_library_location",
|
||||
"remove_library_location",
|
||||
"local_tab",
|
||||
"stats"
|
||||
],
|
||||
|
||||
"zh": [
|
||||
"local_library",
|
||||
"add_library_location",
|
||||
"remove_library_location",
|
||||
"local_tab",
|
||||
"stats"
|
||||
]
|
||||
}
|
||||
{}
|
Loading…
Reference in New Issue
Block a user