>From 43864d98de1dc7915021a9ca3aa83c72b38de81a Mon Sep 17 00:00:00 2001 From: Gwenael Casaccio Date: Thu, 5 Dec 2013 15:05:25 +0100 Subject: [PATCH 4/4] Removes postInitialize calls and makes widget initialization consistent --- packages/visualgst/Debugger/GtkDebugger.st | 11 +--- packages/visualgst/Gtk/GtkScrollTreeWidget.st | 2 +- packages/visualgst/GtkLauncher.st | 33 ++++-------- packages/visualgst/GtkWorkspaceWidget.st | 8 +-- packages/visualgst/Inspector/GtkInspector.st | 13 +---- .../Inspector/GtkInspectorBrowserWidget.st | 6 --- .../Inspector/GtkInspectorSourceWidget.st | 1 + packages/visualgst/Inspector/GtkInspectorWidget.st | 13 +---- packages/visualgst/SUnit/GtkSUnit.st | 9 +--- .../StBrowser/GtkCategorizedNamespaceWidget.st | 3 +- .../visualgst/StBrowser/GtkClassBrowserWidget.st | 10 ++-- packages/visualgst/Widget/Compoment.st | 2 +- .../Widget/Events/SelectionChangedAnnouncement.st | 50 ++++++++++++++++++ .../Widget/Events/TextChangedAnnouncement.st | 44 ++++++++++++++++ .../visualgst/Widget/Events/WidgetAnnouncement.st | 60 ++++++++++++++++++++++ packages/visualgst/Widget/List.st | 6 +++ packages/visualgst/Widget/Notebook.st | 3 +- packages/visualgst/Widget/Paned.st | 5 ++ .../visualgst/Widget/Text/GtkSourceCodeWidget.st | 11 ++-- packages/visualgst/Widget/Text/GtkTextWidget.st | 17 +++--- packages/visualgst/Widget/Tree.st | 6 +++ packages/visualgst/Widget/Widget.st | 2 +- packages/visualgst/Widget/Window.st | 36 +++++-------- 23 files changed, 222 insertions(+), 129 deletions(-) create mode 100644 packages/visualgst/Widget/Events/SelectionChangedAnnouncement.st create mode 100644 packages/visualgst/Widget/Events/TextChangedAnnouncement.st create mode 100644 packages/visualgst/Widget/Events/WidgetAnnouncement.st diff --git a/packages/visualgst/Debugger/GtkDebugger.st b/packages/visualgst/Debugger/GtkDebugger.st index 17789bb..0eb42cf 100644 --- a/packages/visualgst/Debugger/GtkDebugger.st +++ b/packages/visualgst/Debugger/GtkDebugger.st @@ -34,6 +34,7 @@ ======================================================================" GtkBrowsingTool subclass: GtkDebugger [ + | codeWidget contextWidget debugger inspectorWidget stackInspectorWidget | GtkDebugger class >> open: aString [ @@ -78,16 +79,6 @@ GtkBrowsingTool subclass: GtkDebugger [ ^ 'About Debugger' ] - postInitialize [ - - - - super postInitialize. - codeWidget postInitialize. - inspectorWidget postInitialize. - stackInspectorWidget postInitialize. - ] - buildContextWidget [ diff --git a/packages/visualgst/Gtk/GtkScrollTreeWidget.st b/packages/visualgst/Gtk/GtkScrollTreeWidget.st index 2bd9c4a..3ca66dd 100644 --- a/packages/visualgst/Gtk/GtkScrollTreeWidget.st +++ b/packages/visualgst/Gtk/GtkScrollTreeWidget.st @@ -60,7 +60,7 @@ GtkConcreteWidget subclass: GtkScrollTreeWidget [ popupMenu := [ :value | ]. self buildTreeView. - self mainWidget: (GTK.GtkScrolledWindow withChild: self treeView) + self mainWidget: (GTK.GtkScrolledWindow withChild: self treeView). ] buildTreeView [ diff --git a/packages/visualgst/GtkLauncher.st b/packages/visualgst/GtkLauncher.st index 3196894..c15e896 100644 --- a/packages/visualgst/GtkLauncher.st +++ b/packages/visualgst/GtkLauncher.st @@ -36,7 +36,7 @@ GtkVisualGSTTool subclass: GtkLauncher [ GtkLauncher class [ | uniqueInstance | ] - | leftSidebarP leftSidebar rightSidebar topSidebarP topSidebar packageBuilderWidget implementorResultWidget senderResultWidget senderWidget implementorWidget historyWidget browsers outputs saved imageName transcriptWidget windowsMenu systemChangeNotifier | + | bottomSidebarP leftSidebarP leftSidebar rightSidebar topSidebarP topSidebar packageBuilderWidget implementorResultWidget senderResultWidget senderWidget implementorWidget historyWidget browsers outputs saved imageName transcriptWidget windowsMenu systemChangeNotifier | GtkLauncher class >> uniqueInstance [ @@ -64,8 +64,6 @@ GtkVisualGSTTool subclass: GtkLauncher [ ^ (uniqueInstance := self basicNew) initialize; - showAll; - postInitialize; resize: address@hidden; yourself ] @@ -132,7 +130,6 @@ GtkVisualGSTTool subclass: GtkLauncher [ | widget | browsers addWidget: (widget := self buildClassBrowserWidget) label: 'Browser'. browsers showLastPage. - widget postInitialize. ^ widget ] @@ -147,7 +144,6 @@ GtkVisualGSTTool subclass: GtkLauncher [ | widget | widget := self buildWorkspaceWidget. - widget postInitialize. outputs addWidget: widget label: aString. outputs showLastPage. ^widget @@ -304,7 +300,11 @@ GtkVisualGSTTool subclass: GtkLauncher [ super initialize. window maximize. window setIcon: (GTK.GdkPixbuf newFromFile: (self class / 'Icons/visualgst.png') file displayString error: nil). - self subscribe + self subscribe. + self hideSidebars. + leftSidebarP position: 150. + topSidebarP position: 100. + window connectSignal: 'key-press-event' to: self selector: #'keyPressedOn:keyEvent:' ] subscribe [ @@ -326,24 +326,11 @@ GtkVisualGSTTool subclass: GtkLauncher [ browsers grabFocus. - browsers currentWidget postInitialize. browsers currentWidget selectANamespace: Smalltalk. browsers currentWidget selectAClass: Object. outputs hideAll ] - postInitialize [ - - - super postInitialize. - self browserPostInitialize. - 1 to: 2 do: [ :i | (outputs widgetAt: i) postInitialize ]. - self hideSidebars. - leftSidebarP position: 150. - topSidebarP position: 100. - window connectSignal: 'key-press-event' to: self selector: #'keyPressedOn:keyEvent:' - ] - buildNotebookWorkspaceWidget [ @@ -391,7 +378,7 @@ GtkVisualGSTTool subclass: GtkLauncher [ buildBrowserAndWorkspaceWidget [ - ^ VPaned addAll: + ^ bottomSidebarP := VPaned addAll: { leftSidebarP := HPaned addAll: { self buildImplementorPaned. self buildBottomPanedAndClassBrowser. self buildRightSidebarPaned }. self buildNotebookWorkspaceWidget } ] @@ -834,9 +821,9 @@ GtkVisualGSTTool subclass: GtkLauncher [ showHideBottomPane [ - outputs isVisible - ifTrue: [ outputs hideAll ] - ifFalse: [ outputs showPane ] + bottomSidebarP position = bottomSidebarP maxPosition + ifTrue: [ bottomSidebarP position: bottomSidebarP maxPosition - 200 ] + ifFalse: [ bottomSidebarP position: bottomSidebarP maxPosition ] ] back [ diff --git a/packages/visualgst/GtkWorkspaceWidget.st b/packages/visualgst/GtkWorkspaceWidget.st index 6729eca..066ce4d 100644 --- a/packages/visualgst/GtkWorkspaceWidget.st +++ b/packages/visualgst/GtkWorkspaceWidget.st @@ -45,14 +45,8 @@ GtkTextWidget subclass: GtkWorkspaceWidget [ yourself. object := variableTracker objectClass new. super initialize. - self connectToWhenPopupMenu: (WorkspaceMenus on: self) - ] - - postInitialize [ - - + self connectToWhenPopupMenu: (WorkspaceMenus on: self). variableWidget hideAll. - super postInitialize ] buildWidget [ diff --git a/packages/visualgst/Inspector/GtkInspector.st b/packages/visualgst/Inspector/GtkInspector.st index 3d864cc..0180819 100644 --- a/packages/visualgst/Inspector/GtkInspector.st +++ b/packages/visualgst/Inspector/GtkInspector.st @@ -35,16 +35,14 @@ ======================================================================" GtkBrowsingTool subclass: GtkInspector [ + | object notebookWidget inspectorWidget browserWidget workspaceWidget | GtkInspector class >> openOn: anObject [ ^ (self new) - initialize; object: anObject; - showAll; - postInitialize; yourself ] @@ -54,15 +52,6 @@ GtkBrowsingTool subclass: GtkInspector [ ^ '' ] - postInitialize [ - - - super postInitialize. - browserWidget postInitialize. - inspectorWidget postInitialize. - workspaceWidget postInitialize. - ] - object: anObject [ diff --git a/packages/visualgst/Inspector/GtkInspectorBrowserWidget.st b/packages/visualgst/Inspector/GtkInspectorBrowserWidget.st index 2cc7335..1af9c3c 100644 --- a/packages/visualgst/Inspector/GtkInspectorBrowserWidget.st +++ b/packages/visualgst/Inspector/GtkInspectorBrowserWidget.st @@ -43,12 +43,6 @@ Compoment subclass: GtkInspectorBrowserWidget [ ^ 'Gtk class browser' ] - postInitialize [ - - - codeWidget postInitialize - ] - buildBrowser [ ^ HPaned addAll: {self buildHierarchy. self buildProtocolAndMethod} diff --git a/packages/visualgst/Inspector/GtkInspectorSourceWidget.st b/packages/visualgst/Inspector/GtkInspectorSourceWidget.st index ed08c77..12e1da6 100644 --- a/packages/visualgst/Inspector/GtkInspectorSourceWidget.st +++ b/packages/visualgst/Inspector/GtkInspectorSourceWidget.st @@ -34,6 +34,7 @@ ======================================================================" GtkTextWidget subclass: GtkInspectorSourceWidget [ + | object | GtkInspectorSourceWidget class >> openOn: anObject [ diff --git a/packages/visualgst/Inspector/GtkInspectorWidget.st b/packages/visualgst/Inspector/GtkInspectorWidget.st index 5a255e9..7408fda 100644 --- a/packages/visualgst/Inspector/GtkInspectorWidget.st +++ b/packages/visualgst/Inspector/GtkInspectorWidget.st @@ -48,18 +48,12 @@ Compoment subclass: GtkInspectorWidget [ initialize [ + self buildView. super initialize. stack := OrderedCollection new. - self buildView. inspectorTree whenSelectionChangedSend: #onVariableChanged: to: self. ] - postInitialize [ - - - workspaceWidget postInitialize - ] - inspector: aGtkInspector [ @@ -95,10 +89,7 @@ Compoment subclass: GtkInspectorWidget [ buildWorkspaceWidget [ - ^ workspaceWidget := (GtkWorkspaceWidget new) - initialize; - showAll; - yourself + ^ workspaceWidget := GtkWorkspaceWidget new ] buildView [ diff --git a/packages/visualgst/SUnit/GtkSUnit.st b/packages/visualgst/SUnit/GtkSUnit.st index 938f087..ee2b49d 100644 --- a/packages/visualgst/SUnit/GtkSUnit.st +++ b/packages/visualgst/SUnit/GtkSUnit.st @@ -113,14 +113,7 @@ GtkBrowsingTool subclass: GtkSUnit [ super initialize. - state := NamespaceState on: self with: Smalltalk - ] - - postInitialize [ - - - super postInitialize. - sourceCodeWidget postInitialize + state := NamespaceState on: self with: Smalltalk. ] windowTitle [ diff --git a/packages/visualgst/StBrowser/GtkCategorizedNamespaceWidget.st b/packages/visualgst/StBrowser/GtkCategorizedNamespaceWidget.st index 799ccda..94d8e08 100644 --- a/packages/visualgst/StBrowser/GtkCategorizedNamespaceWidget.st +++ b/packages/visualgst/StBrowser/GtkCategorizedNamespaceWidget.st @@ -39,7 +39,8 @@ Compoment subclass: GtkCategorizedNamespaceWidget [ self buildTreeView. - self registerNotifier + self registerNotifier. + super initialize. ] registerNotifier [ diff --git a/packages/visualgst/StBrowser/GtkClassBrowserWidget.st b/packages/visualgst/StBrowser/GtkClassBrowserWidget.st index b64ce2d..ac1ae54 100644 --- a/packages/visualgst/StBrowser/GtkClassBrowserWidget.st +++ b/packages/visualgst/StBrowser/GtkClassBrowserWidget.st @@ -195,12 +195,6 @@ Compoment subclass: GtkClassBrowserWidget [ buildBrowserPaned ] - postInitialize [ - - - codeWidget postInitialize - ] - updateHistory: aClass [ @@ -584,7 +578,9 @@ Compoment subclass: GtkClassBrowserWidget [ sourceCodeWidgetHasFocus [ - ^ parentWindow getFocus address = codeWidget textview address + " TODO Fix Me " + "^ parentWindow getFocus address = codeWidget textview address" + ^ false ] copy [ diff --git a/packages/visualgst/Widget/Compoment.st b/packages/visualgst/Widget/Compoment.st index 48f3b18..e6d6b1b 100644 --- a/packages/visualgst/Widget/Compoment.st +++ b/packages/visualgst/Widget/Compoment.st @@ -56,7 +56,7 @@ Widget subclass: Compoment [ showAll [ - child showAll + child show ] hideAll [ diff --git a/packages/visualgst/Widget/Events/SelectionChangedAnnouncement.st b/packages/visualgst/Widget/Events/SelectionChangedAnnouncement.st new file mode 100644 index 0000000..24eb336 --- /dev/null +++ b/packages/visualgst/Widget/Events/SelectionChangedAnnouncement.st @@ -0,0 +1,50 @@ +"====================================================================== +| +| SelectionChangedAnnouncement class definition +| +======================================================================" + +"====================================================================== +| +| Copyright (c) 2013 +| Gwenael Casaccio , +| +| +| This file is part of VisualGST. +| +| Permission is hereby granted, free of charge, to any person obtaining +| a copy of this software and associated documentation files (the +| 'Software'), to deal in the Software without restriction, including +| without limitation the rights to use, copy, modify, merge, publish, +| distribute, sublicense, and/or sell copies of the Software, and to +| permit persons to whom the Software is furnished to do so, subject to +| the following conditions: +| +| The above copyright notice and this permission notice shall be +| included in all copies or substantial portions of the Software. +| +| THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +| +======================================================================" + +WidgetAnnouncement subclass: SelectionChangedAnnouncement [ + + hasSelection [ + + + ^ self widget hasSelection + ] + + selection [ + + + ^ self widget selection + ] +] + diff --git a/packages/visualgst/Widget/Events/TextChangedAnnouncement.st b/packages/visualgst/Widget/Events/TextChangedAnnouncement.st new file mode 100644 index 0000000..12c53a3 --- /dev/null +++ b/packages/visualgst/Widget/Events/TextChangedAnnouncement.st @@ -0,0 +1,44 @@ +"====================================================================== +| +| TextChangedAnnouncement class definition +| +======================================================================" + +"====================================================================== +| +| Copyright (c) 2013 +| Gwenael Casaccio , +| +| +| This file is part of VisualGST. +| +| Permission is hereby granted, free of charge, to any person obtaining +| a copy of this software and associated documentation files (the +| 'Software'), to deal in the Software without restriction, including +| without limitation the rights to use, copy, modify, merge, publish, +| distribute, sublicense, and/or sell copies of the Software, and to +| permit persons to whom the Software is furnished to do so, subject to +| the following conditions: +| +| The above copyright notice and this permission notice shall be +| included in all copies or substantial portions of the Software. +| +| THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +| +======================================================================" + +WidgetAnnouncement subclass: TextChangedAnnouncement [ + + text [ + + + ^ self widget text + ] +] + diff --git a/packages/visualgst/Widget/Events/WidgetAnnouncement.st b/packages/visualgst/Widget/Events/WidgetAnnouncement.st new file mode 100644 index 0000000..63fbebc --- /dev/null +++ b/packages/visualgst/Widget/Events/WidgetAnnouncement.st @@ -0,0 +1,60 @@ +"====================================================================== +| +| WidgetAnnouncement class definition +| +======================================================================" + +"====================================================================== +| +| Copyright (c) 2013 +| Gwenael Casaccio , +| +| +| This file is part of VisualGST. +| +| Permission is hereby granted, free of charge, to any person obtaining +| a copy of this software and associated documentation files (the +| 'Software'), to deal in the Software without restriction, including +| without limitation the rights to use, copy, modify, merge, publish, +| distribute, sublicense, and/or sell copies of the Software, and to +| permit persons to whom the Software is furnished to do so, subject to +| the following conditions: +| +| The above copyright notice and this permission notice shall be +| included in all copies or substantial portions of the Software. +| +| THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +| +======================================================================" + +Announcement subclass: WidgetAnnouncement [ + + | widget | + + WidgetAnnouncement class >> widget: aWidget [ + + + ^ self new + widget: aWidget; + yourself + ] + + widget [ + + + ^ widget + ] + + widget: aWidget [ + + + widget := aWidget + ] +] + diff --git a/packages/visualgst/Widget/List.st b/packages/visualgst/Widget/List.st index de761bb..ad2c554 100644 --- a/packages/visualgst/Widget/List.st +++ b/packages/visualgst/Widget/List.st @@ -160,6 +160,12 @@ Widget subclass: List [ announcer on: SelectionChangedAnnouncement do: [ :ann | anObject perform: aSymbol with: ann ] ] + showAll [ + + + child showAll + ] + onPress: aGtkWidget event: aGdkEvent [ diff --git a/packages/visualgst/Widget/Notebook.st b/packages/visualgst/Widget/Notebook.st index fd8c2d4..6cc4bd3 100644 --- a/packages/visualgst/Widget/Notebook.st +++ b/packages/visualgst/Widget/Notebook.st @@ -180,8 +180,7 @@ Widget subclass: Notebook [ showPane [ - child showAll. - pages do: [ :each | each postInitialize ] + child showAll ] ] diff --git a/packages/visualgst/Widget/Paned.st b/packages/visualgst/Widget/Paned.st index 5f41ad0..a93c959 100644 --- a/packages/visualgst/Widget/Paned.st +++ b/packages/visualgst/Widget/Paned.st @@ -114,6 +114,11 @@ Widget subclass: Paned [ ^ child getPosition ] + maxPosition [ + + ^ child propertiesAt: 'max-position' + ] + paned [ diff --git a/packages/visualgst/Widget/Text/GtkSourceCodeWidget.st b/packages/visualgst/Widget/Text/GtkSourceCodeWidget.st index 7d878c5..79a0248 100644 --- a/packages/visualgst/Widget/Text/GtkSourceCodeWidget.st +++ b/packages/visualgst/Widget/Text/GtkSourceCodeWidget.st @@ -34,13 +34,15 @@ ======================================================================" GtkTextWidget subclass: GtkSourceCodeWidget [ + | browser codeText saveWidget | initialize [ super initialize. - self initializeHighlighter + self initializeHighlighter. + saveWidget hideAll ] initializeHighlighter [ @@ -145,13 +147,6 @@ GtkTextWidget subclass: GtkSourceCodeWidget [ saveWidget showAll ] - postInitialize [ - - - super postInitialize. - saveWidget mainWidget hide - ] - acceptIt [ diff --git a/packages/visualgst/Widget/Text/GtkTextWidget.st b/packages/visualgst/Widget/Text/GtkTextWidget.st index b08a6ef..2bd3f7e 100644 --- a/packages/visualgst/Widget/Text/GtkTextWidget.st +++ b/packages/visualgst/Widget/Text/GtkTextWidget.st @@ -84,14 +84,9 @@ Widget subclass: GtkTextWidget [ self buildWidget; connectSignals. - - ] - - postInitialize [ - - - findWidget mainWidget hide. - replaceWidget mainWidget hide. + super initialize. + findWidget hideAll. + replaceWidget hideAll. ] buildWidget [ @@ -429,5 +424,11 @@ Widget subclass: GtkTextWidget [ end := self buffer getIterAtOffset: (iter getOffset). self buffer selectRange: start bound: end ] ] + + showAll [ + + + child showAll + ] ] diff --git a/packages/visualgst/Widget/Tree.st b/packages/visualgst/Widget/Tree.st index 6a3115c..8ef3461 100644 --- a/packages/visualgst/Widget/Tree.st +++ b/packages/visualgst/Widget/Tree.st @@ -147,6 +147,12 @@ Widget subclass: Tree [ tree getSelection connectSignal: 'changed' to: anObject selector: aSymbol ] + showAll [ + + + child showAll + ] + onPress: aGtkWidget event: aGdkEvent [ diff --git a/packages/visualgst/Widget/Widget.st b/packages/visualgst/Widget/Widget.st index 11979a3..fb5046c 100644 --- a/packages/visualgst/Widget/Widget.st +++ b/packages/visualgst/Widget/Widget.st @@ -102,7 +102,7 @@ Object subclass: Widget [ showAll [ - child showAll + child show ] hideAll [ diff --git a/packages/visualgst/Widget/Window.st b/packages/visualgst/Widget/Window.st index e3f8a4c..c072828 100644 --- a/packages/visualgst/Widget/Window.st +++ b/packages/visualgst/Widget/Window.st @@ -40,21 +40,14 @@ Widget subclass: Window [ Window class >> open [ - ^ (self new) - initialize; - showAll; - postInitialize; - yourself + ^ self new ] Window class >> openSized: aPoint [ - ^ (self new) - initialize; + ^ self new resize: aPoint; - showAll; - postInitialize; yourself ] @@ -87,7 +80,7 @@ Widget subclass: Window [ menuBar [ - ^ menuBar ifNil: [ menuBar := GTK.GtkMenuBar new ] + ^ menuBar ifNil: [ (menuBar := GTK.GtkMenuBar new) showAll ] ] menuBar: aGtkMenuBar [ @@ -168,12 +161,15 @@ that are specific to this version of GNU Smalltalk.'; window := GTK.GtkWindow new: GTK.Gtk gtkWindowToplevel. window addAccelGroup: self accelGroup. + window connectSignal: 'delete-event' to: self selector: #'onDelete:event:'. + window showAll. self title: self windowTitle; createMenus; createToolbar; createStatusBar; - centralWidget: self buildCentralWidget + centralWidget: self buildCentralWidget; + showAll ] buildCentralWidget [ @@ -200,13 +196,6 @@ that are specific to this version of GNU Smalltalk.'; ] - postInitialize [ - - - window - connectSignal: 'delete-event' to: self selector: #'onDelete:event:' - ] - onDelete: aGtkWidget event: aGdkEvent [ @@ -279,13 +268,14 @@ that are specific to this version of GNU Smalltalk.'; ] showAll [ + self container showAll. + {menuBar->false. toolBar->false. centralWidget->true. statusBar->false} do: [ :each | - each key ifNotNil: [ self container - packStart: each key expand: each value fill: true padding: 0 ] ]. + each key ifNotNil: [ + each value ifFalse: [ each key showAll ]. + self container packStart: each key expand: each value fill: true padding: 0 ] ]. - window - add: self container; - showAll + window add: self container ] focusedWidget [ -- 1.8.3.2