[gnome-calendar/wip/christopherdavis/flatpak-dual-install: 2/4]	flatpak: Add development styling to window
- From: Christopher Davis <christopherdavis src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gnome-calendar/wip/christopherdavis/flatpak-dual-install: 2/4]	flatpak: Add development styling to window
- Date: Sun,  9 Dec 2018 04:39:34 +0000 (UTC)
commit efbe0ded95e00cc030a2705f70f1f9abe5a077bb
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/gcal-window.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/src/gcal-window.c b/src/gcal-window.c
index 46ee5301..3207de25 100644
--- a/src/gcal-window.c
+++ b/src/gcal-window.c
@@ -19,6 +19,7 @@
 
 #define G_LOG_DOMAIN "GcalWindow"
 
+#include "config.h"
 #include "gcal-debug.h"
 #include "gcal-edit-dialog.h"
 #include "gcal-event-widget.h"
@@ -1543,6 +1544,15 @@ gcal_window_init (GcalWindow *self)
   self->active_date = g_new0 (icaltimetype, 1);
   self->rtl = gtk_widget_get_direction (GTK_WIDGET (self)) == GTK_TEXT_DIR_RTL;
 
+  /* 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");
+  }
+
   /*
    * FIXME: this is a hack around the issue that happens when trying to bind
    * there properties using the GtkBuilder .ui file.
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]