1
/***************************************************************************
2
smb4knotification - This class provides notifications for Smb4K.
4
begin : Son Jun 27 2010
5
copyright : (C) 2010-2011 by Alexander Reinholdt
6
email : alexander.reinholdt@kdemail.org
7
***************************************************************************/
9
/***************************************************************************
10
* This program is free software; you can redistribute it and/or modify *
11
* it under the terms of the GNU General Public License as published by *
12
* the Free Software Foundation; either version 2 of the License, or *
13
* (at your option) any later version. *
15
* This program is distributed in the hope that it will be useful, but *
16
* WITHOUT ANY WARRANTY; without even the implied warranty of *
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
18
* General Public License for more details. *
20
* You should have received a copy of the GNU General Public License *
21
* along with this program; if not, write to the *
22
* Free Software Foundation, 51 Franklin Street, Suite 500, Boston, *
23
* MA 02110-1335, USA *
24
***************************************************************************/
29
#include <kiconloader.h>
32
#include <kmessagebox.h>
33
#include <knotification.h>
34
#include <kdemacros.h>
35
#include <kauthactionreply.h>
40
// application specific includes
41
#include <smb4knotification.h>
42
#include <smb4ksettings.h>
43
#include <smb4kbookmark.h>
44
#include <smb4kworkgroup.h>
45
#include <smb4khost.h>
47
using namespace KAuth;
50
Smb4KNotification::Smb4KNotification( QObject *parent )
56
Smb4KNotification::~Smb4KNotification()
61
void Smb4KNotification::shareMounted( Smb4KShare* share )
65
if ( Smb4KSettings::self()->showNotifications() )
69
KNotification *notification = KNotification::event( KNotification::Notification,
71
i18n( "<p>The share <b>%1</b> has been mounted to <b>%2</b>.</p>",
72
share->unc(), share->path() ),
73
KIconLoader::global()->loadIcon( "folder-remote", KIconLoader::NoGroup, 0,
74
KIconLoader::DefaultState, QStringList( "emblem-mounted" ) ),
76
KNotification::CloseOnTimeout );
77
notification->setActions( QStringList( i18n( "Open" ) ) );
78
connect( notification, SIGNAL( activated( unsigned int ) ), this, SLOT( slotOpenShare() ) );
79
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
88
void Smb4KNotification::shareUnmounted( Smb4KShare* share )
92
if ( Smb4KSettings::self()->showNotifications() )
94
KNotification *notification = KNotification::event( KNotification::Notification,
96
i18n( "<p>The share <b>%1</b> has been unmounted from <b>%2</b>.</p>",
97
share->unc(), share->path() ),
98
KIconLoader::global()->loadIcon( "folder-remote", KIconLoader::NoGroup, 0,
99
KIconLoader::DefaultState, QStringList( "emblem-unmounted" ) ),
101
KNotification::CloseOnTimeout );
102
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
111
void Smb4KNotification::sharesMounted( int total, int actual )
113
if ( Smb4KSettings::self()->showNotifications() )
115
if ( total != actual )
117
KNotification *notification = KNotification::event( KNotification::Notification,
119
i18np( "<p>%1 share out of %2 has been mounted.</p>", "<p>%1 shares out of %2 have been mounted.</p>", actual, total ),
120
KIconLoader::global()->loadIcon( "folder-remote",
121
KIconLoader::NoGroup, 0, KIconLoader::DefaultState, QStringList( "emblem-mounted" ) ),
123
KNotification::CloseOnTimeout );
124
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
128
KNotification *notification = KNotification::event( KNotification::Notification,
130
i18n( "<p>All shares have been mounted.</p>" ),
131
KIconLoader::global()->loadIcon( "folder-remote",
132
KIconLoader::NoGroup, 0, KIconLoader::DefaultState, QStringList( "emblem-mounted" ) ),
134
KNotification::CloseOnTimeout );
135
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
145
void Smb4KNotification::allSharesUnmounted( int total, int actual )
147
if ( Smb4KSettings::self()->showNotifications() )
149
if ( total != actual )
151
KNotification *notification = KNotification::event( KNotification::Notification,
153
i18np( "<p>%1 share out of %2 has been unmounted.</p>", "<p>%1 shares out of %2 have been unmounted.</p>", actual, total ),
154
KIconLoader::global()->loadIcon( "folder-remote", KIconLoader::NoGroup, 0,
155
KIconLoader::DefaultState, QStringList( "emblem-unmounted" ) ),
157
KNotification::CloseOnTimeout );
158
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
162
KNotification *notification = KNotification::event( KNotification::Notification,
164
i18n( "<p>All shares have been unmounted.</p>" ),
165
KIconLoader::global()->loadIcon( "folder-remote", KIconLoader::NoGroup, 0,
166
KIconLoader::DefaultState, QStringList( "emblem-unmounted" ) ),
168
KNotification::CloseOnTimeout );
169
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
184
void Smb4KNotification::openingWalletFailed( const QString &name )
186
KNotification *notification = KNotification::event( KNotification::Warning,
188
i18n( "<p>Opening the wallet <b>%1</b> failed.</p>", name ),
189
KIconLoader::global()->loadIcon( "dialog-warning", KIconLoader::NoGroup, 0,
190
KIconLoader::DefaultState ),
192
KNotification::CloseOnTimeout );
193
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
197
void Smb4KNotification::loginsNotAccessible()
199
KNotification *notification = KNotification::event( KNotification::Warning,
201
i18n( "<p>The logins stored in the wallet could not be accessed. "
202
"There is either no wallet available or it could not be opened.</p>" ),
203
KIconLoader::global()->loadIcon( "dialog-warning", KIconLoader::NoGroup, 0,
204
KIconLoader::DefaultState ),
206
KNotification::CloseOnTimeout );
207
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
211
void Smb4KNotification::mimetypeNotSupported( const QString &mt )
213
KNotification *notification = KNotification::event( KNotification::Warning,
215
i18n( "<p>The mimetype <b>%1</b> is not supported for printing. "
216
"Please convert the file to PDF or Postscript and try again.</p>", mt ),
217
KIconLoader::global()->loadIcon( "dialog-warning", KIconLoader::NoGroup, 0,
218
KIconLoader::DefaultState ),
220
KNotification::CloseOnTimeout );
221
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
225
void Smb4KNotification::bookmarkExists( Smb4KBookmark *bookmark )
227
KNotification *notification = KNotification::event( KNotification::Warning,
229
i18n( "<p>The bookmark for share <b>%1</b> already exists and will be skipped.", bookmark->unc() ),
230
KIconLoader::global()->loadIcon( "dialog-warning", KIconLoader::NoGroup, 0,
231
KIconLoader::DefaultState ),
233
KNotification::CloseOnTimeout );
234
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
238
void Smb4KNotification::bookmarkLabelInUse( Smb4KBookmark *bookmark )
240
KNotification *notification = KNotification::event( KNotification::Warning,
242
i18n( "<p>The label <b>%1</b> of the bookmark for the share <b>%2</b> "
243
"is already being used and will automatically be renamed.</p>", bookmark->label(), bookmark->unc() ),
244
KIconLoader::global()->loadIcon( "dialog-warning", KIconLoader::NoGroup, 0,
245
KIconLoader::DefaultState ),
247
KNotification::CloseOnTimeout );
248
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
252
void Smb4KNotification::emptyCustomMasterBrowser()
254
KNotification *notification = KNotification::event( KNotification::Warning,
256
i18n( "The entry of the custom master browser is empty. Smb4K is going to "
257
"try to query the current master browser of your workgroup or domain instead." ),
258
KIconLoader::global()->loadIcon( "dialog-warning", KIconLoader::NoGroup, 0,
259
KIconLoader::DefaultState ),
261
KNotification::CloseOnTimeout );
262
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
271
void Smb4KNotification::retrievingDomainsFailed( const QString &err_msg )
275
if ( !err_msg.isEmpty() )
277
text = i18n( "<p>Retrieving the list of available domains failed:</p><p><tt>%1</tt></p>", err_msg );
281
text = i18n( "<p>Retrieving the list of available domains failed.</p>" );
284
KNotification *notification = KNotification::event( KNotification::Error,
287
KIconLoader::global()->loadIcon( "dialog-error", KIconLoader::NoGroup, 0,
288
KIconLoader::DefaultState ),
290
KNotification::Persistent );
291
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
295
void Smb4KNotification::scanningBroadcastAreaFailed( const QString &err_msg )
299
if ( !err_msg.isEmpty() )
301
text = i18n( "<p>Scanning the defined broadcast area(s) failed:</p><p><tt>%1</tt></p>", err_msg );
305
text = i18n( "<p>Scanning the defined broadcast area(s) failed.</p>" );
308
KNotification *notification = KNotification::event( KNotification::Error,
311
KIconLoader::global()->loadIcon( "dialog-error", KIconLoader::NoGroup, 0,
312
KIconLoader::DefaultState ),
314
KNotification::Persistent );
315
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
319
void Smb4KNotification::retrievingServersFailed( Smb4KWorkgroup* workgroup, const QString &err_msg )
323
if ( !err_msg.isEmpty() )
325
text = i18n( "<p>Retrieving the list of servers belonging to domain <b>%1</b> failed.</p><p><tt>%2</tt></p>", workgroup->workgroupName(), err_msg );
329
text = i18n( "<p>Retrieving the list of servers belonging to domain <b>%1</b> failed.</p>", workgroup->workgroupName() );
332
KNotification *notification = KNotification::event( KNotification::Error,
335
KIconLoader::global()->loadIcon( "dialog-error", KIconLoader::NoGroup, 0,
336
KIconLoader::DefaultState ),
338
KNotification::Persistent );
339
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
343
void Smb4KNotification::retrievingSharesFailed( Smb4KHost *host, const QString &err_msg )
347
if ( !err_msg.isEmpty() )
349
text = i18n( "<p>Retrieving the list of shares from <b>%1</b> failed:</p><p><tt>%2</tt></p>", host->hostName(), err_msg );
353
text = i18n( "<p>Retrieving the list of shares from <b>%1</b> failed.</p>", host->hostName() );
356
KNotification *notification = KNotification::event( KNotification::Error,
359
KIconLoader::global()->loadIcon( "dialog-error", KIconLoader::NoGroup, 0,
360
KIconLoader::DefaultState ),
362
KNotification::Persistent );
363
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
367
void Smb4KNotification::retrievingPreviewFailed( Smb4KShare *share, const QString &err_msg )
371
if ( !err_msg.isEmpty() )
373
text = i18n( "<p>Retrieving the preview of <b>%1</b> failed:</p><p><tt>%2</tt></p>", share->unc(), err_msg );
377
text = i18n( "<p>Retrieving the preview of <b>%1</b> failed.</p>", share->unc() );
380
KNotification *notification = KNotification::event( KNotification::Error,
383
KIconLoader::global()->loadIcon( "dialog-error", KIconLoader::NoGroup, 0,
384
KIconLoader::DefaultState ),
386
KNotification::Persistent );
387
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
391
void Smb4KNotification::mountingFailed( Smb4KShare *share, const QString &err_msg )
395
if ( !err_msg.isEmpty() )
397
text = i18n( "<p>Mounting the share <b>%1</b> failed:</p><p><tt>%2</tt></p>", share->unc(), err_msg );
401
text = i18n( "<p>Mounting the share <b>%1</b> failed.</p>", share->unc() );
404
KNotification *notification = KNotification::event( KNotification::Error,
407
KIconLoader::global()->loadIcon( "dialog-error", KIconLoader::NoGroup, 0,
408
KIconLoader::DefaultState ),
410
KNotification::Persistent );
411
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
415
void Smb4KNotification::unmountingFailed( Smb4KShare *share, const QString &err_msg )
419
if ( !err_msg.isEmpty() )
421
text = i18n( "<p>Unmounting the share <b>%1</b> from <b>%2</b> failed:</p><p><tt>%3</tt></p>", share->unc(), share->path(), err_msg );
425
text = i18n( "<p>Unmounting the share <b>%1</b> from <b>%2</b> failed.", share->unc(), share->path() );
428
KNotification *notification = KNotification::event( KNotification::Error,
431
KIconLoader::global()->loadIcon( "dialog-error", KIconLoader::NoGroup, 0,
432
KIconLoader::DefaultState ),
434
KNotification::Persistent );
435
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
439
void Smb4KNotification::unmountingNotAllowed( Smb4KShare *share )
441
KNotification *notification = KNotification::event( KNotification::Error,
443
i18n( "<p>You are not allowed to unmount the share <b>%1</b> from <b>%2</b>. "
444
"It is owned by the user <b>%3</b>.</p>", share->unc(), share->path(), share->owner() ),
445
KIconLoader::global()->loadIcon( "dialog-error", KIconLoader::NoGroup, 0,
446
KIconLoader::DefaultState ),
448
KNotification::Persistent );
449
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
453
void Smb4KNotification::printingFailed( Smb4KShare *printer, const QString &err_msg )
457
if ( !err_msg.isEmpty() )
459
text = i18n( "<p>Printing on printer <b>%1</b> failed:</p><p><tt>%2</tt></p>", printer->unc(), err_msg );
463
text = i18n( "<p>Printing on printer <b>%1</b> failed.</p>", printer->unc() );
466
KNotification *notification = KNotification::event( KNotification::Error,
469
KIconLoader::global()->loadIcon( "dialog-error", KIconLoader::NoGroup, 0,
470
KIconLoader::DefaultState ),
472
KNotification::Persistent );
473
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
477
void Smb4KNotification::synchronizationFailed( const KUrl &src, const KUrl &dest, const QString &err_msg )
481
if ( !err_msg.isEmpty() )
483
text = i18n( "<p>Synchronizing <b>%1</b> with <b>%2</b> failed:</p><p><tt>%3</tt></p>", dest.path(), src.path(), err_msg );
487
text = i18n( "<p>Synchronizing <b>%1</b> with <b>%2</b> failed.</p>", dest.path(), src.path() );
490
KNotification *notification = KNotification::event( KNotification::Error,
493
KIconLoader::global()->loadIcon( "dialog-error", KIconLoader::NoGroup, 0,
494
KIconLoader::DefaultState ),
496
KNotification::Persistent );
497
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
501
void Smb4KNotification::searchingFailed( const QString &item, const QString &err_msg )
505
if ( !err_msg.isEmpty() )
507
text = i18n( "<p>Searching the network neighborhood for the search item <b>%1</b> failed:</p><p><tt>%2</tt></p>", item, err_msg );
511
text = i18n( "<p>Searching the network neighborhood for the search item <b>%1</b> failed.</p>", item );
514
KNotification *notification = KNotification::event( KNotification::Error,
517
KIconLoader::global()->loadIcon( "dialog-error", KIconLoader::NoGroup, 0,
518
KIconLoader::DefaultState ),
520
KNotification::Persistent );
521
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
525
void Smb4KNotification::commandNotFound( const QString &command )
527
KNotification *notification = KNotification::event( KNotification::Error,
529
i18n( "<p>The command <b>%1</b> could not be found.</p>", command ),
530
KIconLoader::global()->loadIcon( "dialog-error", KIconLoader::NoGroup, 0,
531
KIconLoader::DefaultState ),
533
KNotification::Persistent );
534
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
538
void Smb4KNotification::cannotBookmarkPrinter( Smb4KShare *share )
540
if ( share->isPrinter() )
542
KNotification *notification = KNotification::event( KNotification::Error,
544
i18n( "<p>The share <b>%1</b> is a printer and cannot be bookmarked.</p>", share->unc() ),
545
KIconLoader::global()->loadIcon( "dialog-error", KIconLoader::NoGroup, 0,
546
KIconLoader::DefaultState ),
548
KNotification::Persistent );
549
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
558
void Smb4KNotification::fileNotFound( const QString &fileName )
560
KNotification *notification = KNotification::event( KNotification::Error,
562
i18n( "<p>The file <b>%1</b> could not be found.</p>", fileName ),
563
KIconLoader::global()->loadIcon( "dialog-error", KIconLoader::NoGroup, 0,
564
KIconLoader::DefaultState ),
566
KNotification::Persistent );
567
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
571
void Smb4KNotification::openingFileFailed( const QFile &file )
575
if ( !file.errorString().isEmpty() )
577
text = i18n( "<p>Opening the file <b>%1</b> failed:</p><p><tt>%2</tt></p>", file.fileName(), file.errorString() );
581
text = i18n( "<p>Opening the file <b>%1</b> failed.</p>", file.fileName() );
584
KNotification *notification = KNotification::event( KNotification::Error,
587
KIconLoader::global()->loadIcon( "dialog-error", KIconLoader::NoGroup, 0,
588
KIconLoader::DefaultState ),
590
KNotification::Persistent );
591
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
595
void Smb4KNotification::readingFileFailed( const QFile &file, const QString &err_msg )
599
if ( !err_msg.isEmpty() )
601
text = i18n( "<p>Reading from file <b>%1</b> failed:</p><p><tt>%2</tt></p>", file.fileName(), err_msg );
605
if ( !file.errorString().isEmpty() )
607
text = i18n( "<p>Reading from file <b>%1</b> failed:</p><p><tt>%2</tt></p>", file.fileName(), file.errorString() );
611
text = i18n( "<p>Reading from file <b>%1</b> failed.</p>", file.fileName() );
615
KNotification *notification = KNotification::event( KNotification::Error,
618
KIconLoader::global()->loadIcon( "dialog-error", KIconLoader::NoGroup, 0,
619
KIconLoader::DefaultState ),
621
KNotification::Persistent );
622
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
627
void Smb4KNotification::mkdirFailed( const QDir &dir )
629
KNotification *notification = KNotification::event( KNotification::Error,
631
i18n( "<p>The following directory could not be created:</p><p><tt>%1</tt></p>", dir.absolutePath() ),
632
KIconLoader::global()->loadIcon( "dialog-error", KIconLoader::NoGroup, 0,
633
KIconLoader::DefaultState ),
635
KNotification::Persistent );
636
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
640
void Smb4KNotification::missingPrograms( const QStringList &programs )
642
KNotification *notification = KNotification::event( KNotification::Error,
644
i18n( "<p>Some required programs could not be found:</p><p><tt>%1</tt></p>", programs.join( ", " ) ),
645
KIconLoader::global()->loadIcon( "dialog-error", KIconLoader::NoGroup, 0,
646
KIconLoader::DefaultState ),
648
KNotification::Persistent );
649
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
653
void Smb4KNotification::processError( QProcess::ProcessError error )
659
case QProcess::FailedToStart:
661
text = i18n( "<p>The process failed to start (error code: <tt>%1</tt>).</p>", error );
664
case QProcess::Crashed:
666
text = i18n( "<p>The process crashed (error code: <tt>%1</tt>).</p>", error );
669
case QProcess::Timedout:
671
text = i18n( "<p>The process timed out (error code: <tt>%1</tt>).</p>", error );
674
case QProcess::WriteError:
676
text = i18n( "<p>Could not write to the process (error code: <tt>%1</tt>).</p>", error );
679
case QProcess::ReadError:
681
text = i18n( "<p>Could not read from the process (error code: <tt>%1</tt>).</p>", error );
684
case QProcess::UnknownError:
687
text = i18n( "<p>The process reported an unknown error.</p>" );
692
KNotification *notification = KNotification::event( KNotification::Error,
695
KIconLoader::global()->loadIcon( "dialog-error", KIconLoader::NoGroup, 0,
696
KIconLoader::DefaultState ),
698
KNotification::Persistent );
699
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
703
void Smb4KNotification::systemCallFailed( const QString &sys_call, int err_no )
711
// This is thread safe.
714
msg = strerror_r( err_no, buf, len );
716
if ( buf[0] == '\0' )
718
// Buffer was not used
719
text = i18n( "<p>The system call <b>%1</b> failed:</p><p><tt>%2</tt></p>", sys_call, QString( msg ) );
723
text = i18n( "<p>The system call <b>%1</b> failed:</p><p><tt>%2</tt></p>", sys_call, QString( buf ) );
726
if ( strerror_r( err_no, buf, len ) == 0 )
728
text = i18n( "<p>The system call <b>%1</b> failed:</p><p><tt>%2</tt></p>", sys_call, QString( buf ) );
736
KNotification *notification = KNotification::event( KNotification::Error,
739
KIconLoader::global()->loadIcon( "dialog-error", KIconLoader::NoGroup, 0,
740
KIconLoader::DefaultState ),
742
KNotification::Persistent );
743
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
747
void Smb4KNotification::actionFailed( int err_code )
749
QString text, err_msg;
753
case ActionReply::NoResponder:
755
err_msg = "NoResponder";
758
case ActionReply::NoSuchAction:
760
err_msg = "NoSuchAction";
763
case ActionReply::InvalidAction:
765
err_msg = "InvalidAction";
768
case ActionReply::AuthorizationDenied:
770
err_msg = "AuthorizationDenied";
773
case ActionReply::UserCancelled:
775
err_msg = "UserCancelled";
778
case ActionReply::HelperBusy:
780
err_msg = "HelperBusy";
783
case ActionReply::DBusError:
785
err_msg = "DBusError";
794
if ( !err_msg.isEmpty() )
796
text = i18n( "<p>Executing an action with root privileges failed (error code:<tt>%1</tt>).</p>", err_msg );
800
text = i18n( "<p>Executing an action with root privileges failed.</p>", err_msg );
803
KNotification *notification = KNotification::event( KNotification::Error,
806
KIconLoader::global()->loadIcon( "dialog-error", KIconLoader::NoGroup, 0,
807
KIconLoader::DefaultState ),
809
KNotification::Persistent );
810
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
814
void Smb4KNotification::invalidURLPassed()
816
KNotification *notification = KNotification::event( KNotification::Error,
818
i18n( "<p>The URL that was passed is invalid.</p>" ),
819
KIconLoader::global()->loadIcon( "dialog-error", KIconLoader::NoGroup, 0,
820
KIconLoader::DefaultState ),
822
KNotification::Persistent );
823
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
827
void Smb4KNotification::emptyBroadcastAreas()
829
KNotification *notification = KNotification::event( KNotification::Error,
831
i18n( "<p>There are no broadcast areas defined.</p>" ),
832
KIconLoader::global()->loadIcon( "dialog-error", KIconLoader::NoGroup, 0,
833
KIconLoader::DefaultState ),
835
KNotification::Persistent );
836
connect( notification, SIGNAL( closed() ), this, SLOT( slotNotificationClosed() ) );
839
/////////////////////////////////////////////////////////////////////////////
840
// SLOT IMPLEMENTATIONS
841
/////////////////////////////////////////////////////////////////////////////
843
void Smb4KNotification::slotNotificationClosed()
849
void Smb4KNotification::slotOpenShare()
851
KRun::runUrl( KUrl( m_share.canonicalPath() ), "inode/directory", 0 );
855
#include "smb4knotification.moc"