# HG changeset patch
# User John W. Eaton
# Date 1421261668 18000
# Node ID c8cb111e727e190f2fb81d64f27b9692b302e9f8
# Parent f64cdbe116210ea78a84ac0f23511b42d997d60d# Parent 6561179c6c2243019228a905864cb38dafc23300
maint: Periodic merge of gui-release to default.
diff --git a/libgui/src/main-window.cc b/libgui/src/main-window.cc
--- a/libgui/src/main-window.cc
+++ b/libgui/src/main-window.cc
@@ -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 ("You are using a release candidate of Octave's experimental GUI. "
- "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 http://octave.org."));
-
- 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 ("A Note about Octave's New GUI
"
- "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.
"
- "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.
"
- "We Need Your Help
"
- "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):
"
- "- If you are a skilled software developer, you can "
- "help by contributing your time to help "
- "develop "
- "Octave.
"
- "- If Octave does not work properly, you are encouraged to "
- "report problems "
- "that you find.
"
- "- Whether you are a user or developer, you can "
- "help to fund the "
- "project. "
- "Octave development takes a lot of time and expertise. "
- "Your contributions help to ensure that Octave will continue "
- "to improve.
"
- "We hope you find Octave to be useful. Please help us make "
- "it even better for the future!
"));
-
- QMessageBox gui_info_dialog (QMessageBox::Warning,
- tr ("Experimental GUI Info"),
- QString (gui_info.length (),' '), QMessageBox::Close);
- QGridLayout *box_layout
- = qobject_cast(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");
diff --git a/libgui/src/main-window.h b/libgui/src/main-window.h
--- a/libgui/src/main-window.h
+++ b/libgui/src/main-window.h
@@ -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;