Resending the patch.

On Wed, Dec 17, 2014 at 10:27 AM, Dirk Hohndel <[email protected]> wrote:
>
> On Wed, Dec 17, 2014 at 10:19:21AM +0530, Nikhil Bharadwaj wrote:
> >
> > Okay, I'm sorry. I didnt know that. Okay Ill change it and send it to you
> > once you finish releasing 4.3
>
> Why would you be sorry? I'm thrilled that you are contributing and working
> on making the Subsurface user experience better. That is wonderful!
>
> I apologize that the timing is just unfortunate, otherwise I would of
> course have accepted your patches already...
>
> /D
>


-- 
Nikhil Bharadwaj
From be92f5c121520434e6919ec4e8382e4038a75205 Mon Sep 17 00:00:00 2001
From: nikhil <[email protected]>
Date: Wed, 17 Dec 2014 09:29:41 +0530
Subject: [PATCH 3/3] Added the option of opening User Survey form explicitly

Earlier, there was no option for the user to explicitly open the User Survey
form. This has been corrected by placing an option in the "Help" menu by which
the user can explicity open the User Survey form.

Signed-off-by: Nikhil Bharadwaj Gosala <[email protected]>
---
 qt-ui/mainwindow.cpp | 26 ++++++++++++++++++++++++++
 qt-ui/mainwindow.h   |  1 +
 qt-ui/mainwindow.ui  |  8 +++++++-
 3 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index acf520d..1765d4c 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -55,6 +55,9 @@
 #ifndef NO_USERMANUAL
 #include "usermanual.h"
 #endif
+#ifndef NO_USERSURVEY
+#include "usersurvey.h"
+#endif
 #include <QNetworkProxy>
 
 MainWindow *MainWindow::m_Instance = NULL;
@@ -118,6 +121,10 @@ MainWindow::MainWindow() : QMainWindow(),
 #ifdef NO_USERMANUAL
 	ui.menuHelp->removeAction(ui.actionUserManual);
 #endif
+#ifdef NO_USERSURVEY
+	ui.menuHelp->removeAction(ui.actionUserSurvey);
+#endif 
+
 #ifdef NO_PRINTING
 	ui.menuFile->removeAction(ui.actionPrint);
 #endif
@@ -745,6 +752,16 @@ void MainWindow::on_actionUserManual_triggered()
 #endif
 }
 
+void MainWindow::on_actionUserSurvey_triggered()
+{
+#ifndef NO_USERSURVEY
+	if(!survey) {
+		survey = new UserSurvey();
+	}
+	survey->show();
+#endif
+}
+
 QString MainWindow::filter()
 {
 	QString f;
@@ -945,6 +962,15 @@ void MainWindow::closeEvent(QCloseEvent *event)
 	}
 #endif
 
+
+#ifndef NO_USERSURVEY
+	if (survey && survey->isVisible()) {
+		survey->close();
+		survey->deleteLater();
+	}
+#endif
+
+
 	if (unsaved_changes() && (askSaveChanges() == false)) {
 		event->ignore();
 		return;
diff --git a/qt-ui/mainwindow.h b/qt-ui/mainwindow.h
index 26f4176..8a9d6f3 100644
--- a/qt-ui/mainwindow.h
+++ b/qt-ui/mainwindow.h
@@ -118,6 +118,7 @@ slots:
 	/* other menu actions */
 	void on_actionAboutSubsurface_triggered();
 	void on_actionUserManual_triggered();
+	void on_actionUserSurvey_triggered();
 	void on_actionDivePlanner_triggered();
 	void on_actionReplanDive_triggered();
 	void on_action_Check_for_Updates_triggered();
diff --git a/qt-ui/mainwindow.ui b/qt-ui/mainwindow.ui
index ecbd4d7..08c8d34 100644
--- a/qt-ui/mainwindow.ui
+++ b/qt-ui/mainwindow.ui
@@ -249,7 +249,7 @@ p, li { white-space: pre-wrap; }
      <x>0</x>
      <y>0</y>
      <width>1682</width>
-     <height>36</height>
+     <height>27</height>
     </rect>
    </property>
    <widget class="QMenu" name="menuFile">
@@ -314,6 +314,7 @@ p, li { white-space: pre-wrap; }
     <addaction name="actionAboutSubsurface"/>
     <addaction name="action_Check_for_Updates"/>
     <addaction name="actionUserManual"/>
+    <addaction name="actionUserSurvey"/>
    </widget>
    <widget class="QMenu" name="menuImport">
     <property name="title">
@@ -861,6 +862,11 @@ p, li { white-space: pre-wrap; }
     <string>Toggle tissue graph</string>
    </property>
   </action>
+  <action name="actionUserSurvey">
+   <property name="text">
+    <string>User &amp;survey</string>
+   </property>
+  </action>
  </widget>
  <customwidgets>
   <customwidget>
-- 
2.1.0

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to