# HG changeset patch # User Jacob Dawid # Date 1328120931 -3600 # Node ID 3b6177bd63b052fc0f70d4511f546d5c6dd77dfc # Parent be3e1a14a6dee48e2bf67194b630f25110a9420c Removed chat and chat settings, instead made a separate menu entry in the community menu. * MainWindow: Added menu entry. * SettingsDialog: Removed tab for chat settings. diff -r be3e1a14a6de -r 3b6177bd63b0 gui/src/MainWindow.cpp --- a/gui/src/MainWindow.cpp Wed Feb 01 15:53:19 2012 +0100 +++ b/gui/src/MainWindow.cpp Wed Feb 01 19:28:51 2012 +0100 @@ -119,6 +119,23 @@ } void +MainWindow::openChat () +{ + if (!m_ircWidget) + { + m_ircWidget = new QIRCWidget (); + m_ircWidget->setWindowTitle ("Chat"); + m_ircWidget->connectToServer ("irc.freenode.net", "Octave-GUI-User", "#octave"); + } + + if (!m_ircWidget->isVisible ()) + { + m_ircWidget->setVisible (true); + m_ircWidget->raise (); + } +} + +void MainWindow::handleSaveWorkspaceRequest () { QString selectedFile = @@ -153,23 +170,6 @@ } void -MainWindow::handleUnreadMessages (bool yes) -{ - if (yes) - { - m_ircWidgetSubWindow - ->setWindowIcon - (ResourceManager::instance ()->icon (ResourceManager::ChatNewMessage)); - } - else - { - m_ircWidgetSubWindow - ->setWindowIcon - (ResourceManager::instance ()->icon (ResourceManager::Chat)); - } -} - -void MainWindow::alignMdiWindows () { m_centralMdiArea->tileSubWindows (); @@ -270,6 +270,8 @@ m_closeApplication = false; // flag for editor files when closed setWindowIcon (ResourceManager::instance ()->icon (ResourceManager::Octave)); + m_ircWidget = 0; + // Initialize MDI area. m_centralMdiArea = new QMdiArea (this); m_centralMdiArea->setObjectName ("CentralMdiArea"); @@ -312,26 +314,6 @@ m_terminalViewSubWindow->setStatusTip (tr ("Enter your commands into the Octave terminal.")); m_terminalViewSubWindow->setMinimumSize (300, 300); - // Chat subwindow. - // Deactivated in the development process. - /* - m_ircWidget = new QIRCWidget (this); - m_ircWidgetSubWindow = new NonClosableMdiSubWindow (this); - m_ircWidgetSubWindow->setWidget(m_ircWidget); - m_centralMdiArea->addSubWindow (m_ircWidgetSubWindow, Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint); - - m_ircWidgetSubWindow->setObjectName ("ChatWidgetSubWindow"); - m_ircWidgetSubWindow->setWindowTitle (tr ("Chat")); - m_ircWidgetSubWindow - ->setWindowIcon (ResourceManager::instance ()->icon (ResourceManager::Chat)); - m_ircWidgetSubWindow->setStatusTip(tr ("Instantly chat with other Octave users for help.")); - m_ircWidgetSubWindow->setFocusProxy (m_ircWidget); - m_ircWidgetSubWindow->setMinimumSize (300, 300); - //connect (m_ircWidget, SIGNAL (unreadMessages (bool)), this, SLOT (handleUnreadMessages (bool))); - - m_ircWidget->connectToServer("irc.freenode.net", "Octave-GUI-User", "#octave"); - */ - m_lexer = NULL; // initialise the empty lexer for the edtiors QMenu *controlMenu = menuBar ()->addMenu (tr ("Octave")); @@ -362,6 +344,8 @@ QAction *clearWorkspaceAction = workspaceMenu->addAction (tr ("Clear")); QMenu *communityMenu = menuBar ()->addMenu (tr ("Community")); + QAction *openChatAction = communityMenu->addAction (tr ("Chat")); + communityMenu->addSeparator(); QAction *reportBugAction = communityMenu->addAction (tr ("Report Bug")); QAction *agoraAction = communityMenu->addAction (tr ("Agora")); QAction *octaveForgeAction = communityMenu->addAction (tr ("Octave Forge")); @@ -373,6 +357,7 @@ connect (exitAction, SIGNAL (triggered ()), this, SLOT (close ())); connect (alignWindowsAction, SIGNAL (triggered ()), this, SLOT (alignMdiWindows ())); connect (openEditorAction, SIGNAL (triggered ()), this, SLOT (openEditor ())); + connect (openChatAction, SIGNAL (triggered ()), this, SLOT (openChat ())); connect (reportBugAction, SIGNAL (triggered ()), this, SLOT (openBugTrackerPage ())); connect (agoraAction, SIGNAL (triggered ()), this, SLOT (openAgoraPage ())); connect (octaveForgeAction, SIGNAL (triggered ()), this, SLOT (openOctaveForgePage ())); diff -r be3e1a14a6de -r 3b6177bd63b0 gui/src/MainWindow.h --- a/gui/src/MainWindow.h Wed Feb 01 15:53:19 2012 +0100 +++ b/gui/src/MainWindow.h Wed Feb 01 19:28:51 2012 +0100 @@ -87,11 +87,11 @@ void handleOpenFileRequest (QString fileName); void reportStatusMessage (QString statusMessage); void openWebPage (QString url); + void openChat (); void handleSaveWorkspaceRequest (); void handleLoadWorkspaceRequest (); void handleClearWorkspaceRequest (); void handleCommandDoubleClicked (QString command); - void handleUnreadMessages (bool yes); void alignMdiWindows (); void openEditor (); void openEditorFile (QString fileName); @@ -119,7 +119,6 @@ NonClosableMdiSubWindow *m_terminalViewSubWindow; NonClosableMdiSubWindow *m_documentationWidgetSubWindow; - NonClosableMdiSubWindow *m_ircWidgetSubWindow; // Dock widgets. WorkspaceView *m_workspaceView; diff -r be3e1a14a6de -r 3b6177bd63b0 gui/src/SettingsDialog.cpp --- a/gui/src/SettingsDialog.cpp Wed Feb 01 15:53:19 2012 +0100 +++ b/gui/src/SettingsDialog.cpp Wed Feb 01 19:28:51 2012 +0100 @@ -26,11 +26,6 @@ ui->setupUi (this); QSettings *settings = ResourceManager::instance ()->settings (); - ui->connectOnStartup->setChecked (settings->value ("connectOnStartup").toBool ()); - ui->showMessageOfTheDay->setChecked (settings->value ("showMessageOfTheDay").toBool ()); - ui->showTopic->setChecked (settings->value ("showTopic").toBool ()); - ui->autoIdentification->setChecked (settings->value ("autoIdentification").toBool ()); - ui->nickServPassword->setText (settings->value ("nickServPassword").toString ()); ui->useCustomFileEditor->setChecked (settings->value ("useCustomFileEditor").toBool ()); ui->customFileEditor->setText (settings->value ("customFileEditor").toString ()); ui->editor_showLineNumbers->setChecked (settings->value ("editor/showLineNumbers",true).toBool () ); @@ -91,11 +86,6 @@ SettingsDialog::~SettingsDialog () { QSettings *settings = ResourceManager::instance ()->settings (); - settings->setValue ("connectOnStartup", ui->connectOnStartup->isChecked ()); - settings->setValue ("showMessageOfTheDay", ui->showMessageOfTheDay->isChecked ()); - settings->setValue ("showTopic", ui->showTopic->isChecked ()); - settings->setValue ("autoIdentification", ui->autoIdentification->isChecked ()); - settings->setValue ("nickServPassword", ui->nickServPassword->text ()); settings->setValue ("useCustomFileEditor", ui->useCustomFileEditor->isChecked ()); settings->setValue ("customFileEditor", ui->customFileEditor->text ()); settings->setValue ("editor/showLineNumbers", ui->editor_showLineNumbers->isChecked ()); diff -r be3e1a14a6de -r 3b6177bd63b0 gui/src/SettingsDialog.ui --- a/gui/src/SettingsDialog.ui Wed Feb 01 15:53:19 2012 +0100 +++ b/gui/src/SettingsDialog.ui Wed Feb 01 19:28:51 2012 +0100 @@ -415,105 +415,6 @@ - - - Chat - - - - - - - - Connect to #octave on startup - - - true - - - - - - - Show message of the day - - - - - - - Show topic - - - - - - - Automatically identify on NickServ - - - - - - - Warning: Your password will be stored in ~/.octavegui in human-readable format. Do not enter your password if you worry about security issues. - - - true - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Password: - - - - - - - false - - - QLineEdit::Password - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - @@ -521,34 +422,50 @@ - useCustomFileEditor + useProxyServer toggled(bool) - customFileEditor + label_4 setEnabled(bool) - 111 - 62 + 249 + 59 - 343 - 63 + 69 + 122 - autoIdentification + useProxyServer toggled(bool) - nickServPassword + label_3 setEnabled(bool) - 261 - 139 + 249 + 59 - 384 - 229 + 59 + 91 + + + + + useProxyServer + toggled(bool) + label_5 + setEnabled(bool) + + + 249 + 59 + + + 44 + 152 @@ -601,9 +518,25 @@ + useCustomFileEditor + toggled(bool) + customFileEditor + setEnabled(bool) + + + 111 + 62 + + + 343 + 63 + + + + useProxyServer toggled(bool) - label_3 + label_7 setEnabled(bool) @@ -611,40 +544,40 @@ 59 - 59 - 91 + 67 + 212 - useProxyServer + editor_showLineNumbers toggled(bool) - label_4 + editor_showLineNumbers setEnabled(bool) 249 - 59 + 87 - 69 - 122 + 249 + 87 - useProxyServer + editor_highlightCurrentLine toggled(bool) - label_5 + editor_highlightCurrentLine setEnabled(bool) 249 - 59 + 112 - 44 - 152 + 249 + 112 @@ -697,54 +630,6 @@ - useProxyServer - toggled(bool) - label_7 - setEnabled(bool) - - - 249 - 59 - - - 67 - 212 - - - - - editor_showLineNumbers - toggled(bool) - editor_showLineNumbers - setEnabled(bool) - - - 249 - 87 - - - 249 - 87 - - - - - editor_highlightCurrentLine - toggled(bool) - editor_highlightCurrentLine - setEnabled(bool) - - - 249 - 112 - - - 249 - 112 - - - - editor_codeCompletion toggled(bool) editor_codeCompletion