diff libgui/src/dialog.h @ 16565:e4b94abfeb96

use generic dialog for cd or addpath question * dialog.h, dialog.cc (cd_or_addpath_dialog): Delete class. (QUIWidgetCreator::get_dialog_button): Return QString, not QString*. Change all uses. (QUIWidgetCreator::signal_debug_cd_or_addpath): Delete. (QUIWidgetCreator::create_debug_cd_or_addpath_dialog): Delete. * file-editor-tab.cc (file_editor_tab::file_in_path): Also use same_file to compare curr_dir and info.path. * main-window.h, main-window.cc (main_window::handle_create_debug_cd_or_addpath_dialog): Delete. (main_window::connect_uiwidget_links): Delete connection from uiwidget_creator::create_debug_cd_or_addpath_dialog to main_window::handle_create_debug_cd_or_addpath_dialog. * octave-qt-link.cc (octave_qt_link::do_debug_cd_or_addpath_error): Use generic dialog for cd or addpath question.
author John W. Eaton <jwe@octave.org>
date Thu, 25 Apr 2013 00:11:01 -0400
parents 6ae555fc8c43
children 7f8db1942dc0
line wrap: on
line diff
--- a/libgui/src/dialog.h	Thu Apr 25 00:09:54 2013 -0400
+++ b/libgui/src/dialog.h	Thu Apr 25 00:11:01 2013 -0400
@@ -71,7 +71,7 @@
 
   int get_dialog_result (void) { return dialog_result; }
 
-  const QString *get_dialog_button (void) { return &dialog_button; }
+  QString get_dialog_button (void) { return dialog_button; }
 
   bool signal_listview (const QStringList& list, const QString& mode,
                         int wd, int ht, const QList<int>& initial,
@@ -101,17 +101,6 @@
     return true;
   };
 
-  // The debug dialog functionality may not really belong here, but it
-  // seems like the easiest thing to do at the moment.
-
-  bool signal_debug_cd_or_addpath (const QString& file, const QString& dir,
-                                   bool addpath_option)
-  {
-    emit create_debug_cd_or_addpath_dialog (file, dir, addpath_option);
-
-    return true;
-  }
-
   const QStringList *get_string_list (void) { return string_list; }
   
   void wait (void)
@@ -133,8 +122,6 @@
                            const QFloatList&, const QFloatList&,
                            const QStringList&);
 
-  void create_debug_cd_or_addpath_dialog (const QString&, const QString&, bool);
-
 public slots:
 
   void dialog_button_clicked (QAbstractButton *button);
@@ -240,24 +227,4 @@
   void reject (void);
 };
 
-class cd_or_addpath_dialog : public QDialog
-{
-  Q_OBJECT
-
-public:
-
-  cd_or_addpath_dialog (const QString& file, const QString& dir,
-                        bool addpath_option);
-
-public slots:
-
-  void buttonCd_clicked (void);
-
-  void buttonAddpath_clicked (void);
-
-  void buttonCancel_clicked (void);
-
-  void reject (void);
-};
-
 #endif