mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-15 10:54:22 -05:00
- removed MessagesPopupDialog
- click in MessageToaster shows the MainWindow and activates the MessagesDialog git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2980 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
54219ea685
commit
591a141a18
@ -251,7 +251,6 @@ HEADERS += rshare.h \
|
||||
gui/common/rwindow.h \
|
||||
gui/common/html.h \
|
||||
gui/MessagesDialog.h \
|
||||
gui/MessagesPopupDialog.h \
|
||||
gui/help/browser/helpbrowser.h \
|
||||
gui/help/browser/helptextbrowser.h \
|
||||
gui/statusbar/peerstatus.h \
|
||||
@ -307,7 +306,6 @@ FORMS += gui/StartDialog.ui \
|
||||
gui/ShareManager.ui \
|
||||
gui/ShareDialog.ui \
|
||||
gui/MessagesDialog.ui \
|
||||
gui/MessagesPopupDialog.ui \
|
||||
gui/help/browser/helpbrowser.ui \
|
||||
gui/HelpDialog.ui \
|
||||
gui/InfoDialog.ui \
|
||||
@ -396,7 +394,6 @@ SOURCES += main.cpp \
|
||||
gui/SoundManager.cpp \
|
||||
gui/MessagesDialog.cpp \
|
||||
gui/FileTransferInfoWidget.cpp \
|
||||
gui/MessagesPopupDialog.cpp \
|
||||
gui/im_history/IMHistoryKeeper.cpp \
|
||||
gui/im_history/IMHistoryReader.cpp \
|
||||
gui/im_history/IMHistoryItem.cpp \
|
||||
|
@ -451,13 +451,14 @@ void MainWindow::addAction(QAction *action, const char *slot)
|
||||
}
|
||||
|
||||
/** Shows the MainWindow with focus set to the given page. */
|
||||
void MainWindow::showWindow(Page page)
|
||||
/*static*/ void MainWindow::showWindow(Page page)
|
||||
{
|
||||
/* Show the dialog. */
|
||||
//show();
|
||||
if (_instance == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Show the dialog. */
|
||||
RWindow::showWindow();
|
||||
_instance->show();
|
||||
/* Set the focus to the specified page. */
|
||||
activatePage (page);
|
||||
}
|
||||
|
@ -95,6 +95,11 @@ public:
|
||||
/** Destructor. */
|
||||
~MainWindow();
|
||||
|
||||
/** Shows the MainWindow dialog with focus set to the given page. */
|
||||
static void showWindow(Page page);
|
||||
/** Set focus to the given page. */
|
||||
static void activatePage (Page page);
|
||||
|
||||
/* A Bit of a Hack... but public variables for
|
||||
* the dialogs, so we can add them to the
|
||||
* Notify Class...
|
||||
@ -128,13 +133,6 @@ public:
|
||||
|
||||
|
||||
public slots:
|
||||
/** Called when this dialog is to be displayed */
|
||||
//void show();
|
||||
/** Shows the config dialog with focus set to the given page. */
|
||||
void showWindow(Page page);
|
||||
/** Set focus to the given page. */
|
||||
static void activatePage (Page page);
|
||||
|
||||
void updateHashingInfo(const QString&) ;
|
||||
void displayErrorMessage(int,int,const QString&) ;
|
||||
void postModDirectories(bool update_local);
|
||||
|
@ -1,64 +0,0 @@
|
||||
/****************************************************************
|
||||
* RetroShare is distributed under the following license:
|
||||
*
|
||||
* Copyright (C) 2006, crypton
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
****************************************************************/
|
||||
|
||||
|
||||
#include "MessagesPopupDialog.h"
|
||||
#include "MessagesDialog.h"
|
||||
|
||||
#include "util/printpreview.h"
|
||||
|
||||
#include "rsiface/rsiface.h"
|
||||
#include "rsiface/rspeers.h"
|
||||
#include "rsiface/rsmsgs.h"
|
||||
#include "rsiface/rsfiles.h"
|
||||
#include <sstream>
|
||||
|
||||
|
||||
/** Constructor */
|
||||
MessagesPopupDialog::MessagesPopupDialog(QWidget* parent, Qt::WFlags flags)
|
||||
: QMainWindow(parent, flags)
|
||||
{
|
||||
/* Invoke the Qt Designer generated object setup routine */
|
||||
ui.setupUi(this);
|
||||
|
||||
setAttribute ( Qt::WA_DeleteOnClose, true );
|
||||
|
||||
messagesdlg = new MessagesDialog();
|
||||
messagesdlg->setAttribute ( Qt::WA_DeleteOnClose, true );
|
||||
|
||||
QVBoxLayout *layout = new QVBoxLayout(ui.centralwidget);
|
||||
layout->addWidget(messagesdlg);
|
||||
setLayout(layout);
|
||||
layout->setSpacing( 0 );
|
||||
layout->setMargin( 0 );
|
||||
|
||||
|
||||
/* Hide platform specific features */
|
||||
#ifdef Q_WS_WIN
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
MessagesPopupDialog::~MessagesPopupDialog()
|
||||
{
|
||||
delete messagesdlg;
|
||||
}
|
||||
|
@ -1,54 +0,0 @@
|
||||
/****************************************************************
|
||||
* RetroShare is distributed under the following license:
|
||||
*
|
||||
* Copyright (C) 2009,The RetroShare Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
****************************************************************/
|
||||
|
||||
#ifndef _MESSAGESPOPUPDIALOG_H
|
||||
#define _MESSAGESPOPUPDIALOG_H
|
||||
|
||||
#include <QFileDialog>
|
||||
|
||||
#include "ui_MessagesPopupDialog.h"
|
||||
|
||||
class MessagesDialog;
|
||||
|
||||
class MessagesPopupDialog : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/** Default Constructor */
|
||||
MessagesPopupDialog(QWidget *parent = 0, Qt::WFlags flags = 0);
|
||||
/** Default Destructor */
|
||||
~MessagesPopupDialog();
|
||||
|
||||
private slots:
|
||||
|
||||
|
||||
private:
|
||||
|
||||
MessagesDialog *messagesdlg;
|
||||
|
||||
|
||||
/** Qt Designer generated object */
|
||||
Ui::MessagesPopupDialog ui;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,85 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MessagesPopupDialog</class>
|
||||
<widget class="QMainWindow" name="MessagesPopupDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>657</width>
|
||||
<height>478</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Messages</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/rstray3.png</normaloff>:/images/rstray3.png</iconset>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextUnderIcon</enum>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget"/>
|
||||
<widget class="QStatusBar" name="statusbar"/>
|
||||
<action name="actionCompose">
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/folder-draft24.png</normaloff>:/images/folder-draft24.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Compose</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionReplyMessage">
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/replymail24.png</normaloff>:/images/replymail24.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Reply</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionForwardMessage">
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/mailforward24-hover.png</normaloff>:/images/mailforward24-hover.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Forward</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionRemove">
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/deletemail24.png</normaloff>:/images/deletemail24.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Remove</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionPrintMenu">
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/print24.png</normaloff>:/images/print24.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Print</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionPrintPreview">
|
||||
<property name="text">
|
||||
<string>PrintPreview</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionPrint">
|
||||
<property name="text">
|
||||
<string>Print</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="images.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
@ -43,7 +43,6 @@
|
||||
|
||||
#include "gui/connect/ConnectFriendWizard.h"
|
||||
|
||||
#include "MessagesPopupDialog.h"
|
||||
#include "ShareManager.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
#include "MessageToaster.h"
|
||||
#include "gui/MessagesPopupDialog.h"
|
||||
#include "../MainWindow.h"
|
||||
|
||||
MessageToaster::MessageToaster( QWidget * parent, Qt::WFlags f)
|
||||
: QWidget(parent, f)
|
||||
@ -104,10 +104,7 @@ void MessageToaster::closeClicked()
|
||||
|
||||
void MessageToaster::openmessageClicked()
|
||||
{
|
||||
MessagesPopupDialog *msgdialog = new MessagesPopupDialog();
|
||||
msgdialog->show();
|
||||
|
||||
/* window will destroy itself! */
|
||||
MainWindow::showWindow (MainWindow::Messages);
|
||||
}
|
||||
|
||||
void MessageToaster::setMessage(const QString & message)
|
||||
|
Loading…
Reference in New Issue
Block a user