diff dwtx/jface/resource/JFaceResources.d @ 70:46a6e0e6ccd4

Merge with d-fied sources of 3.4M7
author Frank Benoit <benoit@tionex.de>
date Thu, 22 May 2008 01:36:46 +0200
parents 8efa0d75df77
children 5df4896124c7
line wrap: on
line diff
--- a/dwtx/jface/resource/JFaceResources.d	Mon May 19 13:41:06 2008 +0200
+++ b/dwtx/jface/resource/JFaceResources.d	Thu May 22 01:36:46 2008 +0200
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,6 +28,7 @@
 import dwt.widgets.Display;
 import dwtx.core.runtime.Assert;
 import dwtx.jface.dialogs.Dialog;
+import dwtx.jface.dialogs.PopupDialog;
 import dwtx.jface.dialogs.TitleAreaDialog;
 import dwtx.jface.preference.PreferenceDialog;
 import dwtx.jface.wizard.Wizard;
@@ -200,6 +201,7 @@
     public static ColorRegistry getColorRegistry() {
         if (colorRegistry is null) {
             colorRegistry = new ColorRegistry();
+            initializeDefaultColors();
         }
         return colorRegistry;
     }
@@ -451,12 +453,18 @@
                 ~ "message_warning.gif", getImportData!( "dwtx.jface.dialogs.images.message_warning.gif")); //$NON-NLS-1$
         declareImage(bundle, Dialog.DLG_IMG_MESSAGE_ERROR, ICONS_PATH
                 ~ "message_error.gif", getImportData!( "dwtx.jface.dialogs.images.message_error.gif"));//$NON-NLS-1$ //$NON-NLS-2$
-        declareImage(bundle, Dialog.DLG_IMG_HELP, ICONS_PATH
-                ~ "help.gif", getImportData!( "dwtx.jface.dialogs.images.help.gif"));//$NON-NLS-1$ //$NON-NLS-2$
+        declareImage(bundle, Dialog.DLG_IMG_HELP,
+                ICONS_PATH ~ "help.gif", getImportData!( "dwtx.jface.dialogs.images.help.gif"));//$NON-NLS-1$ //$NON-NLS-2$
         declareImage(bundle, TitleAreaDialog.DLG_IMG_TITLE_BANNER, ICONS_PATH
                 ~ "title_banner.png", getImportData!( "dwtx.jface.dialogs.images.title_banner.gif"));//$NON-NLS-1$ //$NON-NLS-2$
         declareImage(bundle, PreferenceDialog.PREF_DLG_TITLE_IMG, ICONS_PATH
                 ~ "pref_dialog_title.gif", getImportData!( "dwtx.jface.preference.images.pref_dialog_title.gif"));//$NON-NLS-1$ //$NON-NLS-2$
+        declareImage(bundle, PopupDialog.POPUP_IMG_MENU, ICONS_PATH
+                ~ "popup_menu.gif", getImportData!( "images/popup_menu.gif"));//$NON-NLS-1$ //$NON-NLS-2$
+        declareImage(
+                bundle,
+                PopupDialog.POPUP_IMG_MENU_DISABLED,
+                ICONS_PATH ~ "popup_menu_disabled.gif", getImportData!( "images/popup_menu_disabled.gif"));//$NON-NLS-1$ //$NON-NLS-2$
     }
 
     /**
@@ -482,14 +490,14 @@
     private static final void declareImage(Object bundle, String key,
             String path, ImportData importdata/+ClassInfo fallback, String fallbackPath+/) {
 
-
         ImageDescriptor descriptor = null;
 
         if (bundle !is null) {
-//FIXME
-//          URL url = FileLocator.find((Bundle) bundle, new Path(path), null);
-//          if (url !is null)
-//              descriptor = ImageDescriptor.createFromURL(url);
+            /*
+            URL url = FileLocator.find((Bundle) bundle, new Path(path), null);
+            if (url !is null)
+                descriptor = ImageDescriptor.createFromURL(url);
+            */
         }
 
         // If we failed then load from the backup file
@@ -599,4 +607,12 @@
     private this() {
         // no-op
     }
+
+    /*
+     * Initialize any JFace colors that may not be initialized via a client.
+     */
+    private static void initializeDefaultColors() {
+        // JFace Colors that may not be defined in a workbench theme should be
+        // defined here.
+    }
 }