[gnome-calendar/wip/christopherdavis/flatpak-dual-install: 40/41] flatpak: Add development styling to window



commit b1b6bc144ac4ba4a7224fb25e6300f4aad980b41
Author: Christopher Davis <brainblasted disroot org>
Date:   Sat Nov 3 21:17:22 2018 -0400

    flatpak: Add development styling to window
    
    Adds .devel style class to the main window for development
    builds of Calendar.
    
    Related to https://gitlab.gnome.org/GNOME/gnome-calendar/issues/285

 src/gui/gcal-window.c | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/src/gui/gcal-window.c b/src/gui/gcal-window.c
index c35e617d..1dfb9998 100644
--- a/src/gui/gcal-window.c
+++ b/src/gui/gcal-window.c
@@ -21,6 +21,7 @@
 
 #include "gcal-calendar-management-dialog.h"
 #include "gcal-calendar-popover.h"
+#include "config.h"
 #include "gcal-debug.h"
 #include "gcal-edit-dialog.h"
 #include "gcal-event-widget.h"
@@ -1122,6 +1123,14 @@ gcal_window_init (GcalWindow *self)
                            G_CALLBACK (dzl_shortcut_manager_handle_event),
                            NULL,
                            G_CONNECT_SWAPPED);
+  /* devel styling */
+  if (g_strcmp0 (PROFILE, "Devel") == 0)
+  {
+      GtkStyleContext *style_context;
+
+      style_context = gtk_widget_get_style_context (GTK_WIDGET (self));
+      gtk_style_context_add_class (style_context, "devel");
+  }
 
   /* setup accels */
   app = g_application_get_default ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]