|
|
|
@ -98,9 +98,9 @@ Kasablanca::Kasablanca() : TDEMainWindow( 0, "Kasablanca" ), mp_view(new Kasabla
|
|
|
|
|
|
|
|
|
|
//if (!InitBookmarks() != 1) KMessageBox::error(0, i18n("Could not open Kasablanca bookmark xml."));
|
|
|
|
|
|
|
|
|
|
connect(mp_view->BrowserB, SIGNAL(selectionChanged()), SLOT(SLOT_SelectionChanged()));
|
|
|
|
|
connect(mp_view->BrowserA, SIGNAL(selectionChanged()), SLOT(SLOT_SelectionChanged()));
|
|
|
|
|
connect(mp_view->TaskView, SIGNAL(selectionChanged()), SLOT(SLOT_SelectionChanged()));
|
|
|
|
|
connect(mp_view->BrowserB, TQ_SIGNAL(selectionChanged()), TQ_SLOT(SLOT_SelectionChanged()));
|
|
|
|
|
connect(mp_view->BrowserA, TQ_SIGNAL(selectionChanged()), TQ_SLOT(SLOT_SelectionChanged()));
|
|
|
|
|
connect(mp_view->TaskView, TQ_SIGNAL(selectionChanged()), TQ_SLOT(SLOT_SelectionChanged()));
|
|
|
|
|
|
|
|
|
|
mp_session_a->SetLogWindow(mp_view->LogWindowA);
|
|
|
|
|
mp_session_a->SetBrowser(mp_view->BrowserA);
|
|
|
|
@ -115,11 +115,11 @@ Kasablanca::Kasablanca() : TDEMainWindow( 0, "Kasablanca" ), mp_view(new Kasabla
|
|
|
|
|
mp_session_a->SetRclickMenu(&m_rclickmenu_a);
|
|
|
|
|
mp_session_a->SetSessionList(mp_sessionlist);
|
|
|
|
|
|
|
|
|
|
connect(mp_view->RefreshButtonA, SIGNAL(clicked()), mp_session_a, SLOT(SLOT_RefreshButton()));
|
|
|
|
|
connect(mp_view->ConnectButtonA, SIGNAL(clicked()), mp_session_a, SLOT(SLOT_ConnectButton()));
|
|
|
|
|
connect(mp_view->TransferButtonA, SIGNAL(clicked()), mp_session_a, SLOT(SLOT_TransferButton()));
|
|
|
|
|
connect(mp_view->CwdLineA, SIGNAL(returnPressed()), mp_session_a, SLOT(SLOT_CwdLine()));
|
|
|
|
|
connect(mp_view->CommandLineA, SIGNAL(returnPressed()), mp_session_a, SLOT(SLOT_CmdLine()));
|
|
|
|
|
connect(mp_view->RefreshButtonA, TQ_SIGNAL(clicked()), mp_session_a, TQ_SLOT(SLOT_RefreshButton()));
|
|
|
|
|
connect(mp_view->ConnectButtonA, TQ_SIGNAL(clicked()), mp_session_a, TQ_SLOT(SLOT_ConnectButton()));
|
|
|
|
|
connect(mp_view->TransferButtonA, TQ_SIGNAL(clicked()), mp_session_a, TQ_SLOT(SLOT_TransferButton()));
|
|
|
|
|
connect(mp_view->CwdLineA, TQ_SIGNAL(returnPressed()), mp_session_a, TQ_SLOT(SLOT_CwdLine()));
|
|
|
|
|
connect(mp_view->CommandLineA, TQ_SIGNAL(returnPressed()), mp_session_a, TQ_SLOT(SLOT_CmdLine()));
|
|
|
|
|
|
|
|
|
|
mp_session_b->SetLogWindow(mp_view->LogWindowB);
|
|
|
|
|
mp_session_b->SetBrowser(mp_view->BrowserB);
|
|
|
|
@ -134,26 +134,26 @@ Kasablanca::Kasablanca() : TDEMainWindow( 0, "Kasablanca" ), mp_view(new Kasabla
|
|
|
|
|
mp_session_b->SetRclickMenu(&m_rclickmenu_b);
|
|
|
|
|
mp_session_b->SetSessionList(mp_sessionlist);
|
|
|
|
|
|
|
|
|
|
connect(mp_view->RefreshButtonB, SIGNAL(clicked()), mp_session_b, SLOT(SLOT_RefreshButton()));
|
|
|
|
|
connect(mp_view->ConnectButtonB, SIGNAL(clicked()), mp_session_b, SLOT(SLOT_ConnectButton()));
|
|
|
|
|
connect(mp_view->TransferButtonB, SIGNAL(clicked()), mp_session_b, SLOT(SLOT_TransferButton()));
|
|
|
|
|
connect(mp_view->CwdLineB, SIGNAL(returnPressed()), mp_session_b, SLOT(SLOT_CwdLine()));
|
|
|
|
|
connect(mp_view->CommandLineB, SIGNAL(returnPressed()), mp_session_b, SLOT(SLOT_CmdLine()));
|
|
|
|
|
connect(mp_session_a, SIGNAL(gui_update()), SLOT(SLOT_SelectionChanged()));
|
|
|
|
|
connect(mp_session_b, SIGNAL(gui_update()), SLOT(SLOT_SelectionChanged()));
|
|
|
|
|
connect(mp_session_a, SIGNAL(gui_queueitems(KbDirInfo*, FtpSession*, FtpSession*, bool)),
|
|
|
|
|
SLOT(SLOT_QueueItems(KbDirInfo*, FtpSession*, FtpSession*, bool)));
|
|
|
|
|
connect(mp_session_b, SIGNAL(gui_queueitems(KbDirInfo*, FtpSession*, FtpSession*, bool)),
|
|
|
|
|
SLOT(SLOT_QueueItems(KbDirInfo*, FtpSession*, FtpSession*, bool)));
|
|
|
|
|
connect(mp_session_a, SIGNAL(gui_succeedtransfer(TQListViewItem*)), SLOT(SLOT_NextTransfer(TQListViewItem*)));
|
|
|
|
|
connect(mp_session_b, SIGNAL(gui_succeedtransfer(TQListViewItem*)), SLOT(SLOT_NextTransfer(TQListViewItem*)));
|
|
|
|
|
connect(mp_session_a, SIGNAL(gui_clearqueue(FtpSession*)), SLOT(SLOT_ClearQueue(FtpSession*)));
|
|
|
|
|
connect(mp_session_b, SIGNAL(gui_clearqueue(FtpSession*)), SLOT(SLOT_ClearQueue(FtpSession*)));
|
|
|
|
|
connect(mp_view->RefreshButtonB, TQ_SIGNAL(clicked()), mp_session_b, TQ_SLOT(SLOT_RefreshButton()));
|
|
|
|
|
connect(mp_view->ConnectButtonB, TQ_SIGNAL(clicked()), mp_session_b, TQ_SLOT(SLOT_ConnectButton()));
|
|
|
|
|
connect(mp_view->TransferButtonB, TQ_SIGNAL(clicked()), mp_session_b, TQ_SLOT(SLOT_TransferButton()));
|
|
|
|
|
connect(mp_view->CwdLineB, TQ_SIGNAL(returnPressed()), mp_session_b, TQ_SLOT(SLOT_CwdLine()));
|
|
|
|
|
connect(mp_view->CommandLineB, TQ_SIGNAL(returnPressed()), mp_session_b, TQ_SLOT(SLOT_CmdLine()));
|
|
|
|
|
connect(mp_session_a, TQ_SIGNAL(gui_update()), TQ_SLOT(SLOT_SelectionChanged()));
|
|
|
|
|
connect(mp_session_b, TQ_SIGNAL(gui_update()), TQ_SLOT(SLOT_SelectionChanged()));
|
|
|
|
|
connect(mp_session_a, TQ_SIGNAL(gui_queueitems(KbDirInfo*, FtpSession*, FtpSession*, bool)),
|
|
|
|
|
TQ_SLOT(SLOT_QueueItems(KbDirInfo*, FtpSession*, FtpSession*, bool)));
|
|
|
|
|
connect(mp_session_b, TQ_SIGNAL(gui_queueitems(KbDirInfo*, FtpSession*, FtpSession*, bool)),
|
|
|
|
|
TQ_SLOT(SLOT_QueueItems(KbDirInfo*, FtpSession*, FtpSession*, bool)));
|
|
|
|
|
connect(mp_session_a, TQ_SIGNAL(gui_succeedtransfer(TQListViewItem*)), TQ_SLOT(SLOT_NextTransfer(TQListViewItem*)));
|
|
|
|
|
connect(mp_session_b, TQ_SIGNAL(gui_succeedtransfer(TQListViewItem*)), TQ_SLOT(SLOT_NextTransfer(TQListViewItem*)));
|
|
|
|
|
connect(mp_session_a, TQ_SIGNAL(gui_clearqueue(FtpSession*)), TQ_SLOT(SLOT_ClearQueue(FtpSession*)));
|
|
|
|
|
connect(mp_session_b, TQ_SIGNAL(gui_clearqueue(FtpSession*)), TQ_SLOT(SLOT_ClearQueue(FtpSession*)));
|
|
|
|
|
|
|
|
|
|
TQAction *deleteShortcut = new TQAction( TQPixmap(), "&Delete",
|
|
|
|
|
Key_Delete, this, "delete" );
|
|
|
|
|
|
|
|
|
|
connect(deleteShortcut, SIGNAL(activated()), this, SLOT(SLOT_SkipTasks()));
|
|
|
|
|
connect(deleteShortcut, TQ_SIGNAL(activated()), this, TQ_SLOT(SLOT_SkipTasks()));
|
|
|
|
|
|
|
|
|
|
mp_session_a->Disconnect();
|
|
|
|
|
mp_session_b->Disconnect();
|
|
|
|
@ -210,26 +210,26 @@ void Kasablanca::saveSettings()
|
|
|
|
|
|
|
|
|
|
void Kasablanca::setupActions()
|
|
|
|
|
{
|
|
|
|
|
KStdAction::quit(kapp, SLOT(quit()), actionCollection());
|
|
|
|
|
KStdAction::quit(kapp, TQ_SLOT(quit()), actionCollection());
|
|
|
|
|
|
|
|
|
|
//m_toolbarAction = KStdAction::showToolbar(this, SLOT(optionsShowToolbar()), actionCollection());
|
|
|
|
|
m_statusbarAction = KStdAction::showStatusbar(this, SLOT(optionsShowStatusbar()), actionCollection());
|
|
|
|
|
//m_toolbarAction = KStdAction::showToolbar(this, TQ_SLOT(optionsShowToolbar()), actionCollection());
|
|
|
|
|
m_statusbarAction = KStdAction::showStatusbar(this, TQ_SLOT(optionsShowStatusbar()), actionCollection());
|
|
|
|
|
|
|
|
|
|
KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection());
|
|
|
|
|
//KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection());
|
|
|
|
|
KStdAction::preferences(this, SLOT(optionsPreferences()), actionCollection());
|
|
|
|
|
KStdAction::keyBindings(this, TQ_SLOT(optionsConfigureKeys()), actionCollection());
|
|
|
|
|
//KStdAction::configureToolbars(this, TQ_SLOT(optionsConfigureToolbars()), actionCollection());
|
|
|
|
|
KStdAction::preferences(this, TQ_SLOT(optionsPreferences()), actionCollection());
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
// this doesn't do anything useful. it's just here to illustrate
|
|
|
|
|
// how to insert a custom menu and menu item
|
|
|
|
|
TDEAction *custom = new TDEAction(i18n("Cus&tom Menuitem"), 0,
|
|
|
|
|
this, SLOT(optionsPreferences()),
|
|
|
|
|
this, TQ_SLOT(optionsPreferences()),
|
|
|
|
|
actionCollection(), "custom_action");
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
new TDEAction(i18n("Edit"), CTRL+Key_E, this, SLOT(SLOT_EditBookmarks()), actionCollection(), "edit bookmarks action");
|
|
|
|
|
new TDEAction(i18n("Edit"), CTRL+Key_E, this, TQ_SLOT(SLOT_EditBookmarks()), actionCollection(), "edit bookmarks action");
|
|
|
|
|
|
|
|
|
|
new TDEAction(i18n("Import"), CTRL+Key_I, this, SLOT(SLOT_ImportBookmarks()), actionCollection(), "import bookmarks action");
|
|
|
|
|
new TDEAction(i18n("Import"), CTRL+Key_I, this, TQ_SLOT(SLOT_ImportBookmarks()), actionCollection(), "import bookmarks action");
|
|
|
|
|
|
|
|
|
|
createGUI();
|
|
|
|
|
}
|
|
|
|
@ -284,7 +284,7 @@ void Kasablanca::optionsPreferences()
|
|
|
|
|
dialog->addPage(general, i18n("General"), "kasablanca");
|
|
|
|
|
dialog->addPage(colors, i18n("Colors"), "colors");
|
|
|
|
|
dialog->addPage(ui, i18n("User Interface"), "winprops");
|
|
|
|
|
connect(dialog, SIGNAL(settingsChanged()), this, SLOT(applyConfig()));
|
|
|
|
|
connect(dialog, TQ_SIGNAL(settingsChanged()), this, TQ_SLOT(applyConfig()));
|
|
|
|
|
dialog->show();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -348,25 +348,25 @@ void Kasablanca::setupMenu()
|
|
|
|
|
m_rclickmenu_t.insertSeparator();
|
|
|
|
|
m_rclickmenu_t.insertItem(i18n("Skip Item(s)"), Skip);
|
|
|
|
|
|
|
|
|
|
connect(&m_rclickmenu_a, SIGNAL(activated(int)), mp_session_a, SLOT(SLOT_ActionMenu(int)));
|
|
|
|
|
connect(&m_bookmarksmenu_a, SIGNAL(activated(int)), mp_session_a, SLOT(SLOT_ConnectMenu(int)));
|
|
|
|
|
connect(mp_view->BrowserA, SIGNAL(doubleClicked(TQListViewItem*)), mp_session_a, SLOT(SLOT_ItemClicked(TQListViewItem*)));
|
|
|
|
|
connect(mp_view->BrowserA, SIGNAL(rightButtonPressed(TQListViewItem *, const TQPoint &, int)),
|
|
|
|
|
mp_session_a, SLOT(SLOT_ItemRClicked(TQListViewItem *, const TQPoint &, int)));
|
|
|
|
|
connect(mp_view->BrowserA->header(), SIGNAL (clicked(int)), mp_session_a, SLOT (SLOT_HeaderClicked(int)));
|
|
|
|
|
connect(&m_rclickmenu_a, TQ_SIGNAL(activated(int)), mp_session_a, TQ_SLOT(SLOT_ActionMenu(int)));
|
|
|
|
|
connect(&m_bookmarksmenu_a, TQ_SIGNAL(activated(int)), mp_session_a, TQ_SLOT(SLOT_ConnectMenu(int)));
|
|
|
|
|
connect(mp_view->BrowserA, TQ_SIGNAL(doubleClicked(TQListViewItem*)), mp_session_a, TQ_SLOT(SLOT_ItemClicked(TQListViewItem*)));
|
|
|
|
|
connect(mp_view->BrowserA, TQ_SIGNAL(rightButtonPressed(TQListViewItem *, const TQPoint &, int)),
|
|
|
|
|
mp_session_a, TQ_SLOT(SLOT_ItemRClicked(TQListViewItem *, const TQPoint &, int)));
|
|
|
|
|
connect(mp_view->BrowserA->header(), TQ_SIGNAL (clicked(int)), mp_session_a, TQ_SLOT (SLOT_HeaderClicked(int)));
|
|
|
|
|
|
|
|
|
|
connect(&m_rclickmenu_b, SIGNAL(activated(int)), mp_session_b, SLOT(SLOT_ActionMenu(int)));
|
|
|
|
|
connect(&m_bookmarksmenu_b, SIGNAL(activated(int)), mp_session_b, SLOT(SLOT_ConnectMenu(int)));
|
|
|
|
|
connect(mp_view->BrowserB, SIGNAL(doubleClicked(TQListViewItem*)), mp_session_b, SLOT(SLOT_ItemClicked(TQListViewItem*)));
|
|
|
|
|
connect(mp_view->BrowserB, SIGNAL(rightButtonPressed(TQListViewItem *, const TQPoint &, int)),
|
|
|
|
|
mp_session_b, SLOT(SLOT_ItemRClicked(TQListViewItem *, const TQPoint &, int)));
|
|
|
|
|
connect(mp_view->BrowserB->header(), SIGNAL(clicked(int)), mp_session_b, SLOT(SLOT_HeaderClicked(int)));
|
|
|
|
|
connect(&m_rclickmenu_b, TQ_SIGNAL(activated(int)), mp_session_b, TQ_SLOT(SLOT_ActionMenu(int)));
|
|
|
|
|
connect(&m_bookmarksmenu_b, TQ_SIGNAL(activated(int)), mp_session_b, TQ_SLOT(SLOT_ConnectMenu(int)));
|
|
|
|
|
connect(mp_view->BrowserB, TQ_SIGNAL(doubleClicked(TQListViewItem*)), mp_session_b, TQ_SLOT(SLOT_ItemClicked(TQListViewItem*)));
|
|
|
|
|
connect(mp_view->BrowserB, TQ_SIGNAL(rightButtonPressed(TQListViewItem *, const TQPoint &, int)),
|
|
|
|
|
mp_session_b, TQ_SLOT(SLOT_ItemRClicked(TQListViewItem *, const TQPoint &, int)));
|
|
|
|
|
connect(mp_view->BrowserB->header(), TQ_SIGNAL(clicked(int)), mp_session_b, TQ_SLOT(SLOT_HeaderClicked(int)));
|
|
|
|
|
|
|
|
|
|
connect( mp_view->TaskView, SIGNAL (rightButtonPressed( TQListViewItem *, const TQPoint &, int )), this,
|
|
|
|
|
SLOT (SLOT_ItemRightClickedT(TQListViewItem *, const TQPoint &, int )));
|
|
|
|
|
connect( mp_view->TaskView, TQ_SIGNAL (rightButtonPressed( TQListViewItem *, const TQPoint &, int )), this,
|
|
|
|
|
TQ_SLOT (SLOT_ItemRightClickedT(TQListViewItem *, const TQPoint &, int )));
|
|
|
|
|
|
|
|
|
|
m_rclickmenu_t.connectItem(Start, this, SLOT(SLOT_ProcessQueue()));
|
|
|
|
|
m_rclickmenu_t.connectItem(Skip, this, SLOT(SLOT_SkipTasks()));
|
|
|
|
|
m_rclickmenu_t.connectItem(Start, this, TQ_SLOT(SLOT_ProcessQueue()));
|
|
|
|
|
m_rclickmenu_t.connectItem(Skip, this, TQ_SLOT(SLOT_SkipTasks()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Kasablanca::setupStatusBar()
|
|
|
|
@ -585,7 +585,7 @@ void Kasablanca::QueueFinished()
|
|
|
|
|
{
|
|
|
|
|
TDEProcess* p = new TDEProcess();
|
|
|
|
|
*p << TQStringList::split(" ", m_onqueuefinished);
|
|
|
|
|
connect(p, SIGNAL(processExited(TDEProcess*)), SLOT(SLOT_LocalProcessExited(TDEProcess*)));
|
|
|
|
|
connect(p, TQ_SIGNAL(processExited(TDEProcess*)), TQ_SLOT(SLOT_LocalProcessExited(TDEProcess*)));
|
|
|
|
|
p->start();
|
|
|
|
|
}
|
|
|
|
|
if (KbConfig::systrayIsEnabled()) KPassivePopup::message("Transfer is finished.", mp_systemtray);
|
|
|
|
|