Browse Source

Load JS menu item.

Newer addresses in AZ
cl-refactor
Gav Wood 11 years ago
parent
commit
b31d233ecd
  1. 19
      alethzero/Main.ui
  2. 7
      alethzero/MainWin.cpp
  3. 1
      alethzero/MainWin.h
  4. 2
      libethereum/Executive.cpp
  5. 4
      stdserv.js

19
alethzero/Main.ui

@ -95,8 +95,8 @@
<widget class="QLineEdit" name="urlEdit"/>
</item>
<item>
<widget class="QWebView" name="webView">
<property name="url">
<widget class="QWebView" name="webView" native="true">
<property name="url" stdset="0">
<url>
<string>about:blank</string>
</url>
@ -117,7 +117,7 @@
<x>0</x>
<y>0</y>
<width>1711</width>
<height>20</height>
<height>27</height>
</rect>
</property>
<widget class="QMenu" name="menu_File">
@ -148,6 +148,8 @@
<addaction name="separator"/>
<addaction name="showAll"/>
<addaction name="showAllAccounts"/>
<addaction name="separator"/>
<addaction name="loadJS"/>
</widget>
<widget class="QMenu" name="menu_Help">
<property name="title">
@ -475,7 +477,7 @@
<property name="minimumSize">
<size>
<width>510</width>
<height>360</height>
<height>386</height>
</size>
</property>
<property name="features">
@ -1046,8 +1048,8 @@
<number>0</number>
</property>
<item>
<widget class="QWebView" name="jsConsole">
<property name="url">
<widget class="QWebView" name="jsConsole" native="true">
<property name="url" stdset="0">
<url>
<string>about:blank</string>
</url>
@ -1410,6 +1412,11 @@ font-family: Monospace, Ubuntu Mono, Lucida Console, Courier New</string>
<string>Use &amp;Past Peers</string>
</property>
</action>
<action name="loadJS">
<property name="text">
<string>&amp;Load Javascript...</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>

7
alethzero/MainWin.cpp

@ -285,6 +285,13 @@ void Main::load(QString _s)
}
// env.load("/home/gav/eth/init.eth")
void Main::on_loadJS_triggered()
{
QString f = QFileDialog::getOpenFileName(this, "Load Javascript", QString(), "Javascript (*.js);;All files (*)");
if (f.size())
load(f);
}
void Main::note(QString _s)
{
cnote << _s.toStdString();

1
alethzero/MainWin.h

@ -110,6 +110,7 @@ private slots:
void on_inject_triggered();
void on_showAll_triggered() { refresh(true); }
void on_showAllAccounts_triggered() { refresh(true); }
void on_loadJS_triggered();
void refresh(bool _override = false);
void refreshNetwork();

2
libethereum/Executive.cpp

@ -26,6 +26,8 @@
using namespace std;
using namespace eth;
#define EVM_TRACE 1
Executive::~Executive()
{
// TODO: Make safe.

4
stdserv.js

@ -10,7 +10,7 @@ var configCode = eth.lll("{
)
}")
env.note('Config code: ' + configCode.unbin())
var config;
var config = "0x9ef0f0d81e040012600b0c1abdef7c48f720f88a";
eth.create(eth.key, '0', configCode, 10000, eth.gasPrice, function(a) { config = a; })
env.note('Config at address ' + config)
@ -41,7 +41,7 @@ var nameRegCode = eth.lll("{
}");
env.note('NameReg code: ' + nameRegCode.unbin())
var nameReg;
var nameReg = "0x3face8f2b3ef580265f0f67a57ce0fb78b135613";
env.note('Create NameReg...')
eth.create(eth.key, '0', nameRegCode, 10000, eth.gasPrice, function(a) { nameReg = a; })

Loading…
Cancel
Save