[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r1684: Add the start of a main window. Nothing works (except the "d (in trunk: . src/gui)
Author: edmanm
Date: 2007-03-18 22:43:03 -0400 (Sun, 18 Mar 2007)
New Revision: 1684
Modified:
trunk/
trunk/src/gui/gui.pri
trunk/src/gui/mainwindow.cpp
trunk/src/gui/mainwindow.h
Log:
r1747@adrastea: edmanm | 2007-03-18 22:37:20 -0400
Add the start of a main window. Nothing works (except the "don't show me
this ugly window!" checkbox) and the layout needs much help.
"Hey you! You with the computer! Give me feedback and helpful suggestions."
Property changes on: trunk
___________________________________________________________________
svk:merge ticket from /vidalia/local/trunk [r1747] on 54b3572a-7227-0410-958f-53ecd705b71a
Modified: trunk/src/gui/gui.pri
===================================================================
--- trunk/src/gui/gui.pri 2007-03-19 02:42:57 UTC (rev 1683)
+++ trunk/src/gui/gui.pri 2007-03-19 02:43:03 UTC (rev 1684)
@@ -21,6 +21,7 @@
# 02110-1301, USA.
#################################################################
+FORMS += $$PWD/mainwindow.ui
HEADERS += $$PWD/mainwindow.h
SOURCES += $$PWD/mainwindow.cpp
Modified: trunk/src/gui/mainwindow.cpp
===================================================================
--- trunk/src/gui/mainwindow.cpp 2007-03-19 02:42:57 UTC (rev 1683)
+++ trunk/src/gui/mainwindow.cpp 2007-03-19 02:43:03 UTC (rev 1684)
@@ -95,10 +95,9 @@
MainWindow::MainWindow()
{
VidaliaSettings settings;
-
- /* Set Vidalia's application icon */
- setWindowIcon(QIcon(IMG_APP_ICON));
+ ui.setupUi(this);
+
/* Create all the dialogs of which we only want one instance */
_aboutDialog = new AboutDialog();
_messageLog = new MessageLog();
@@ -134,11 +133,19 @@
/* If we're supposed to start Tor when Vidalia starts, then do it now */
start();
}
+
+ /* Check if we are supposed to show our main window on startup */
+ ui.chkShowOnStartup->setChecked(settings.showMainWindowAtStart());
+ if (ui.chkShowOnStartup->isChecked())
+ this->show();
}
/** Destructor. */
MainWindow::~MainWindow()
{
+ VidaliaSettings settings;
+ settings.setShowMainWindowAtStart(ui.chkShowOnStartup->isChecked());
+
_trayIcon.hide();
delete _messageLog;
delete _netViewer;
@@ -318,6 +325,8 @@
_helpAct->setText(tr("Vidalia Help"));
helpMenu->addAction(_helpAct);
helpMenu->addAction(_aboutAct);
+
+ setMenuBar(menuBar);
#endif
}
Modified: trunk/src/gui/mainwindow.h
===================================================================
--- trunk/src/gui/mainwindow.h 2007-03-19 02:42:57 UTC (rev 1683)
+++ trunk/src/gui/mainwindow.h 2007-03-19 02:43:03 UTC (rev 1684)
@@ -52,6 +52,7 @@
#include "config/configdialog.h"
#include "help/browser/helpbrowser.h"
#include "network/netviewer.h"
+#include "ui_mainwindow.h"
class MainWindow : public QMainWindow
@@ -142,6 +143,8 @@
QAction* _helpAct;
QAction* _networkAct;
QAction* _newIdentityAct;
+
+ Ui::MainWindow ui; /**< Qt Designer generated object. */
};
#endif