linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #07167
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 3323: Icons in the plugin menu to show whether they are enabled
------------------------------------------------------------
revno: 3323
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Fri 2013-07-19 18:24:10 +0200
message:
Icons in the plugin menu to show whether they are enabled
renamed:
res/GrantSlotOff.ico => res/BallRed.ico
res/GrantSlotOn.ico => res/BallGreen.ico
modified:
changelog.txt
win32/DCPlusPlus.rc
win32/MainWindow.cpp
win32/PrivateFrame.cpp
win32/PrivateFrame.h
win32/UsersFrame.cpp
win32/resource.h
--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'changelog.txt'
--- changelog.txt 2013-07-05 21:25:29 +0000
+++ changelog.txt 2013-07-19 16:24:10 +0000
@@ -3,6 +3,7 @@
* [L#1194299] Prevent races when closing a connection (maksis, poy)
* [ADC] Send the LC (locale) parameter in INF
* [L#1197557] Fix collateral row deletions in transfers & searches (poy)
+* Icons in the plugin menu to show whether they are enabled (poy)
-- 0.825 2013-06-18 --
* [L#1191099] Group partial file list uploads to avoid a crash (poy)
=== renamed file 'res/GrantSlotOn.ico' => 'res/BallGreen.ico'
=== renamed file 'res/GrantSlotOff.ico' => 'res/BallRed.ico'
=== modified file 'win32/DCPlusPlus.rc'
--- win32/DCPlusPlus.rc 2013-06-17 21:09:16 +0000
+++ win32/DCPlusPlus.rc 2013-07-19 16:24:10 +0000
@@ -72,8 +72,8 @@
IDI_EXEC ICON "res/Exec.ico"
IDI_FAVORITE_USER_ON ICON "res/FavoriteUserOn.ico"
IDI_FAVORITE_USER_OFF ICON "res/FavoriteUserOff.ico"
-IDI_GRANT_SLOT_ON ICON "res/GrantSlotOn.ico"
-IDI_GRANT_SLOT_OFF ICON "res/GrantSlotOff.ico"
+IDI_GREEN_BALL ICON "res/BallGreen.ico"
+IDI_RED_BALL ICON "res/BallRed.ico"
IDI_SLOTS_FULL ICON "res/SlotsFull.ico"
IDI_ADVANCED ICON "res/Advanced.ico"
IDI_CLOCK ICON "res/Clock.ico"
=== modified file 'win32/MainWindow.cpp'
--- win32/MainWindow.cpp 2013-07-16 16:49:11 +0000
+++ win32/MainWindow.cpp 2013-07-19 16:24:10 +0000
@@ -708,11 +708,13 @@
}
for(auto& guid: plugins) {
- auto sub = menu->appendPopup(Text::toT(PluginManager::getInstance()->getPlugin(guid).name));
-
const auto enabled = PluginManager::getInstance()->isLoaded(guid);
- sub->appendItem(T_("Enable"), [this, guid] { PluginUtils::enablePlugin(guid, this); }, nullptr, !enabled);
- sub->appendItem(T_("Disable"), [this, guid] { PluginUtils::disablePlugin(guid, this); }, nullptr, enabled);
+
+ auto sub = menu->appendPopup(Text::toT(PluginManager::getInstance()->getPlugin(guid).name),
+ WinUtil::menuIcon(enabled ? IDI_GREEN_BALL : IDI_RED_BALL));
+
+ sub->appendItem(T_("Enable"), [this, guid] { PluginUtils::enablePlugin(guid, this); }, WinUtil::menuIcon(IDI_GREEN_BALL), !enabled);
+ sub->appendItem(T_("Disable"), [this, guid] { PluginUtils::disablePlugin(guid, this); }, WinUtil::menuIcon(IDI_RED_BALL), enabled);
sub->appendSeparator();
sub->appendItem(T_("Configure"), [this, guid] { PluginUtils::configPlugin(guid, this); }, nullptr, enabled);
=== modified file 'win32/PrivateFrame.cpp'
--- win32/PrivateFrame.cpp 2013-01-19 14:52:37 +0000
+++ win32/PrivateFrame.cpp 2013-07-19 16:24:10 +0000
@@ -142,7 +142,6 @@
grid(0),
hubGrid(0),
hubBox(0),
-initialHub(replyTo_.hint),
replyTo(replyTo_),
online(replyTo.getUser().user->isOnline())
{
@@ -160,7 +159,8 @@
}
hubBox = hubGrid->addChild(WinUtil::Seeds::comboBox);
addWidget(hubBox);
- hubBox->onSelectionChanged([this] {
+ auto initialHub = replyTo.getUser().hint;
+ hubBox->onSelectionChanged([this, initialHub] {
replyTo.getUser().hint = hubs[hubBox->getSelected()].first;
if(replyTo.getUser().hint.empty())
replyTo.getUser().hint = initialHub;
=== modified file 'win32/PrivateFrame.h'
--- win32/PrivateFrame.h 2013-01-18 21:28:38 +0000
+++ win32/PrivateFrame.h 2013-07-19 16:24:10 +0000
@@ -76,7 +76,6 @@
ComboBoxPtr hubBox;
StringPairList hubs;
- string initialHub;
tstring hubName;
ParamMap ucLineParams;
=== modified file 'win32/UsersFrame.cpp'
--- win32/UsersFrame.cpp 2013-03-16 14:57:07 +0000
+++ win32/UsersFrame.cpp 2013-07-19 16:24:10 +0000
@@ -127,8 +127,8 @@
userIcons = dwt::ImageListPtr(new dwt::ImageList(size));
userIcons->add(dwt::Icon(IDI_FAVORITE_USER_OFF, size));
userIcons->add(dwt::Icon(IDI_FAVORITE_USER_ON, size));
- userIcons->add(dwt::Icon(IDI_GRANT_SLOT_OFF, size));
- userIcons->add(dwt::Icon(IDI_GRANT_SLOT_ON, size));
+ userIcons->add(dwt::Icon(IDI_RED_BALL, size));
+ userIcons->add(dwt::Icon(IDI_GREEN_BALL, size));
}
WidgetUsers::Seed cs(WinUtil::Seeds::table);
=== modified file 'win32/resource.h'
--- win32/resource.h 2013-01-24 22:53:46 +0000
+++ win32/resource.h 2013-07-19 16:24:10 +0000
@@ -60,8 +60,8 @@
#define IDI_EXEC 154
#define IDI_FAVORITE_USER_ON 155
#define IDI_FAVORITE_USER_OFF 156
-#define IDI_GRANT_SLOT_ON 157
-#define IDI_GRANT_SLOT_OFF 158
+#define IDI_GREEN_BALL 157
+#define IDI_RED_BALL 158
#define IDI_SLOTS_FULL 159
#define IDI_ADVANCED 160
#define IDI_CLOCK 161