← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 3336: Show more details in the plugins config; Add the plugin repo addy to the links list

 

------------------------------------------------------------
revno: 3336
committer: eMTee <emtee11@xxxxxxxxx>
branch nick: dcplusplus
timestamp: Mon 2013-08-05 22:16:30 +0200
message:
  Show more details in the plugins config; Add the plugin repo addy to the links list
modified:
  help/links.html
  win32/MainWindow.cpp
  win32/MainWindow.h
  win32/PluginPage.cpp


--
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 'help/links.html'
--- help/links.html	2011-10-01 14:59:18 +0000
+++ help/links.html	2013-08-05 20:16:30 +0000
@@ -41,6 +41,14 @@
       <td>Donate (paypal)</td>
 	  <td><untranslated><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=arnetheduck%40gmail%2ecom&item_name=DCPlusPlus&no_shipping=1&return=http%3a%2f%2fdcplusplus%2esf%2enet%2f&cancel_return=http%3a%2f%2fdcplusplus%2esf%2enet%2f&cn=Greeting&tax=0&currency_code=EUR&bn=PP%2dDonationsBF&charset=UTF%2d8"; target="_blank" class="external">https://www.paypal.com/ ...</a></untranslated></td>
     </tr>
+    <tr>
+      <td>Blog</td>
+      <td><untranslated><a href="http://dcpp.wordpress.com"; target="_blank" class="external">http://dcpp.wordpress.com</a></untranslated></td>
+    </tr>
+    <tr>
+      <td>DC Plugin repository</td>
+      <td><untranslated><a href="http://dcplusplus.sourceforge.net/plugins/"; target="_blank" class="external">http://dcplusplus.sourceforge.net/plugins/</a></untranslated></td>
+    </tr>
   </tbody>
 </table>
 </body>

=== modified file 'win32/MainWindow.cpp'
--- win32/MainWindow.cpp	2013-07-22 21:14:10 +0000
+++ win32/MainWindow.cpp	2013-08-05 20:16:30 +0000
@@ -129,6 +129,7 @@
 	links.donate = _T("https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=arnetheduck%40gmail%2ecom&item_name=DCPlusPlus&no_shipping=1&return=http%3a%2f%2fdcplusplus%2esf%2enet%2f&cancel_return=http%3a%2f%2fdcplusplus%2esf%2enet%2f&cn=Greeting&tax=0&currency_code=EUR&bn=PP%2dDonationsBF&charset=UTF%2d8";);
 	links.blog = _T("http://dcpp.wordpress.com";);
 	links.community = _T("http://dcbase.org";);
+	links.pluginrepo = links.homepage + _T("plugins/");
 
 	initWindow();
 	initTabs();
@@ -403,6 +404,7 @@
 		help->appendItem(T_("Donate (paypal)"), [this] { WinUtil::openLink(links.donate); }, WinUtil::menuIcon(IDI_DONATE));
 		help->appendItem(T_("Blog"), [this] { WinUtil::openLink(links.blog); });
 		help->appendItem(T_("Community news"), [this] { WinUtil::openLink(links.community); });
+		help->appendItem(T_("Plugin repository"), [this] { WinUtil::openLink(links.pluginrepo); });
 	}
 
 	mainMenu->setMenu();

=== modified file 'win32/MainWindow.h'
--- win32/MainWindow.h	2013-06-03 12:14:18 +0000
+++ win32/MainWindow.h	2013-08-05 20:16:30 +0000
@@ -111,6 +111,7 @@
 		tstring donate;
 		tstring blog;
 		tstring community;
+		tstring pluginrepo;
 	} links;
 
 	enum {

=== modified file 'win32/PluginPage.cpp'
--- win32/PluginPage.cpp	2013-07-22 21:14:10 +0000
+++ win32/PluginPage.cpp	2013-08-05 20:16:30 +0000
@@ -132,7 +132,13 @@
 		pluginInfo->setSpacing(grid->getSpacing());
 	}
 
-	grid->addChild(Label::Seed(str(TF_("Some plugins may require you to restart %1%") % Text::toT(APPNAME))));
+	{
+		auto cur = grid->addChild(Grid::Seed(1, 2));
+		cur->column(0).mode = GridInfo::FILL;
+		cur->column(1).align = GridInfo::BOTTOM_RIGHT;
+		cur->addChild(Label::Seed(str(TF_("Some plugins may require you to restart %1%") % Text::toT(APPNAME))));
+		cur->addChild(Link::Seed(_T("<a href=\"http://dcplusplus.sourceforge.net/plugins/\";>") + T_("Visit the DC plugin repository") + _T("</a>")));
+	}
 
 	WinUtil::makeColumns(plugins, columns, COLUMN_COUNT);
 
@@ -193,29 +199,29 @@
 	auto children = pluginInfo->getChildren<Control>();
 	boost::for_each(std::vector<Control*>(children.first, children.second), [](Control* w) { w->close(); });
 
+	pluginInfo->addRow(GridInfo(0, GridInfo::FILL, GridInfo::STRETCH));
+
 	if(plugins->countSelected() != 1) {
-		pluginInfo->addRow(GridInfo(0, GridInfo::FILL, GridInfo::STRETCH));
 		pluginInfo->addChild(Label::Seed(T_("No plugin has been selected")));
 		return;
 	}
 
-	pluginInfo->addRow(GridInfo(0, GridInfo::FILL, GridInfo::STRETCH));
 	auto infoGrid = pluginInfo->addChild(Grid::Seed(0, 2));
 	infoGrid->column(1).mode = GridInfo::FILL;
 	infoGrid->setSpacing(pluginInfo->getSpacing());
 
 	// similar to PluginInfoDlg.cpp
 
-	enum Type { Name, Version, Description, Author, Website };
+	enum Type { Name, Version, Description, Author, Website, FileName, Path };
 
 	auto addInfo = [this, infoGrid](tstring name, const string& value, Type type) {
-		if(type == Description) {
+		if(type == Description || type == Path) {
 			infoGrid->addRow(GridInfo(0, GridInfo::FILL, GridInfo::STRETCH));
 		} else {
 			infoGrid->addRow();
 		}
 		infoGrid->addChild(Label::Seed(name));
-		if(type == Website && !value.empty()) {
+		if((type == Website || type == Path) && !value.empty()) {
 			infoGrid->addChild(Link::Seed(Text::toT(value), true));
 		} else {
 			infoGrid->addChild(Label::Seed(value.empty() ?
@@ -230,6 +236,8 @@
 	addInfo(T_("Description: "), plugin.description, Description);
 	addInfo(T_("Author: "), plugin.author, Author);
 	addInfo(T_("Website: "), plugin.website, Website);
+	addInfo(T_("File name: "), Util::getFileName(plugin.path), FileName);
+	addInfo(T_("Installation path: "), Util::getFilePath(plugin.path), Path);
 }
 
 bool PluginPage::handleContextMenu(dwt::ScreenCoordinate pt) {