[the-board/selection-toolbar: 1/3] [ui] Allow creating toolboxes without a title



commit 5f835c6defe25bf1f1ea17e39eb98a9bcc1a6080
Author: Lucas Rocha <lucasr gnome org>
Date:   Mon Jan 24 00:23:35 2011 +0000

    [ui] Allow creating toolboxes without a title

 src/js/ui/toolBox.js |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/js/ui/toolBox.js b/src/js/ui/toolBox.js
index e2a1eeb..aa8f018 100644
--- a/src/js/ui/toolBox.js
+++ b/src/js/ui/toolBox.js
@@ -19,7 +19,7 @@ ToolBox.prototype = {
         if ('title' in args) {
             this._title = args.title;
         } else {
-            throw new Error("ToolBox title is required");
+            this._title = null;
         }
 
         if ('isButtonGroup' in args) {
@@ -33,7 +33,11 @@ ToolBox.prototype = {
         this._buttons = [];
 
         this._createMainBox();
-        this._createTitleBox();
+
+        if (this._title) {
+            this._createTitleBox();
+        }
+
         this._createButtonBox();
 
         if (this._isButtonGroup) {



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