changeset 19612:c8cb111e727e

maint: Periodic merge of gui-release to default.
author John W. Eaton <jwe@octave.org>
date Wed, 14 Jan 2015 13:54:28 -0500
parents f64cdbe11621 (current diff) 6561179c6c22 (diff)
children 0cc52d752f99
files libgui/src/main-window.cc libgui/src/main-window.h
diffstat 2 files changed, 0 insertions(+), 179 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/main-window.cc	Tue Jan 13 22:11:45 2015 -0800
+++ b/libgui/src/main-window.cc	Wed Jan 14 13:54:28 2015 -0500
@@ -1277,8 +1277,6 @@
 
   construct_tool_bar ();
 
-  construct_warning_bar ();
-
   connect (qApp, SIGNAL (aboutToQuit ()),
            this, SLOT (prepare_to_exit ()));
 
@@ -1891,174 +1889,6 @@
 }
 
 void
-main_window::construct_warning_bar (void)
-{
-  QSettings *settings = resource_manager::get_settings ();
-
-  if (settings
-      && settings->value ("General/hide_new_gui_warning", false).toBool ())
-    {
-      construct_gui_info_button ();
-
-      return;
-    }
-
-  _warning_bar = new QDockWidget (this);
-  _warning_bar->setAttribute (Qt::WA_DeleteOnClose);
-
-  QFrame *box = new QFrame (_warning_bar);
-
-  QLabel *icon = new QLabel (box);
-  QIcon warning_icon
-    = QIcon::fromTheme ("dialog-warning",
-                        QIcon (":/actions/icons/warning.png"));
-  QPixmap icon_pixmap = warning_icon.pixmap (QSize (32, 32));
-  icon->setPixmap (icon_pixmap);
-
-  QTextBrowser *msg = new QTextBrowser (box);
-  msg->setOpenExternalLinks (true);
-  msg->setText
-    (tr ("<strong>You are using a release candidate of Octave's experimental GUI.</strong>  "
-         "Octave is under continuous improvement and the GUI will be the "
-         "default interface for the 4.0 release.  For more information, "
-         "select the \"Release Notes\" item in the \"News\" menu of the GUI, "
-         "or visit <a href=\"http://octave.org\">http://octave.org</a>."));
-
-  msg->setStyleSheet ("background-color: #ffd97f; color: black; margin 4px;");
-  msg->setMinimumWidth (100);
-  msg->setMinimumHeight (60);
-  msg->setMaximumHeight (80);
-  msg->setSizePolicy (QSizePolicy (QSizePolicy::Expanding,
-                                   QSizePolicy::Minimum));
-
-  QPushButton *info_button = new QPushButton (tr ("More Info"), box);
-  QPushButton *hide_button = new QPushButton (tr ("Hide"), box);
-
-  connect (info_button, SIGNAL (clicked ()),
-           this, SLOT (show_gui_info ()));
-
-  connect (hide_button, SIGNAL (clicked ()),
-           this, SLOT (hide_warning_bar ()));
-
-  QVBoxLayout *button_layout = new QVBoxLayout;
-
-  button_layout->addWidget (info_button);
-  button_layout->addWidget (hide_button);
-
-  QHBoxLayout *icon_and_message = new QHBoxLayout;
-
-  icon_and_message->addWidget (icon);
-  icon_and_message->addSpacing (10);
-  icon_and_message->addWidget (msg);
-  icon_and_message->addSpacing (10);
-  icon_and_message->addLayout (button_layout);
-
-  icon_and_message->setAlignment (hide_button, Qt::AlignTop);
-
-  box->setFrameStyle (QFrame::Box);
-  box->setLineWidth (2);
-  box->setMaximumWidth (1000);
-  box->adjustSize ();
-  box->setLayout (icon_and_message);
-
-  _warning_bar->setFeatures (QDockWidget::NoDockWidgetFeatures);
-  _warning_bar->setObjectName ("WarningToolBar");
-  _warning_bar->setWidget (box);
-
-  setCorner (Qt::TopLeftCorner, Qt::TopDockWidgetArea);
-  setCorner (Qt::TopRightCorner, Qt::TopDockWidgetArea);
-
-  addDockWidget (Qt::TopDockWidgetArea, _warning_bar);
-};
-
-void
-main_window::construct_gui_info_button (void)
-{
-  QIcon warning_icon
-    = QIcon::fromTheme ("dialog-warning",
-                        QIcon (":/actions/icons/warning.png"));
-
-  _gui_info_button
-    = new QPushButton (warning_icon, tr ("Experimental GUI Info"));
-
-  _main_tool_bar->addWidget (_gui_info_button);
-
-  connect (_gui_info_button, SIGNAL (clicked ()),
-           this, SLOT (show_gui_info ()));
-}
-
-void
-main_window::hide_warning_bar (void)
-{
-  QSettings *settings = resource_manager::get_settings ();
-
-  if (settings)
-    {
-      settings->setValue ("General/hide_new_gui_warning", true);
-
-      settings->sync ();
-    }
-
-  removeDockWidget (_warning_bar);
-
-  construct_gui_info_button ();
-}
-
-void
-main_window::show_gui_info (void)
-{
-  QString gui_info
-    (QObject::tr ("<p><strong>A Note about Octave's New GUI</strong></p>"
-         "<p>One of the biggest new features for Octave 3.8 is a graphical "
-         "user interface.  It is the one thing that users have requested "
-         "most often over the last few years and now it is almost ready.  "
-         "But because it is not quite as polished as we would like, we "
-         "have decided to wait until the 4.0.x release series before "
-         "making the GUI the default interface.</p>"
-         "<p>Given the length of time and the number of bug fixes and "
-         "improvements since the last major release, we also "
-         "decided against delaying the release of all these new "
-         "improvements any longer just to perfect the GUI.  So please "
-         "enjoy the 3.8 release of Octave and the preview of the new GUI.  "
-         "We believe it is working reasonably well, but we also know that "
-         "there are some obvious rough spots and many things that could be "
-         "improved.</p>"
-         "<p><strong>We Need Your Help</strong></p>"
-         "<p>There are many ways that you can help us fix the remaining "
-         "problems, complete the GUI, and improve the overall user "
-         "experience for both novices and experts alike (links will open "
-         "an external browser):</p>"
-         "<p><ul><li>If you are a skilled software developer, you can "
-         "help by contributing your time to help "
-         "<a href=\"http://octave.org/get-involved.html\">develop "
-         "Octave</a>.</li>"
-         "<li>If Octave does not work properly, you are encouraged to "
-         "<a href=\"http://octave.org/bugs.html\">report problems </a> "
-         "that you find.</li>"
-         "<li>Whether you are a user or developer, you can "
-         "<a href=\"http://octave.org/donate.html\">help to fund the "
-         "project</a>.  "
-         "Octave development takes a lot of time and expertise.  "
-         "Your contributions help to ensure that Octave will continue "
-         "to improve.</li></ul></p>"
-         "<p>We hope you find Octave to be useful.  Please help us make "
-         "it even better for the future!</p>"));
-
-  QMessageBox gui_info_dialog (QMessageBox::Warning,
-                               tr ("Experimental GUI Info"),
-                               QString (gui_info.length (),' '), QMessageBox::Close);
-  QGridLayout *box_layout
-      = qobject_cast<QGridLayout *>(gui_info_dialog.layout());
-  if (box_layout)
-    {
-      QTextEdit *text = new QTextEdit(gui_info);
-      text->setReadOnly(true);
-      box_layout->addWidget(text, 0, 1);
-    }
-  gui_info_dialog.exec ();
-}
-
-void
 main_window::construct_tool_bar (void)
 {
   _main_tool_bar = addToolBar ("Main");
--- a/libgui/src/main-window.h	Tue Jan 13 22:11:45 2015 -0800
+++ b/libgui/src/main-window.h	Wed Jan 14 13:54:28 2015 -0500
@@ -133,9 +133,6 @@
   void exit (int status);
   void reset_windows (void);
 
-  void hide_warning_bar (void);
-  void show_gui_info (void);
-
   void change_directory (const QString& dir);
   void browse_for_directory (void);
   void set_current_working_directory (const QString& dir);
@@ -245,9 +242,6 @@
 
   void construct_news_menu (QMenuBar *p);
 
-  void construct_warning_bar (void);
-  void construct_gui_info_button (void);
-
   void construct_tool_bar (void);
 
   void establish_octave_link (void);
@@ -324,9 +318,6 @@
 
   QToolBar *_main_tool_bar;
 
-  QDockWidget *_warning_bar;
-  QPushButton *_gui_info_button;
-
   QMenu *_debug_menu;
 
   QAction *_debug_continue;