Merge lp:~cardinot/stellarium/configGUI into lp:stellarium

Proposed by Marcos Cardinot
Status: Merged
Merged at revision: 6626
Proposed branch: lp:~cardinot/stellarium/configGUI
Merge into: lp:stellarium
Diff against target: 20 lines (+2/-1)
1 file modified
src/gui/ConfigurationDialog.cpp (+2/-1)
To merge this branch: bzr merge lp:~cardinot/stellarium/configGUI
Reviewer Review Type Date Requested Status
Alexander Wolf Approve
Review via email: mp+210097@code.launchpad.net

Description of the change

It's just a new way to open the configGUI of a loaded plugin.

F2->Plugins->(dbclick on a loaded plugin)

To post a comment you must log in.
Revision history for this message
Alexander Wolf (alexwolf) wrote :

In current code this part - QObject::sender()->objectName()=="pluginsListWidget" - don't need for work. Why you use it?

review: Needs Information
Revision history for this message
Alexander Wolf (alexwolf) :
review: Needs Information
Revision history for this message
Marcos Cardinot (cardinot) wrote :

> In current code this part -
> QObject::sender()->objectName()=="pluginsListWidget" - don't need for work.
> Why you use it?

Without this modification a warning is send whenever the user doubleclick on a plugin not loaded.
IMHO it could unnecessarily pollute the output terminal...

Revision history for this message
Alexander Wolf (alexwolf) wrote :

OK

Revision history for this message
Alexander Wolf (alexwolf) wrote :

This patch introduces the opening GUI of plugin via double click event in plugins list. It can be good solution for alternative for opening dialogs, plus introduce short way for it.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/gui/ConfigurationDialog.cpp'
2--- src/gui/ConfigurationDialog.cpp 2014-02-27 16:15:23 +0000
3+++ src/gui/ConfigurationDialog.cpp 2014-03-09 20:22:27 +0000
4@@ -272,6 +272,7 @@
5 // plugins control
6 connect(ui->pluginsListWidget, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), this, SLOT(pluginsSelectionChanged(QListWidgetItem*, QListWidgetItem*)));
7 connect(ui->pluginLoadAtStartupCheckBox, SIGNAL(stateChanged(int)), this, SLOT(loadAtStartupChanged(int)));
8+ connect(ui->pluginsListWidget, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(pluginConfigureCurrentSelection()));
9 connect(ui->pluginConfigureButton, SIGNAL(clicked()), this, SLOT(pluginConfigureCurrentSelection()));
10 populatePluginsList();
11
12@@ -755,7 +756,7 @@
13 {
14 if (id == desc.info.id)
15 {
16- StelModule* pmod = moduleMgr.getModule(desc.info.id);
17+ StelModule* pmod = moduleMgr.getModule(desc.info.id, QObject::sender()->objectName()=="pluginsListWidget");
18 if (pmod != NULL)
19 {
20 pmod->configureGui(true);