Skip to content

Commit

Permalink
move all getters to a getters plugin, move set_proxy to a plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
oxarbitrage committed Jul 20, 2019
1 parent 4ba72c4 commit 36ac073
Show file tree
Hide file tree
Showing 43 changed files with 143 additions and 86 deletions.
27 changes: 14 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,31 +32,31 @@ add_executable( gwallet
#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/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/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/getwitness.cpp
#panels/getaccount.cpp
#panels/getasset.cpp
panels/issueasset.cpp
panels/createhtlc.cpp
panels/redeemhtlc.cpp
panels/extendhtlc.cpp
panels/gethtlc.cpp
#panels/gethtlc.cpp
panels/updatefeedproducers.cpp
panels/voteforwitness.cpp

Expand All @@ -65,7 +65,8 @@ add_executable( gwallet
find_package(wxWidgets COMPONENTS core base adv xrc aui REQUIRED)
include(${wxWidgets_USE_FILE})

set(plugins "gwallet_transfer" "gwallet_sellasset" "gwallet_borrowasset" "gwallet_cancelorder")
set(plugins "gwallet_transfer" "gwallet_sellasset" "gwallet_borrowasset" "gwallet_cancelorder" "gwallet_setproxy"
"gwallet_getters")

target_link_libraries( gwallet
PRIVATE graphene_app graphene_net graphene_chain graphene_egenesis_brief graphene_utilities graphene_wallet fc
Expand Down
4 changes: 2 additions & 2 deletions gwallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

#include "include/wizards/registration.hpp"

#include "include/panels/info.hpp"
#include "include/panels/about.hpp"
#include "plugins/getters/include/info.hpp"
#include "plugins/getters/include/about.hpp"

#include "include/panels/cli.hpp"
#include "include/panels/wallet.hpp"
Expand Down
24 changes: 12 additions & 12 deletions panels/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,26 @@
#include "../plugins/sellasset/include/sellasset.hpp"
#include "../plugins/borrowasset/include/borrowasset.hpp"
#include "../plugins/cancelorder/include/cancelorder.hpp"
#include "../include/panels/setproxy.hpp"
#include "../include/panels/getcommitteemember.hpp"
#include "../include/panels/getaccounthistory.hpp"
#include "../include/panels/getorderbook.hpp"
#include "../include/panels/about.hpp"
#include "../include/panels/info.hpp"
#include "../include/panels/active_committee.hpp"
#include "../include/panels/active_witnesses.hpp"
#include "../plugins/setproxy/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 "../include/panels/createasset.hpp"
#include "../include/panels/getwitness.hpp"
#include "../include/panels/getaccount.hpp"
#include "../include/panels/getasset.hpp"
#include "../plugins/getters/include/getwitness.hpp"
#include "../plugins/getters/include/getaccount.hpp"
#include "../plugins/getters/include/getasset.hpp"
#include "../include/panels/issueasset.hpp"
#include "../include/panels/createhtlc.hpp"
#include "../include/panels/redeemhtlc.hpp"
#include "../include/panels/extendhtlc.hpp"
#include "../include/panels/gethtlc.hpp"
#include "../plugins/getters/include/gethtlc.hpp"
#include "../include/panels/updatefeedproducers.hpp"
#include "../include/panels/voteforwitness.hpp"

Expand Down
4 changes: 4 additions & 0 deletions plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ add_subdirectory( transfer )
add_subdirectory( sellasset )
add_subdirectory( borrowasset )
add_subdirectory( cancelorder )
add_subdirectory( setproxy )
add_subdirectory( getters )





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

add_library( gwallet_getters
getcommitteemember.cpp
getaccounthistory.cpp
getorderbook.cpp
about.cpp
info.cpp
active_committee.cpp
active_witnesses.cpp
getwitness.cpp
getaccount.cpp
getasset.cpp
gethtlc.cpp

)

target_link_libraries( gwallet_getters
PRIVATE graphene_app graphene_net graphene_chain graphene_egenesis_brief graphene_utilities graphene_wallet fc
${wxWidgets_LIBRARIES} ${CMAKE_DL_LIBS} ${PLATFORM_SPECIFIC_LIBS}
)
6 changes: 4 additions & 2 deletions panels/about.cpp → plugins/getters/about.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "../include/panels/about.hpp"
#include "../include/panels/wallet.hpp"
#include "include/about.hpp"

#include <panels/commands.hpp>
#include <panels/cli.hpp>

About::About(GWallet* gwallet) : wxScrolledWindow()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "../include/panels/active_committee.hpp"
#include "../include/panels/wallet.hpp"
#include "../include/panels/commands.hpp"
#include "include/active_committee.hpp"

#include <panels/commands.hpp>
#include <panels/cli.hpp>

ActiveCommittee::ActiveCommittee(GWallet* gwallet) : wxScrolledWindow()
{
Expand All @@ -10,6 +11,7 @@ ActiveCommittee::ActiveCommittee(GWallet* gwallet) : wxScrolledWindow()
wxBusyInfo wait(_("Please wait, updating active committee members info ..."));
wxTheApp->Yield();

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

response_grid->CreateGrid(0, 3);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "../include/panels/active_witnesses.hpp"
#include "../include/panels/wallet.hpp"
#include "../include/panels/commands.hpp"
#include "include/active_witnesses.hpp"

#include <panels/commands.hpp>
#include <panels/cli.hpp>

ActiveWitnesses::ActiveWitnesses(GWallet* gwallet) : wxScrolledWindow()
{
Expand All @@ -10,6 +11,7 @@ ActiveWitnesses::ActiveWitnesses(GWallet* gwallet) : wxScrolledWindow()
wxBusyInfo wait(_("Please wait, updating active witnesses info ..."));
wxTheApp->Yield();

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

SetScrollRate(1,1);
Expand Down
10 changes: 6 additions & 4 deletions panels/getaccount.cpp → plugins/getters/getaccount.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#include "../include/panels/getaccount.hpp"
#include "../include/panels/wallet.hpp"
#include "../include/panels/cli.hpp"
#include "../include/panels/commands.hpp"
#include "include/getaccount.hpp"

#include <panels/commands.hpp>
#include <panels/cli.hpp>

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

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

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

#include <panels/commands.hpp>
#include <panels/cli.hpp>

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

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

SetScrollRate(1,1);
Expand Down
10 changes: 6 additions & 4 deletions panels/getasset.cpp → plugins/getters/getasset.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#include "../include/panels/getasset.hpp"
#include "../include/panels/wallet.hpp"
#include "../include/panels/cli.hpp"
#include "../include/panels/commands.hpp"
#include "include/getasset.hpp"

#include <panels/commands.hpp>
#include <panels/cli.hpp>

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

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

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

#include <panels/commands.hpp>
#include <panels/cli.hpp>

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

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

SetScrollRate(1,1);
Expand Down
10 changes: 6 additions & 4 deletions panels/gethtlc.cpp → plugins/getters/gethtlc.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#include "../include/panels/gethtlc.hpp"
#include "../include/panels/wallet.hpp"
#include "../include/panels/cli.hpp"
#include "../include/panels/commands.hpp"
#include "include/gethtlc.hpp"

#include <panels/commands.hpp>
#include <panels/cli.hpp>

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

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

SetScrollRate(1,1);
Expand Down
10 changes: 6 additions & 4 deletions panels/getorderbook.cpp → plugins/getters/getorderbook.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#include "../include/panels/getorderbook.hpp"
#include "../include/panels/wallet.hpp"
#include "../include/panels/cli.hpp"
#include "../include/panels/commands.hpp"
#include "include/getorderbook.hpp"

#include <panels/commands.hpp>
#include <panels/cli.hpp>

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

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

SetScrollRate(1,1);
Expand Down
10 changes: 6 additions & 4 deletions panels/getwitness.cpp → plugins/getters/getwitness.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#include "../include/panels/getwitness.hpp"
#include "../include/panels/wallet.hpp"
#include "../include/panels/cli.hpp"
#include "../include/panels/commands.hpp"
#include "include/getwitness.hpp"

#include <panels/commands.hpp>
#include <panels/cli.hpp>

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

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

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

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

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

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

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

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

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

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

class GetAccount: public wxScrolledWindow
{
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 GetAccountHistory: public wxScrolledWindow
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <wx/numformatter.h>
#include <wx/xrc/xmlres.h>

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

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

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

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

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

class GetHtlc: public wxScrolledWindow
{
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 GetOrderBook: public wxScrolledWindow
{
Expand Down
Loading

0 comments on commit 36ac073

Please sign in to comment.