|
|
@ -84,50 +84,50 @@ Smb4KNetworkBrowserPart::Smb4KNetworkBrowserPart( TQWidget *parentWidget, const
|
|
|
|
loadSettings();
|
|
|
|
loadSettings();
|
|
|
|
|
|
|
|
|
|
|
|
// Add some connections:
|
|
|
|
// Add some connections:
|
|
|
|
connect( m_widget, TQT_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint & , int ) ),
|
|
|
|
connect( m_widget, TQ_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint & , int ) ),
|
|
|
|
this, TQT_SLOT( slotContextMenuRequested( TQListViewItem *, const TQPoint &, int ) ) );
|
|
|
|
this, TQ_SLOT( slotContextMenuRequested( TQListViewItem *, const TQPoint &, int ) ) );
|
|
|
|
|
|
|
|
|
|
|
|
connect( m_widget, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ),
|
|
|
|
connect( m_widget, TQ_SIGNAL( selectionChanged( TQListViewItem * ) ),
|
|
|
|
this, TQT_SLOT( slotSelectionChanged( TQListViewItem * ) ) );
|
|
|
|
this, TQ_SLOT( slotSelectionChanged( TQListViewItem * ) ) );
|
|
|
|
|
|
|
|
|
|
|
|
connect( m_widget, TQT_SIGNAL( pressed( TQListViewItem * ) ),
|
|
|
|
connect( m_widget, TQ_SIGNAL( pressed( TQListViewItem * ) ),
|
|
|
|
this, TQT_SLOT( slotPressed( TQListViewItem * ) ) );
|
|
|
|
this, TQ_SLOT( slotPressed( TQListViewItem * ) ) );
|
|
|
|
|
|
|
|
|
|
|
|
connect( m_widget, TQT_SIGNAL( expanded( TQListViewItem * ) ),
|
|
|
|
connect( m_widget, TQ_SIGNAL( expanded( TQListViewItem * ) ),
|
|
|
|
this, TQT_SLOT( slotItemExpanded( TQListViewItem * ) ) );
|
|
|
|
this, TQ_SLOT( slotItemExpanded( TQListViewItem * ) ) );
|
|
|
|
|
|
|
|
|
|
|
|
connect( m_widget, TQT_SIGNAL( collapsed( TQListViewItem * ) ),
|
|
|
|
connect( m_widget, TQ_SIGNAL( collapsed( TQListViewItem * ) ),
|
|
|
|
this, TQT_SLOT( slotItemCollapsed( TQListViewItem * ) ) );
|
|
|
|
this, TQ_SLOT( slotItemCollapsed( TQListViewItem * ) ) );
|
|
|
|
|
|
|
|
|
|
|
|
connect( m_widget, TQT_SIGNAL( executed( TQListViewItem * ) ),
|
|
|
|
connect( m_widget, TQ_SIGNAL( executed( TQListViewItem * ) ),
|
|
|
|
this, TQT_SLOT( slotItemExecuted( TQListViewItem * ) ) );
|
|
|
|
this, TQ_SLOT( slotItemExecuted( TQListViewItem * ) ) );
|
|
|
|
|
|
|
|
|
|
|
|
connect( m_widget, TQT_SIGNAL( aboutToShowToolTip( Smb4KNetworkBrowserItem * ) ),
|
|
|
|
connect( m_widget, TQ_SIGNAL( aboutToShowToolTip( Smb4KNetworkBrowserItem * ) ),
|
|
|
|
this, TQT_SLOT( slotAboutToShowToolTip( Smb4KNetworkBrowserItem * ) ) );
|
|
|
|
this, TQ_SLOT( slotAboutToShowToolTip( Smb4KNetworkBrowserItem * ) ) );
|
|
|
|
|
|
|
|
|
|
|
|
connect( Smb4KCore::scanner(), TQT_SIGNAL( workgroups( const TQValueList<Smb4KWorkgroupItem *> & ) ),
|
|
|
|
connect( Smb4KCore::scanner(), TQ_SIGNAL( workgroups( const TQValueList<Smb4KWorkgroupItem *> & ) ),
|
|
|
|
this, TQT_SLOT( slotWorkgroups( const TQValueList<Smb4KWorkgroupItem *> & ) ) );
|
|
|
|
this, TQ_SLOT( slotWorkgroups( const TQValueList<Smb4KWorkgroupItem *> & ) ) );
|
|
|
|
|
|
|
|
|
|
|
|
connect( Smb4KCore::scanner(), TQT_SIGNAL( members( const TQString &, const TQValueList<Smb4KHostItem *> & ) ),
|
|
|
|
connect( Smb4KCore::scanner(), TQ_SIGNAL( members( const TQString &, const TQValueList<Smb4KHostItem *> & ) ),
|
|
|
|
this, TQT_SLOT( slotWorkgroupMembers( const TQString &, const TQValueList<Smb4KHostItem *> & ) ) );
|
|
|
|
this, TQ_SLOT( slotWorkgroupMembers( const TQString &, const TQValueList<Smb4KHostItem *> & ) ) );
|
|
|
|
|
|
|
|
|
|
|
|
connect( Smb4KCore::scanner(), TQT_SIGNAL( shares( const TQString &, const TQValueList<Smb4KShareItem *> & ) ),
|
|
|
|
connect( Smb4KCore::scanner(), TQ_SIGNAL( shares( const TQString &, const TQValueList<Smb4KShareItem *> & ) ),
|
|
|
|
this, TQT_SLOT( slotShares( const TQString &, const TQValueList<Smb4KShareItem *> & ) ) );
|
|
|
|
this, TQ_SLOT( slotShares( const TQString &, const TQValueList<Smb4KShareItem *> & ) ) );
|
|
|
|
|
|
|
|
|
|
|
|
connect( Smb4KCore::scanner(), TQT_SIGNAL( ipAddress( Smb4KHostItem * ) ),
|
|
|
|
connect( Smb4KCore::scanner(), TQ_SIGNAL( ipAddress( Smb4KHostItem * ) ),
|
|
|
|
this, TQT_SLOT( slotAddIPAddress( Smb4KHostItem * ) ) );
|
|
|
|
this, TQ_SLOT( slotAddIPAddress( Smb4KHostItem * ) ) );
|
|
|
|
|
|
|
|
|
|
|
|
connect( Smb4KCore::scanner(), TQT_SIGNAL( info( Smb4KHostItem * ) ),
|
|
|
|
connect( Smb4KCore::scanner(), TQ_SIGNAL( info( Smb4KHostItem * ) ),
|
|
|
|
this, TQT_SLOT( slotAddInformation( Smb4KHostItem * ) ) );
|
|
|
|
this, TQ_SLOT( slotAddInformation( Smb4KHostItem * ) ) );
|
|
|
|
|
|
|
|
|
|
|
|
connect( Smb4KCore::scanner(), TQT_SIGNAL( hostAdded( Smb4KHostItem * ) ),
|
|
|
|
connect( Smb4KCore::scanner(), TQ_SIGNAL( hostAdded( Smb4KHostItem * ) ),
|
|
|
|
this, TQT_SLOT( slotInsertHost( Smb4KHostItem * ) ) );
|
|
|
|
this, TQ_SLOT( slotInsertHost( Smb4KHostItem * ) ) );
|
|
|
|
|
|
|
|
|
|
|
|
connect( Smb4KCore::mounter(), TQT_SIGNAL( updated() ),
|
|
|
|
connect( Smb4KCore::mounter(), TQ_SIGNAL( updated() ),
|
|
|
|
this, TQT_SLOT( slotMarkMountedShares() ) );
|
|
|
|
this, TQ_SLOT( slotMarkMountedShares() ) );
|
|
|
|
|
|
|
|
|
|
|
|
connect( Smb4KCore::self(), TQT_SIGNAL( runStateChanged() ),
|
|
|
|
connect( Smb4KCore::self(), TQ_SIGNAL( runStateChanged() ),
|
|
|
|
this, TQT_SLOT( slotRunStateChanged() ) );
|
|
|
|
this, TQ_SLOT( slotRunStateChanged() ) );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -139,35 +139,35 @@ Smb4KNetworkBrowserPart::~Smb4KNetworkBrowserPart()
|
|
|
|
void Smb4KNetworkBrowserPart::setupActions()
|
|
|
|
void Smb4KNetworkBrowserPart::setupActions()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TDEAction *rescan = new TDEAction( i18n( "Scan Netwo&rk" ), "reload", TDEShortcut( CTRL+Key_R ),
|
|
|
|
TDEAction *rescan = new TDEAction( i18n( "Scan Netwo&rk" ), "reload", TDEShortcut( CTRL+Key_R ),
|
|
|
|
this, TQT_SLOT( slotRescan() ),
|
|
|
|
this, TQ_SLOT( slotRescan() ),
|
|
|
|
actionCollection(), "rescan_action" );
|
|
|
|
actionCollection(), "rescan_action" );
|
|
|
|
TDEAction *abort = new TDEAction( i18n( "&Abort" ) , "process-stop", TDEShortcut( CTRL+Key_A ),
|
|
|
|
TDEAction *abort = new TDEAction( i18n( "&Abort" ) , "process-stop", TDEShortcut( CTRL+Key_A ),
|
|
|
|
this, TQT_SLOT( slotAbort() ),
|
|
|
|
this, TQ_SLOT( slotAbort() ),
|
|
|
|
actionCollection(), "abort_action" );
|
|
|
|
actionCollection(), "abort_action" );
|
|
|
|
TDEActionSeparator *sep1 = new TDEActionSeparator( actionCollection(),
|
|
|
|
TDEActionSeparator *sep1 = new TDEActionSeparator( actionCollection(),
|
|
|
|
"separator_1" );
|
|
|
|
"separator_1" );
|
|
|
|
TDEAction *manual_mount = new TDEAction( i18n( "M&ount Manually" ), "connect_creating", TDEShortcut( CTRL+Key_O ),
|
|
|
|
TDEAction *manual_mount = new TDEAction( i18n( "M&ount Manually" ), "connect_creating", TDEShortcut( CTRL+Key_O ),
|
|
|
|
this, TQT_SLOT( slotMountManually() ),
|
|
|
|
this, TQ_SLOT( slotMountManually() ),
|
|
|
|
actionCollection(), "mount_manually_action" );
|
|
|
|
actionCollection(), "mount_manually_action" );
|
|
|
|
TDEActionSeparator *sep2 = new TDEActionSeparator( actionCollection(),
|
|
|
|
TDEActionSeparator *sep2 = new TDEActionSeparator( actionCollection(),
|
|
|
|
"separator_2" );
|
|
|
|
"separator_2" );
|
|
|
|
TDEAction *auth = new TDEAction( i18n( "Au&thentication" ), "identity", TDEShortcut( CTRL+Key_T ),
|
|
|
|
TDEAction *auth = new TDEAction( i18n( "Au&thentication" ), "identity", TDEShortcut( CTRL+Key_T ),
|
|
|
|
this, TQT_SLOT( slotAuthentication() ),
|
|
|
|
this, TQ_SLOT( slotAuthentication() ),
|
|
|
|
actionCollection(), "askpass_action" );
|
|
|
|
actionCollection(), "askpass_action" );
|
|
|
|
TDEAction *custom = new TDEAction( i18n( "&Custom Options" ), "samba", TDEShortcut( CTRL+Key_C ),
|
|
|
|
TDEAction *custom = new TDEAction( i18n( "&Custom Options" ), "samba", TDEShortcut( CTRL+Key_C ),
|
|
|
|
this, TQT_SLOT( slotCustomOptions() ),
|
|
|
|
this, TQ_SLOT( slotCustomOptions() ),
|
|
|
|
actionCollection(), "custom_action" );
|
|
|
|
actionCollection(), "custom_action" );
|
|
|
|
TDEAction *bookmark = new TDEAction( i18n( "Add &Bookmark" ), "bookmark_add", TDEShortcut( CTRL+Key_B ),
|
|
|
|
TDEAction *bookmark = new TDEAction( i18n( "Add &Bookmark" ), "bookmark_add", TDEShortcut( CTRL+Key_B ),
|
|
|
|
this, TQT_SLOT( slotBookmark() ),
|
|
|
|
this, TQ_SLOT( slotBookmark() ),
|
|
|
|
actionCollection(), "bookmark_action" );
|
|
|
|
actionCollection(), "bookmark_action" );
|
|
|
|
TDEAction *preview = new TDEAction( i18n( "Pre&view" ), "view_icon", TDEShortcut( CTRL+Key_V ),
|
|
|
|
TDEAction *preview = new TDEAction( i18n( "Pre&view" ), "view_icon", TDEShortcut( CTRL+Key_V ),
|
|
|
|
this, TQT_SLOT( slotPreview() ),
|
|
|
|
this, TQ_SLOT( slotPreview() ),
|
|
|
|
actionCollection(), "preview_action" );
|
|
|
|
actionCollection(), "preview_action" );
|
|
|
|
TDEAction *print = new TDEAction( i18n( "&Print File" ), "printer", TDEShortcut( CTRL+Key_P ),
|
|
|
|
TDEAction *print = new TDEAction( i18n( "&Print File" ), "printer", TDEShortcut( CTRL+Key_P ),
|
|
|
|
this, TQT_SLOT( slotPrint() ),
|
|
|
|
this, TQ_SLOT( slotPrint() ),
|
|
|
|
actionCollection(), "print_action" );
|
|
|
|
actionCollection(), "print_action" );
|
|
|
|
TDEAction *mount = new TDEAction( i18n( "&Mount" ), "drive-harddisk-mounted", TDEShortcut( CTRL+Key_M ),
|
|
|
|
TDEAction *mount = new TDEAction( i18n( "&Mount" ), "drive-harddisk-mounted", TDEShortcut( CTRL+Key_M ),
|
|
|
|
this, TQT_SLOT( slotMount() ),
|
|
|
|
this, TQ_SLOT( slotMount() ),
|
|
|
|
actionCollection(), "mount_action" );
|
|
|
|
actionCollection(), "mount_action" );
|
|
|
|
|
|
|
|
|
|
|
|
// Enable/disable the actions:
|
|
|
|
// Enable/disable the actions:
|
|
|
@ -201,7 +201,7 @@ void Smb4KNetworkBrowserPart::setupActions()
|
|
|
|
if ( m_mode == KonqPlugin )
|
|
|
|
if ( m_mode == KonqPlugin )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TDEAction *unmount = new TDEAction( i18n( "&Unmount" ), "drive-harddisk-unmounted", TDEShortcut( CTRL+Key_U ),
|
|
|
|
TDEAction *unmount = new TDEAction( i18n( "&Unmount" ), "drive-harddisk-unmounted", TDEShortcut( CTRL+Key_U ),
|
|
|
|
this, TQT_SLOT( slotUnmount() ),
|
|
|
|
this, TQ_SLOT( slotUnmount() ),
|
|
|
|
actionCollection(), "konq_umount_action" );
|
|
|
|
actionCollection(), "konq_umount_action" );
|
|
|
|
|
|
|
|
|
|
|
|
unmount->setEnabled( false );
|
|
|
|
unmount->setEnabled( false );
|
|
|
@ -306,7 +306,7 @@ void Smb4KNetworkBrowserPart::customEvent( TQCustomEvent *e )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// TQT_SLOT IMPLEMENTATIONS (Smb4KNetworkBrowserPart)
|
|
|
|
// SLOT IMPLEMENTATIONS (Smb4KNetworkBrowserPart)
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
void Smb4KNetworkBrowserPart::slotContextMenuRequested( TQListViewItem *item, const TQPoint &pos,
|
|
|
|
void Smb4KNetworkBrowserPart::slotContextMenuRequested( TQListViewItem *item, const TQPoint &pos,
|
|
|
|