|
|
|
@ -71,8 +71,8 @@ KonversationMainWindow::KonversationMainWindow() : TDEMainWindow(0,"main_window"
|
|
|
|
|
setCentralWidget(m_viewContainer->getWidget());
|
|
|
|
|
|
|
|
|
|
//used for event compression. See header file for resetHasDirtySettings()
|
|
|
|
|
connect(KonversationApplication::instance(), TQT_SIGNAL(appearanceChanged()), TQT_TQOBJECT(this), TQT_SLOT(resetHasDirtySettings()));
|
|
|
|
|
connect(KonversationApplication::instance(), TQT_SIGNAL(appearanceChanged()), TQT_TQOBJECT(this), TQT_SLOT(updateTrayIcon()));
|
|
|
|
|
connect(KonversationApplication::instance(), TQT_SIGNAL(appearanceChanged()), this, TQT_SLOT(resetHasDirtySettings()));
|
|
|
|
|
connect(KonversationApplication::instance(), TQT_SIGNAL(appearanceChanged()), this, TQT_SLOT(updateTrayIcon()));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Set up view container
|
|
|
|
@ -82,14 +82,14 @@ KonversationMainWindow::KonversationMainWindow() : TDEMainWindow(0,"main_window"
|
|
|
|
|
m_viewContainer, TQT_SLOT(updateViews(const Konversation::ServerGroupSettings*)));
|
|
|
|
|
connect(m_viewContainer, TQT_SIGNAL(autoJoinToggled(const Konversation::ServerGroupSettings*)),
|
|
|
|
|
KonversationApplication::instance(), TQT_SIGNAL(serverGroupsChanged(const Konversation::ServerGroupSettings*)));
|
|
|
|
|
connect(m_viewContainer, TQT_SIGNAL(setWindowCaption(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(setCaption(const TQString&)));
|
|
|
|
|
connect(m_viewContainer, TQT_SIGNAL(setWindowCaption(const TQString&)), this, TQT_SLOT(setCaption(const TQString&)));
|
|
|
|
|
connect(KonversationApplication::instance()->getConnectionManager(),
|
|
|
|
|
TQT_SIGNAL(connectionChangedState(Server*, Konversation::ConnectionState)),
|
|
|
|
|
m_viewContainer, TQT_SLOT(connectionStateChanged(Server*, Konversation::ConnectionState)));
|
|
|
|
|
connect(TQT_TQOBJECT(this), TQT_SIGNAL(triggerRememberLine()), m_viewContainer, TQT_SLOT(insertRememberLine()));
|
|
|
|
|
connect(TQT_TQOBJECT(this), TQT_SIGNAL(triggerRememberLines(Server*)), m_viewContainer, TQT_SLOT(insertRememberLines(Server*)));
|
|
|
|
|
connect(TQT_TQOBJECT(this), TQT_SIGNAL(cancelRememberLine()), m_viewContainer, TQT_SLOT(cancelRememberLine()));
|
|
|
|
|
connect(TQT_TQOBJECT(this), TQT_SIGNAL(insertMarkerLine()), m_viewContainer, TQT_SLOT(insertMarkerLine()));
|
|
|
|
|
connect(this, TQT_SIGNAL(triggerRememberLine()), m_viewContainer, TQT_SLOT(insertRememberLine()));
|
|
|
|
|
connect(this, TQT_SIGNAL(triggerRememberLines(Server*)), m_viewContainer, TQT_SLOT(insertRememberLines(Server*)));
|
|
|
|
|
connect(this, TQT_SIGNAL(cancelRememberLine()), m_viewContainer, TQT_SLOT(cancelRememberLine()));
|
|
|
|
|
connect(this, TQT_SIGNAL(insertMarkerLine()), m_viewContainer, TQT_SLOT(insertMarkerLine()));
|
|
|
|
|
|
|
|
|
|
// Set up status bar
|
|
|
|
|
m_statusBar = new KonversationStatusBar(this);
|
|
|
|
@ -115,25 +115,25 @@ KonversationMainWindow::KonversationMainWindow() : TDEMainWindow(0,"main_window"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Actions
|
|
|
|
|
KStdAction::quit(TQT_TQOBJECT(this),TQT_SLOT(quitProgram()),actionCollection());
|
|
|
|
|
KStdAction::quit(this,TQT_SLOT(quitProgram()),actionCollection());
|
|
|
|
|
|
|
|
|
|
hideMenuBarAction = KStdAction::showMenubar(TQT_TQOBJECT(this), TQT_SLOT(toggleMenubar()), actionCollection());
|
|
|
|
|
hideMenuBarAction = KStdAction::showMenubar(this, TQT_SLOT(toggleMenubar()), actionCollection());
|
|
|
|
|
|
|
|
|
|
setStandardToolBarMenuEnabled(true);
|
|
|
|
|
KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(configureToolbar()), actionCollection());
|
|
|
|
|
KStdAction::configureToolbars(this, TQT_SLOT(configureToolbar()), actionCollection());
|
|
|
|
|
|
|
|
|
|
KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(openKeyBindings()), actionCollection());
|
|
|
|
|
TDEAction *preferencesAction = KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(openPrefsDialog()), actionCollection());
|
|
|
|
|
KStdAction::keyBindings(this, TQT_SLOT(openKeyBindings()), actionCollection());
|
|
|
|
|
TDEAction *preferencesAction = KStdAction::preferences(this, TQT_SLOT(openPrefsDialog()), actionCollection());
|
|
|
|
|
|
|
|
|
|
#ifdef USE_KNOTIFY // options_configure_notifications
|
|
|
|
|
TDEAction *configureNotificationsAction = KStdAction::configureNotifications(TQT_TQOBJECT(this),TQT_SLOT(openNotifications()), actionCollection());
|
|
|
|
|
TDEAction *configureNotificationsAction = KStdAction::configureNotifications(this,TQT_SLOT(openNotifications()), actionCollection());
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
TDEAction* action;
|
|
|
|
|
|
|
|
|
|
(new TDEAction(i18n("&Server List..."), "server", TDEShortcut("F2"), TQT_TQOBJECT(this), TQT_SLOT(openServerList()),
|
|
|
|
|
(new TDEAction(i18n("&Server List..."), "server", TDEShortcut("F2"), this, TQT_SLOT(openServerList()),
|
|
|
|
|
actionCollection(), "open_server_list"))->setToolTip(i18n("Manage networks and servers"));
|
|
|
|
|
(new TDEAction(i18n("Quick &Connect..."), "connect_creating", TDEShortcut("F7"), TQT_TQOBJECT(this), TQT_SLOT(openQuickConnectDialog()),
|
|
|
|
|
(new TDEAction(i18n("Quick &Connect..."), "connect_creating", TDEShortcut("F7"), this, TQT_SLOT(openQuickConnectDialog()),
|
|
|
|
|
actionCollection(), "quick_connect_dialog"))->setToolTip(i18n("Type in the address of a new IRC server to connect to"));
|
|
|
|
|
|
|
|
|
|
action = new TDEAction(i18n("&Reconnect"), "connect_creating", 0, m_viewContainer, TQT_SLOT(reconnectFrontServer()), actionCollection(), "reconnect_server");
|
|
|
|
@ -144,7 +144,7 @@ KonversationMainWindow::KonversationMainWindow() : TDEMainWindow(0,"main_window"
|
|
|
|
|
action->setEnabled(false);
|
|
|
|
|
action->setToolTip(i18n("Disconnect from the current server."));
|
|
|
|
|
|
|
|
|
|
(new TDEAction(i18n("&Identities..."), "identity", TDEShortcut("F8"), TQT_TQOBJECT(this), TQT_SLOT(openIdentitiesDialog()),
|
|
|
|
|
(new TDEAction(i18n("&Identities..."), "identity", TDEShortcut("F8"), this, TQT_SLOT(openIdentitiesDialog()),
|
|
|
|
|
actionCollection(), "identities_dialog"))->setToolTip(i18n("Manage your nick, away and other identity settings"));
|
|
|
|
|
|
|
|
|
|
new TDEToggleAction(i18n("&Watched Nicks Online"), "kontact_contacts", TDEShortcut("F4"), m_viewContainer, TQT_SLOT(openNicksOnlinePanel()), actionCollection(), "open_nicksonline_window");
|
|
|
|
@ -241,7 +241,7 @@ KonversationMainWindow::KonversationMainWindow() : TDEMainWindow(0,"main_window"
|
|
|
|
|
selectAction->setEnabled(false);
|
|
|
|
|
connect(selectAction, TQT_SIGNAL(activated(int)), m_viewContainer, TQT_SLOT(changeViewCharset(int)));
|
|
|
|
|
|
|
|
|
|
TQSignalMapper* tabSelectionMapper = new TQSignalMapper(TQT_TQOBJECT(this));
|
|
|
|
|
TQSignalMapper* tabSelectionMapper = new TQSignalMapper(this);
|
|
|
|
|
connect(tabSelectionMapper, TQT_SIGNAL(mapped(int)), m_viewContainer, TQT_SLOT(goToView(int)));
|
|
|
|
|
|
|
|
|
|
for (uint i = 1; i <= 10; ++i)
|
|
|
|
@ -296,9 +296,9 @@ KonversationMainWindow::KonversationMainWindow() : TDEMainWindow(0,"main_window"
|
|
|
|
|
|
|
|
|
|
// set up system tray
|
|
|
|
|
m_trayIcon = new Konversation::TrayIcon(this);
|
|
|
|
|
connect(TQT_TQOBJECT(this), TQT_SIGNAL(endNotification()), m_trayIcon, TQT_SLOT(endNotification()));
|
|
|
|
|
connect(this, TQT_SIGNAL(endNotification()), m_trayIcon, TQT_SLOT(endNotification()));
|
|
|
|
|
connect(KonversationApplication::instance(), TQT_SIGNAL(iconChanged(int)), m_trayIcon, TQT_SLOT(updateAppearance()));
|
|
|
|
|
connect(m_trayIcon, TQT_SIGNAL(quitSelected()), TQT_TQOBJECT(this), TQT_SLOT(quitProgram()));
|
|
|
|
|
connect(m_trayIcon, TQT_SIGNAL(quitSelected()), this, TQT_SLOT(quitProgram()));
|
|
|
|
|
TDEPopupMenu *trayMenu = m_trayIcon->contextMenu();
|
|
|
|
|
#ifdef USE_KNOTIFY
|
|
|
|
|
configureNotificationsAction->plug(trayMenu);
|
|
|
|
@ -528,7 +528,7 @@ void KonversationMainWindow::openPrefsDialog()
|
|
|
|
|
m_settingsDialog = new KonviSettingsDialog(this);
|
|
|
|
|
//User edited the configuration - update your local copies of the
|
|
|
|
|
//configuration data
|
|
|
|
|
connect(m_settingsDialog, TQT_SIGNAL(settingsChanged()), TQT_TQOBJECT(this), TQT_SLOT(settingsChangedSlot()));
|
|
|
|
|
connect(m_settingsDialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(settingsChangedSlot()));
|
|
|
|
|
}
|
|
|
|
|
m_settingsDialog->show();
|
|
|
|
|
}
|
|
|
|
|