summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <mutlaqja@ikarustech.com>2016-06-02 06:59:39 (GMT)
committerArtem Fedoskin <afedoskin3@gmail.com>2016-06-05 22:24:47 (GMT)
commit16eab86d4065be6d71f33d84daed8cacdcce32ce (patch)
treeb2e7c34da918c907c61fb8f38cac3608bda8927f
parent0a80604d28ac564c35b71efe20ef3d320a6609f6 (diff)
Fix FITSViewer support under Windows, and include all actions
-rw-r--r--kstars/fitsviewer/fitsviewer.cpp18
-rw-r--r--kstars/kstarsactions.cpp8
-rw-r--r--kstars/kstarsui-win.rc34
3 files changed, 44 insertions, 16 deletions
diff --git a/kstars/fitsviewer/fitsviewer.cpp b/kstars/fitsviewer/fitsviewer.cpp
index efb299f..9628f22 100644
--- a/kstars/fitsviewer/fitsviewer.cpp
+++ b/kstars/fitsviewer/fitsviewer.cpp
@@ -223,7 +223,7 @@ void FITSViewer::closeEvent(QCloseEvent * /*event*/)
QAction *a = KStars::Instance()->actionCollection()->action( "show_fits_viewer" );
QList<FITSViewer *> viewers = KStars::Instance()->findChildren<FITSViewer *>();
- if (viewers.count() == 1)
+ if (a && viewers.count() == 1)
{
a->setEnabled(false);
a->setChecked(false);
@@ -233,17 +233,23 @@ void FITSViewer::closeEvent(QCloseEvent * /*event*/)
void FITSViewer::hideEvent(QHideEvent * /*event*/)
{
QAction *a = KStars::Instance()->actionCollection()->action( "show_fits_viewer" );
- QList<FITSViewer *> viewers = KStars::Instance()->findChildren<FITSViewer *>();
+ if (a)
+ {
+ QList<FITSViewer *> viewers = KStars::Instance()->findChildren<FITSViewer *>();
- if (viewers.count() == 1)
- a->setChecked(false);
+ if (viewers.count() == 1)
+ a->setChecked(false);
+ }
}
void FITSViewer::showEvent(QShowEvent * /*event*/)
{
QAction *a = KStars::Instance()->actionCollection()->action( "show_fits_viewer" );
- a->setEnabled(true);
- a->setChecked(true);
+ if (a)
+ {
+ a->setEnabled(true);
+ a->setChecked(true);
+ }
}
int FITSViewer::addFITS(const QUrl *imageName, FITSMode mode, FITSScale filter, const QString &previewText, bool silent)
diff --git a/kstars/kstarsactions.cpp b/kstars/kstarsactions.cpp
index d8b7718..bae2993 100644
--- a/kstars/kstarsactions.cpp
+++ b/kstars/kstarsactions.cpp
@@ -788,6 +788,14 @@ void KStars::slotOpenFITS()
if (fileURL.isEmpty())
return;
+ // Workaround for "/C:/foo/bar" Qt Bug
+ // Reported as fixed in Qt 5.6
+ // Emerged Qt 5.5 with patch is not working
+ #ifdef Q_OS_WIN
+ if (fileURL.path().startsWith("/"))
+ fileURL.setPath(fileURL.path().right(fileURL.path().count()-1));
+ #endif
+
// Remember last directory
path.setUrl(fileURL.path());
diff --git a/kstars/kstarsui-win.rc b/kstars/kstarsui-win.rc
index d6708fd..7ad2a24 100644
--- a/kstars/kstarsui-win.rc
+++ b/kstars/kstarsui-win.rc
@@ -59,6 +59,13 @@
<Menu name="tools" noMerge="1"><text>&amp;Tools</text>
<Action name="astrocalculator" />
+ <Menu name="devices" noMerge="1"><text>&amp;Devices</text>
+ <Action name="telescope_wizard" />
+ <Action name="device_manager" />
+ <Separator />
+ <Action name="indi_cpl" />
+ </Menu>
+
<Action name="skycalendar" />
<Action name="moonphasetool" />
<Action name="altitude_vs_time" />
@@ -67,6 +74,7 @@
<Action name="glossary" />
<Action name="scriptbuilder" />
<Action name="solarsystem" />
+ <Action name="ekos" />
<Action name="jmoontool" />
<Action name="flagmanager" />
</Menu>
@@ -83,7 +91,7 @@
<Menu name="observation" noMerge="1"><text>&amp;Observation</text>
<Action name="obslist" />
<Action name="execute" />
- </Menu>
+ </Menu>
<Menu name="settings" noMerge="1"><text>&amp;Settings</text>
<Menu name="infopanel"><text>&amp;Info Boxes</text>
@@ -93,12 +101,7 @@
<Action name="show_focus_box" />
<Action name="show_location_box" />
</Menu>
- <Menu name="toolbars"><text>&amp;Toolbars</text>
- <Action name="show_mainToolBar" />
- <Action name="show_viewToolBar" />
- <Separator />
- <Action name="configure_toolbars" />
- </Menu>
+ <Merge name="StandardToolBarMenuHandler" />
<Menu name="statusbar"><text>&amp;Statusbar</text>
<Action name="show_statusBar" />
<Separator />
@@ -110,14 +113,16 @@
<Action name="fovsymbols" /> <!-- This is a KMenuAction-->
<Action name="opengl" />
<Action name="artificialhorizon" />
- <Separator />
- <Menu name="config_oal"><text>Configure Observation &amp;Logging</text>
+ <Separator />
+ <Menu name="config_oal"><text>Configure Observation &amp;Logging</text>
<Action name="equipmentwriter"/>
<Action name="manageobserver"/>
</Menu>
<Separator />
<Action name="geolocation" />
- <Separator />
+ <Separator />
+ <Action name="options_configure_keybinding"/>
+ <Action name="options_configure_toolbars"/>
<Action name="configure" />
<Action name="startwizard" />
</Menu>
@@ -169,4 +174,13 @@
<Action name="show_horizontal_grid" />
<Action name="show_horizon" />
</ToolBar>
+
+<ToolBar noMerge="1" name="INDIToolBar" iconText="icononly">
+ <text>INDI Toolbar</text>
+ <Action name="show_ekos" />
+ <Action name="show_control_panel" />
+ <Action name="show_fits_viewer" />
+ <Action name="show_device_manager" />
+</ToolBar>
+
</kpartgui>