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 ability to integrate the client with desktop environment on Linux #38

Closed
wants to merge 3 commits 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
1 change: 1 addition & 0 deletions build_msvc/libbitcoin_qt/libbitcoin_qt.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<ClCompile Include="..\..\src\qt\createwalletdialog.cpp" />
<ClCompile Include="..\..\src\qt\csvmodelwriter.cpp" />
<ClCompile Include="..\..\src\qt\editaddressdialog.cpp" />
<ClCompile Include="..\..\src\qt\guifileutil.cpp" />
<ClCompile Include="..\..\src\qt\guiutil.cpp" />
<ClCompile Include="..\..\src\qt\intro.cpp" />
<ClCompile Include="..\..\src\qt\modaloverlay.cpp" />
Expand Down
2 changes: 2 additions & 0 deletions src/Makefile.qt.include
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ BITCOIN_QT_H = \
qt/csvmodelwriter.h \
qt/editaddressdialog.h \
qt/guiconstants.h \
qt/guifileutil.h \
qt/guiutil.h \
qt/intro.h \
qt/macdockiconhandler.h \
Expand Down Expand Up @@ -219,6 +220,7 @@ BITCOIN_QT_BASE_CPP = \
qt/bitcoinunits.cpp \
qt/clientmodel.cpp \
qt/csvmodelwriter.cpp \
qt/guifileutil.cpp \
qt/guiutil.cpp \
qt/intro.cpp \
qt/modaloverlay.cpp \
Expand Down
1 change: 1 addition & 0 deletions src/qt/addressbookpage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <qt/addresstablemodel.h>
#include <qt/csvmodelwriter.h>
#include <qt/editaddressdialog.h>
#include <qt/guifileutil.h>
#include <qt/guiutil.h>
#include <qt/platformstyle.h>

Expand Down
16 changes: 16 additions & 0 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <qt/clientmodel.h>
#include <qt/createwalletdialog.h>
#include <qt/guiconstants.h>
#include <qt/guifileutil.h>
#include <qt/guiutil.h>
#include <qt/modaloverlay.h>
#include <qt/networkstyle.h>
Expand Down Expand Up @@ -479,6 +480,21 @@ void BitcoinGUI::createMenuBar()
settings->addSeparator();
}
settings->addAction(optionsAction);
#ifdef Q_OS_LINUX
if (gArgs.GetChainName() != CBaseChainParams::REGTEST) {
settings->addSeparator();
QAction* integrate_with_DE = settings->addAction(tr("&Integrate with desktop environment"));
connect(integrate_with_DE, &QAction::triggered, [this] {
if (GUIUtil::IntegrateWithDesktopEnvironment(m_network_style->getTrayAndWindowIcon())) {
QMessageBox::information(this, tr("Application registered"),
tr("Now you are able to launch " PACKAGE_NAME " from the desktop menu."));
} else {
QMessageBox::warning(this, tr("Application registration failed"),
tr("" PACKAGE_NAME " failed integration with your desktop environment."));
}
});
}
#endif // Q_OS_LINUX

QMenu* window_menu = appMenuBar->addMenu(tr("&Window"));

Expand Down
2 changes: 1 addition & 1 deletion src/qt/clientmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <qt/bantablemodel.h>
#include <qt/guiconstants.h>
#include <qt/guiutil.h>
#include <qt/guifileutil.h>
#include <qt/peertablemodel.h>

#include <clientversion.h>
Expand Down
Loading