Bug 464781 - [Linux] Theme change to dark does not request native GTK
authorSopot Cela <scela@redhat.com>
Wed, 29 Apr 2015 14:10:11 +0000 (16:10 +0200)
committerLars Vogel <lars.vogel@vogella.com>
Wed, 29 Apr 2015 15:59:01 +0000 (11:59 -0400)
support

Changed fragment host and call to OS.setDarkThemePreferred.

Change-Id: I9c07bc355763d35158687f096ef87c117cf337f4
Signed-off-by: Sopot Cela <scela@redhat.com>
bundles/org.eclipse.e4.ui.swt.gtk/META-INF/MANIFEST.MF
bundles/org.eclipse.e4.ui.swt.gtk/src/org/eclipse/e4/ui/swt/internal/gtk/DarkThemeProcessor.java

index beaeb3c..5250f30 100644 (file)
@@ -3,10 +3,9 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.e4.ui.swt.gtk;singleton:=true
 Bundle-Version: 1.0.0.qualifier
-Fragment-Host: org.eclipse.e4.ui.css.swt
+Fragment-Host: org.eclipse.e4.ui.css.swt.theme;bundle-version="0.10.0.qualifier"
 Bundle-RequiredExecutionEnvironment: JavaSE-1.7
 Bundle-Vendor: %providerName
 Eclipse-PlatformFilter: (osgi.ws=gtk)
 Import-Package: org.eclipse.e4.core.services.events,
- org.eclipse.e4.ui.css.swt.theme,
  org.osgi.service.event;version="1.3.1"
index 7606846..248715d 100644 (file)
@@ -22,7 +22,6 @@ import org.eclipse.swt.widgets.Display;
 import org.osgi.service.event.Event;
 import org.osgi.service.event.EventHandler;
 
-@SuppressWarnings("restriction")
 public class DarkThemeProcessor {
 
        @Inject
@@ -49,11 +48,7 @@ public class DarkThemeProcessor {
 
                                        @Override
                                        public void run() {
-                                               OS.gdk_flush();
-                                               OS.g_object_set(OS.gtk_settings_get_default(), "gtk-application-prefer-dark-theme".getBytes(), //$NON-NLS-1$
-                                                               isDark, 0);
-                                               OS.g_object_notify(OS.gtk_settings_get_default(),
-                                                               "gtk-application-prefer-dark-theme".getBytes());
+                                               OS.setDarkThemePreferred(isDark);
                                        }
                                });
                        }