Skip to content
Snippets Groups Projects
Verified Commit d1aebb27 authored by Bruce Cowan's avatar Bruce Cowan :airplane:
Browse files

Don't use global variable for storing window

parent 2ec95528
No related branches found
No related tags found
No related merge requests found
...@@ -8,14 +8,15 @@ ...@@ -8,14 +8,15 @@
#include "rugby-app-window.h" #include "rugby-app-window.h"
#include "rugby-pref-window.h" #include "rugby-pref-window.h"
static GtkWidget *window = NULL;
static void static void
on_activate ( GApplication *app, on_activate ( GApplication *app,
G_GNUC_UNUSED gpointer user_data) G_GNUC_UNUSED gpointer user_data)
{ {
g_assert (GTK_IS_APPLICATION (app));
GtkWindow *window = gtk_application_get_active_window (GTK_APPLICATION (app));
if (!window) if (!window)
window = GTK_WIDGET (rugby_app_window_new (GTK_APPLICATION (app))); window = GTK_WINDOW (rugby_app_window_new (GTK_APPLICATION (app)));
if (g_strcmp0 (PROFILE, "development") == 0) if (g_strcmp0 (PROFILE, "development") == 0)
gtk_widget_add_css_class (GTK_WIDGET (window), "devel"); gtk_widget_add_css_class (GTK_WIDGET (window), "devel");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment