Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an Open button to open the webbrowser from control panel #1080

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
as yet unclassified
accessing
adaptorsMenuMorph
| aMenu |
aMenu := MenuModel new.
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ defaultSpec
row
add: #(model startButton);
add: #(model stopButton);
add: #(model browseButton) ];
add: #(model browseButton);
add: #(model openButton) ];
yourself
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ initialize
super initialize.
startAction := [ true ] asValueHolder.
stopAction := [ true ] asValueHolder.
browseAction := [ true ] asValueHolder
browseAction := [ true ] asValueHolder.
openAction := [ true ] asValueHolder
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@ initializeWidgets
self instantiateModels: #(
startButton ButtonModel
stopButton ButtonModel
browseButton ButtonModel).
browseButton ButtonModel
openButton ButtonModel).

self registerStartButtonEvents.
self registerStopButtonEvents.
self registerBrowseButtonEvents.

self registerOpenButtonEvents.

self focusOrder
add: startButton;
add: stopButton;
add: browseButton
add: browseButton;
add: openButton

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
actions
openAdaptor

| postfix |
self owner adaptor ifNotNil: [ :adaptor |
adaptor isRunning ifFalse: [ ^false ].
postfix := adaptor port = 80
ifTrue: [ '']
ifFalse: [ ':', adaptor port asString ].
WebBrowser openOn: 'http://localhost', postfix ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
openButton
^ openButton
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
private
registerOpenButtonEvents

openButton
label: 'Open';
enabled: true;
action: [ self openAdaptor ];
state: false

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
"browseButton",
"startAction",
"stopAction",
"browseAction"
"browseAction",
"openButton",
"openAction"
],
"name" : "WAServerAdapterToolbar",
"type" : "normal"
Expand Down

This file was deleted.