Skip to content

Commit

Permalink
create accounts, htlc and governance plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
oxarbitrage committed Jul 20, 2019
1 parent 5bdfed4 commit 5cf9639
Show file tree
Hide file tree
Showing 30 changed files with 85 additions and 80 deletions.
33 changes: 1 addition & 32 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,48 +24,17 @@ add_executable( gwallet
dialogs/importkey.cpp
dialogs/importbalance.cpp
dialogs/settings.cpp
#dialogs/assetoptions.cpp

#panels/transfer.cpp
#plugins/transfer/transfer.cpp

#panels/sellasset.cpp
#panels/borrowasset.cpp
#panels/cancelorder.cpp
#panels/setproxy.cpp
#panels/getcommitteemember.cpp
#panels/getaccounthistory.cpp
#panels/getorderbook.cpp
#panels/info.cpp
panels/wallet.cpp
panels/cli.cpp
panels/dashboard.cpp
panels/commands.cpp

#panels/about.cpp
#panels/active_witnesses.cpp
#panels/active_committee.cpp
panels/upgradeaccount.cpp
panels/createaccountwithbrainkey.cpp
panels/registeraccount.cpp
#panels/createasset.cpp
#panels/getwitness.cpp
#panels/getaccount.cpp
#panels/getasset.cpp
#panels/issueasset.cpp
panels/createhtlc.cpp
panels/redeemhtlc.cpp
panels/extendhtlc.cpp
#panels/gethtlc.cpp
#panels/updatefeedproducers.cpp
panels/voteforwitness.cpp

wizards/registration.cpp)

find_package(wxWidgets COMPONENTS core base adv xrc aui REQUIRED)
include(${wxWidgets_USE_FILE})

set(plugins "gwallet_assets" "gwallet_setproxy" "gwallet_getters")
set(plugins "gwallet_assets" "gwallet_getters" "gwallet_accounts" "gwallet_htlc" "gwallet_governance")

target_link_libraries( gwallet
PRIVATE graphene_app graphene_net graphene_chain graphene_egenesis_brief graphene_utilities graphene_wallet fc
Expand Down
16 changes: 8 additions & 8 deletions panels/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,28 @@
#include "../plugins/assets/include/sellasset.hpp"
#include "../plugins/assets/include/borrowasset.hpp"
#include "../plugins/assets/include/cancelorder.hpp"
#include "../plugins/setproxy/include/setproxy.hpp"
#include "../plugins/accounts/include/setproxy.hpp"
#include "../plugins/getters/include/getcommitteemember.hpp"
#include "../plugins/getters/include/getaccounthistory.hpp"
#include "../plugins/getters/include/getorderbook.hpp"
#include "../plugins/getters/include/about.hpp"
#include "../plugins/getters/include/info.hpp"
#include "../plugins/getters/include/active_committee.hpp"
#include "../plugins/getters/include/active_witnesses.hpp"
#include "../include/panels/upgradeaccount.hpp"
#include "../include/panels/createaccountwithbrainkey.hpp"
#include "../include/panels/registeraccount.hpp"
#include "../plugins/accounts/include/upgradeaccount.hpp"
#include "../plugins/accounts/include/createaccountwithbrainkey.hpp"
#include "../plugins/accounts/include/registeraccount.hpp"
#include "../plugins/assets/include/createasset.hpp"
#include "../plugins/getters/include/getwitness.hpp"
#include "../plugins/getters/include/getaccount.hpp"
#include "../plugins/getters/include/getasset.hpp"
#include "../plugins/assets/include/issueasset.hpp"
#include "../include/panels/createhtlc.hpp"
#include "../include/panels/redeemhtlc.hpp"
#include "../include/panels/extendhtlc.hpp"
#include "../plugins/htlc/include/createhtlc.hpp"
#include "../plugins/htlc/include/redeemhtlc.hpp"
#include "../plugins/htlc/include/extendhtlc.hpp"
#include "../plugins/getters/include/gethtlc.hpp"
#include "../plugins/assets/include/updatefeedproducers.hpp"
#include "../include/panels/voteforwitness.hpp"
#include "../plugins/governance/include/voteforwitness.hpp"

#include "../include/panels/commands.hpp"

Expand Down
4 changes: 3 additions & 1 deletion plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
add_subdirectory( assets )
add_subdirectory( setproxy )
add_subdirectory( accounts )
add_subdirectory( getters )
add_subdirectory( htlc )
add_subdirectory( governance )
14 changes: 14 additions & 0 deletions plugins/accounts/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
find_package(wxWidgets COMPONENTS core base adv xrc aui REQUIRED)
include(${wxWidgets_USE_FILE})

add_library( gwallet_accounts
createaccountwithbrainkey.cpp
registeraccount.cpp
setproxy.cpp
upgradeaccount.cpp
)

target_link_libraries( gwallet_accounts
PRIVATE graphene_app graphene_net graphene_chain graphene_egenesis_brief graphene_utilities graphene_wallet fc
${wxWidgets_LIBRARIES} ${CMAKE_DL_LIBS} ${PLATFORM_SPECIFIC_LIBS}
)
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#include "../include/panels/createaccountwithbrainkey.hpp"
#include "../include/panels/wallet.hpp"
#include "../include/panels/cli.hpp"
#include "../include/panels/commands.hpp"
#include "include/createaccountwithbrainkey.hpp"

#include <panels/commands.hpp>

CreateAccountWithBrainKey::CreateAccountWithBrainKey(GWallet* gwallet) : wxScrolledWindow()
{
p_GWallet = gwallet;

wxXmlResource::Get()->LoadAllFiles(p_GWallet->directory + wxT("/plugins/assets/resources"));
InitWidgetsFromXRC((wxWindow *)p_GWallet);

SetScrollRate(1,1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <wx/treectrl.h>
#include <wx/xrc/xmlres.h>

class GWallet;
#include <panels/wallet.hpp>

class CreateAccountWithBrainKey : public wxScrolledWindow {
protected:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <wx/spinctrl.h>
#include <wx/xrc/xmlres.h>

class GWallet;
#include <panels/wallet.hpp>

class RegisterAccount : public wxScrolledWindow {
protected:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <wx/treectrl.h>
#include <wx/xrc/xmlres.h>

class GWallet;
#include <panels/wallet.hpp>

class UpgradeAccount: public wxScrolledWindow
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#include "../include/panels/registeraccount.hpp"
#include "../include/panels/wallet.hpp"
#include "../include/panels/cli.hpp"
#include "../include/panels/commands.hpp"
#include "include/registeraccount.hpp"

#include <panels/commands.hpp>

RegisterAccount::RegisterAccount(GWallet* gwallet) : wxScrolledWindow()
{
p_GWallet = gwallet;

wxXmlResource::Get()->LoadAllFiles(p_GWallet->directory + wxT("/plugins/assets/resources"));
InitWidgetsFromXRC((wxWindow *)p_GWallet);

SetScrollRate(1,1);
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SetProxy::SetProxy(GWallet* gwallet) : wxScrolledWindow()
{
p_GWallet = gwallet;

wxXmlResource::Get()->LoadAllFiles(p_GWallet->directory + wxT("/plugins/setproxy/resources"));
wxXmlResource::Get()->LoadAllFiles(p_GWallet->directory + wxT("/plugins/accounts/resources"));
InitWidgetsFromXRC((wxWindow *)p_GWallet);

SetScrollRate(1,1);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#include "../include/panels/upgradeaccount.hpp"
#include "../include/panels/wallet.hpp"
#include "../include/panels/cli.hpp"
#include "../include/panels/commands.hpp"
#include "include/upgradeaccount.hpp"

#include <panels/commands.hpp>

UpgradeAccount::UpgradeAccount(GWallet* gwallet)
{
p_GWallet = gwallet;

wxXmlResource::Get()->LoadAllFiles(p_GWallet->directory + wxT("/plugins/accounts/resources"));
InitWidgetsFromXRC((wxWindow *)p_GWallet);

SetScrollRate(1,1);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
find_package(wxWidgets COMPONENTS core base adv xrc aui REQUIRED)
include(${wxWidgets_USE_FILE})

add_library( gwallet_setproxy
setproxy.cpp
add_library( gwallet_governance
voteforwitness.cpp
)

target_link_libraries( gwallet_setproxy
target_link_libraries( gwallet_governance
PRIVATE graphene_app graphene_net graphene_chain graphene_egenesis_brief graphene_utilities graphene_wallet fc
${wxWidgets_LIBRARIES} ${CMAKE_DL_LIBS} ${PLATFORM_SPECIFIC_LIBS}
)
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <wx/treectrl.h>
#include <wx/xrc/xmlres.h>

class GWallet;
#include <panels/wallet.hpp>

class VoteForWitness: public wxScrolledWindow
{
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#include "../include/panels/voteforwitness.hpp"
#include "../include/panels/wallet.hpp"
#include "../include/panels/cli.hpp"
#include "../include/panels/commands.hpp"
#include "include/voteforwitness.hpp"

#include <panels/commands.hpp>

VoteForWitness::VoteForWitness(GWallet* gwallet)
{
p_GWallet = gwallet;

wxXmlResource::Get()->LoadAllFiles(p_GWallet->directory + wxT("/plugins/governance/resources"));
InitWidgetsFromXRC((wxWindow *)p_GWallet);

SetScrollRate(1,1);
Expand Down
13 changes: 13 additions & 0 deletions plugins/htlc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
find_package(wxWidgets COMPONENTS core base adv xrc aui REQUIRED)
include(${wxWidgets_USE_FILE})

add_library( gwallet_htlc
createhtlc.cpp
redeemhtlc.cpp
extendhtlc.cpp
)

target_link_libraries( gwallet_htlc
PRIVATE graphene_app graphene_net graphene_chain graphene_egenesis_brief graphene_utilities graphene_wallet fc
${wxWidgets_LIBRARIES} ${CMAKE_DL_LIBS} ${PLATFORM_SPECIFIC_LIBS}
)
9 changes: 5 additions & 4 deletions panels/createhtlc.cpp → plugins/htlc/createhtlc.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#include "../include/panels/createhtlc.hpp"
#include "../include/panels/wallet.hpp"
#include "../include/panels/cli.hpp"
#include "../include/panels/commands.hpp"
#include "include/createhtlc.hpp"

#include <panels/commands.hpp>

CreateHtlc::CreateHtlc(GWallet* gwallet) : wxScrolledWindow()
{
p_GWallet = gwallet;

wxXmlResource::Get()->LoadAllFiles(p_GWallet->directory + wxT("/plugins/htlc/resources"));
InitWidgetsFromXRC((wxWindow *)p_GWallet);

source->Append(p_GWallet->strings.accounts);
Expand Down
9 changes: 5 additions & 4 deletions panels/extendhtlc.cpp → plugins/htlc/extendhtlc.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#include "../include/panels/extendhtlc.hpp"
#include "../include/panels/wallet.hpp"
#include "../include/panels/cli.hpp"
#include "../include/panels/commands.hpp"
#include "include/extendhtlc.hpp"

#include <panels/commands.hpp>

ExtendHtlc::ExtendHtlc(GWallet* gwallet) : wxScrolledWindow()
{
p_GWallet = gwallet;

wxXmlResource::Get()->LoadAllFiles(p_GWallet->directory + wxT("/plugins/htlc/resources"));
InitWidgetsFromXRC((wxWindow *)p_GWallet);

issuer->Append(p_GWallet->strings.accounts);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <wx/dateevt.h>
#include <wx/xrc/xmlres.h>

class GWallet;
#include <panels/wallet.hpp>

class CreateHtlc : public wxScrolledWindow {
protected:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <wx/spinctrl.h>
#include <wx/xrc/xmlres.h>

class GWallet;
#include <panels/wallet.hpp>

class ExtendHtlc : public wxScrolledWindow {
protected:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <wx/treectrl.h>
#include <wx/xrc/xmlres.h>

class GWallet;
#include <panels/wallet.hpp>

class RedeemHtlc : public wxScrolledWindow {
protected:
Expand Down
9 changes: 5 additions & 4 deletions panels/redeemhtlc.cpp → plugins/htlc/redeemhtlc.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#include "../include/panels/redeemhtlc.hpp"
#include "../include/panels/wallet.hpp"
#include "../include/panels/cli.hpp"
#include "../include/panels/commands.hpp"
#include "include/redeemhtlc.hpp"

#include <panels/commands.hpp>

RedeemHtlc::RedeemHtlc(GWallet* gwallet) : wxScrolledWindow()
{
p_GWallet = gwallet;

wxXmlResource::Get()->LoadAllFiles(p_GWallet->directory + wxT("/plugins/htlc/resources"));
InitWidgetsFromXRC((wxWindow *)p_GWallet);

issuer->Append(p_GWallet->strings.accounts);
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 5cf9639

Please sign in to comment.