diff mde/gui/widget/ParentContent.d @ 165:bb2f1a76346d

Fixed a few bugs; most notably changing the translation reloads the text on PopupMenuWidgets now.
author Diggory Hardy <diggory.hardy@gmail.com>
date Sun, 07 Jun 2009 16:20:16 +0200
parents 24d77c52243f
children da8d3091fdaf
line wrap: on
line diff
--- a/mde/gui/widget/ParentContent.d	Sat May 23 17:23:21 2009 +0200
+++ b/mde/gui/widget/ParentContent.d	Sun Jun 07 16:20:16 2009 +0200
@@ -48,7 +48,6 @@
 	WDCMinCheck (data, 3,1, content_);
         super (mgr, parent, id);
         
-        //popup = mgr.makeWidget (this, data.strings[0], content_);
         popup = new ContentListWidget (mgr, this, id, data, c);
         subWidgets = [popup];
 	
@@ -61,19 +60,22 @@
 	w = mw;
 	h = mh;
     }
-    /+
+    
     override bool setup (uint n, uint flags) {
-	if (!(flags & 3)) return false;	// string or renderer (and possibly font) changed
-        wdim omw = mw, omh = mh;
+	bool ret = super.setup (n, flags);
+	if (!(flags & 3)) return ret;
+	// else string or renderer (and possibly font) changed
+	adapter.text = content_.toString (cIndex);
+	wdim omw = mw, omh = mh;
         adapter.getDimensions (mw, mh);
         if (omw != mw || omh != mh) {
 	    w = mw;
 	    h = mh;
 	    return true;
 	}
-	return false;
+	return ret;
     }
-    +/
+    
     override IContent content () {
         return content_;
     }