~ubuntu-branches/ubuntu/precise/smb4k/precise

« back to all changes in this revision

Viewing changes to smb4k/iconview/smb4ksharesiconview_part.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Richard A. Johnson
  • Date: 2008-11-23 12:14:34 UTC
  • mfrom: (1.1.14 upstream)
  • Revision ID: james.westby@ubuntu.com-20081123121434-88cpidapbcqteud1
Tags: 0.10.1-0ubuntu1
* New upstream release for KDE 4
* Closes
  - (LP: #238011)
  - (LP: #248510)
  - (LP: #261803)
  - (LP: #262225)
  - (LP: #275539)
* Updated debian/
  - control: updated for new deps and removed old deps, bumped versions,
    modified Maintainer
  - rules: removed all but the kde4.mk for cdbs

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/***************************************************************************
2
 
    smb4ksharesview_part  -  This Part includes the shares icon view
3
 
    of Smb4K.
4
 
                             -------------------
5
 
    begin                : Mo Dez 4 2006
6
 
    copyright            : (C) 2006 by Alexander Reinholdt
7
 
    email                : dustpuppy@users.berlios.de
8
 
 ***************************************************************************/
9
 
 
10
 
/***************************************************************************
11
 
 *   This program is free software; you can redistribute it and/or modify  *
12
 
 *   it under the terms of the GNU General Public License as published by  *
13
 
 *   the Free Software Foundation; either version 2 of the License, or     *
14
 
 *   (at your option) any later version.                                   *
15
 
 *                                                                         *
16
 
 *   This program is distributed in the hope that it will be useful, but   *
17
 
 *   WITHOUT ANY WARRANTY; without even the implied warranty of            *
18
 
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
19
 
 *   General Public License for more details.                              *
20
 
 *                                                                         *
21
 
 *   You should have received a copy of the GNU General Public License     *
22
 
 *   along with this program; if not, write to the                         *
23
 
 *   Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,   *
24
 
 *   MA  02111-1307 USA                                                    *
25
 
 ***************************************************************************/
26
 
 
27
 
// KDE includes
28
 
#include <kglobal.h>
29
 
#include <kstdaction.h>
30
 
#include <klocale.h>
31
 
#include <kaboutdata.h>
32
 
#include <klocale.h>
33
 
#include <kaction.h>
34
 
#include <kshortcut.h>
35
 
#include <kdebug.h>
36
 
#include <kpopupmenu.h>
37
 
#include <kiconloader.h>
38
 
#include <kactionclasses.h>
39
 
 
40
 
// application specific includes
41
 
#include "smb4ksharesiconview_part.h"
42
 
#include "smb4ksharesiconview.h"
43
 
#include "smb4ksharesiconviewitem.h"
44
 
#include "../dialogs/smb4ksynchronizationdialog.h"
45
 
#include "../core/smb4kshare.h"
46
 
#include "../core/smb4kcore.h"
47
 
#include "../core/smb4ksettings.h"
48
 
 
49
 
 
50
 
KInstance *Smb4KSharesIconViewPartFactory::m_instance = 0L;
51
 
KAboutData *Smb4KSharesIconViewPartFactory::m_about = 0L;
52
 
 
53
 
 
54
 
Smb4KSharesIconViewPart::Smb4KSharesIconViewPart( QWidget *parentWidget, const char *widgetName,
55
 
                                                  QObject *parent, const char *name )
56
 
: KParts::Part( parent, name )
57
 
{
58
 
  // First of all We need an instance:
59
 
  setInstance( Smb4KSharesIconViewPartFactory::instance() );
60
 
 
61
 
  // Set the XML file:
62
 
  setXMLFile( "smb4ksharesiconview_part.rc" );
63
 
 
64
 
  // Set the widget of this part:
65
 
  m_widget = new Smb4KSharesIconView( parentWidget, widgetName );
66
 
  setWidget( m_widget );
67
 
 
68
 
  // Set up the actions.
69
 
  // Do not put this before setWidget() or the shortcuts
70
 
  // will not be shown.
71
 
  setupActions();
72
 
 
73
 
  // Import the shares:
74
 
  slotMountedShares();
75
 
 
76
 
  // Load settings:
77
 
  loadSettings();
78
 
 
79
 
  // Add some connections:
80
 
  connect( Smb4KCore::mounter(),      SIGNAL( updated() ),
81
 
           this,                      SLOT( slotMountedShares() ) );
82
 
 
83
 
  connect( Smb4KCore::synchronizer(), SIGNAL( state( int ) ),
84
 
           this,                      SLOT( slotSynchronizationState( int ) ) );
85
 
 
86
 
  connect( m_widget,                  SIGNAL( contextMenuRequested( QIconViewItem *, const QPoint & ) ),
87
 
           this,                      SLOT( slotContextMenuRequested( QIconViewItem *, const QPoint & ) ) );
88
 
 
89
 
  connect( m_widget,                  SIGNAL( selectionChanged( QIconViewItem * ) ),
90
 
           this,                      SLOT( slotSelectionChanged( QIconViewItem * ) ) );
91
 
 
92
 
  connect( m_widget,                  SIGNAL( pressed( QIconViewItem * ) ),
93
 
           this,                      SLOT( slotMouseButtonPressed( QIconViewItem * ) ) );
94
 
 
95
 
  connect( m_widget,                  SIGNAL( executed( QIconViewItem * ) ),
96
 
           this,                      SLOT( slotFilemanager() ) );
97
 
}
98
 
 
99
 
 
100
 
Smb4KSharesIconViewPart::~Smb4KSharesIconViewPart()
101
 
{
102
 
}
103
 
 
104
 
 
105
 
void Smb4KSharesIconViewPart::setupActions()
106
 
{
107
 
  // Create the actions:
108
 
  KAction *unmount =   new KAction( i18n( "&Unmount" ), "hdd_unmount", KShortcut( CTRL+Key_U ),
109
 
                                    this, SLOT( slotUnmountShare() ),
110
 
                                    actionCollection(), "unmount_action" );
111
 
#ifdef __linux__
112
 
  KAction *force =     new KAction( i18n( "&Force Unmounting" ), "hdd_unmount", KShortcut( CTRL+Key_F ),
113
 
                                    this, SLOT( slotForceUnmountShare() ),
114
 
                                    actionCollection(), "force_unmount_action" );
115
 
#endif
116
 
  KAction *all =       new KAction( i18n( "U&nmount All" ), "gear", KShortcut( CTRL+Key_N ),
117
 
                                    this, SLOT( slotUnmountAllShares() ),
118
 
                                    actionCollection(), "unmount_all_action" );
119
 
  KAction *sync =      new KAction( i18n( "S&ynchronize" ), "bottom", KShortcut( CTRL+Key_Y ),
120
 
                                    this, SLOT( slotSynchronize() ),
121
 
                                    actionCollection(), "synchronize_action" );
122
 
  KAction *konsole =   new KAction( i18n( "Open with Konso&le" ), "terminal", KShortcut( CTRL+Key_L ),
123
 
                                    this, SLOT( slotKonsole() ),
124
 
                                    actionCollection(), "konsole_action" );
125
 
  KAction *konq =      new KAction( i18n( "Open with &Konqueror" ), "kfm_home", KShortcut( CTRL+Key_K ),
126
 
                                    this, SLOT( slotFilemanager() ),
127
 
                                    actionCollection(), "filemanager_action" );
128
 
 
129
 
  // Disable all actions for now:
130
 
  unmount->setEnabled( false );
131
 
#ifdef __linux__
132
 
  force->setEnabled( false );
133
 
#endif
134
 
  all->setEnabled( false );
135
 
  sync->setEnabled( false );
136
 
  konsole->setEnabled( false );
137
 
  konq->setEnabled( false );
138
 
 
139
 
  // Insert the actions into the menu:
140
 
  m_menu = new KActionMenu( this, "SharesIconViewMenu" );
141
 
  m_menu->popupMenu()->insertTitle( SmallIcon( "hdd_mount" ), i18n( "Shares" ), 0 );
142
 
  m_menu->insert( unmount, -1 );
143
 
#ifdef __linux__
144
 
  m_menu->insert( force, -1 );
145
 
#endif
146
 
  m_menu->insert( all, -1 );
147
 
  m_menu->popupMenu()->insertSeparator( -1 );
148
 
  m_menu->insert( sync, -1 );
149
 
  m_menu->popupMenu()->insertSeparator( -1 );
150
 
  m_menu->insert( konsole, -1 );
151
 
  m_menu->insert( konq, -1 );
152
 
}
153
 
 
154
 
 
155
 
void Smb4KSharesIconViewPart::loadSettings()
156
 
{
157
 
#ifdef __linux__
158
 
  actionCollection()->action( "force_unmount_action" )->setEnabled( Smb4KSettings::useForceUnmount() );
159
 
#endif
160
 
 
161
 
  // Change the text of the share:
162
 
  for ( QIconViewItem *it = m_widget->firstItem(); it; it = it->nextItem() )
163
 
  {
164
 
    Smb4KSharesIconViewItem *item = static_cast<Smb4KSharesIconViewItem *>( it );
165
 
 
166
 
    if ( item )
167
 
    {
168
 
      item->setText( (Smb4KSettings::showMountPoint() ?
169
 
                      item->shareObject()->path() :
170
 
                      item->shareObject()->name()) );
171
 
    }
172
 
  }
173
 
 
174
 
  // Enable/disable support for dropping:
175
 
  m_widget->setAcceptDrops( Smb4KSettings::enableDropSupport() );
176
 
 
177
 
  // Load or remove all foreign shares. The easiest way to do this
178
 
  // is to invoke slotMountedShares():
179
 
  slotMountedShares();
180
 
}
181
 
 
182
 
 
183
 
void Smb4KSharesIconViewPart::customEvent( QCustomEvent *e )
184
 
{
185
 
  switch ( e->type() )
186
 
  {
187
 
    case EVENT_LOAD_SETTINGS:
188
 
    {
189
 
      loadSettings();
190
 
      slotMountedShares();
191
 
 
192
 
      break;
193
 
    }
194
 
    case EVENT_SET_FOCUS:
195
 
    {
196
 
      KIconView *view = static_cast<KIconView *>( m_widget );
197
 
 
198
 
      if ( view->count() != 0 )
199
 
      {
200
 
        view->setSelected( !view->currentItem() ?
201
 
                           view->firstItem() :
202
 
                           view->currentItem(), true, false );
203
 
      }
204
 
 
205
 
      view->setFocus();
206
 
 
207
 
      break;
208
 
    }
209
 
    default:
210
 
    {
211
 
      break;
212
 
    }
213
 
  }
214
 
 
215
 
  KParts::Part::customEvent( e );
216
 
}
217
 
 
218
 
 
219
 
/////////////////////////////////////////////////////////////////////////////
220
 
// SLOT IMPLEMENTATIONS (Smb4KSharesIconViewPart)
221
 
/////////////////////////////////////////////////////////////////////////////
222
 
 
223
 
void Smb4KSharesIconViewPart::slotContextMenuRequested( QIconViewItem *item, const QPoint &pos )
224
 
{
225
 
  if ( item )
226
 
  {
227
 
    m_menu->popupMenu()->changeTitle( 0, SmallIcon( "hdd_mount" ),
228
 
                                      static_cast<Smb4KSharesIconViewItem *>( item )->shareObject()->name() );
229
 
  }
230
 
  else
231
 
  {
232
 
    m_menu->popupMenu()->changeTitle( 0, SmallIcon( "hdd_mount" ), i18n( "Shares" ) );
233
 
  }
234
 
 
235
 
  m_menu->popupMenu()->exec( pos, 0 );
236
 
}
237
 
 
238
 
 
239
 
void Smb4KSharesIconViewPart::slotSelectionChanged( QIconViewItem *item )
240
 
{
241
 
  // NOTE: Here we only enable or disable the KActions. All other things
242
 
  // are done in the Smb4KSharesIconView class.
243
 
 
244
 
  // This slot is used to enable or disable the actions when the user
245
 
  // changes the item in the icon view. This slot won't be called when
246
 
  // the user clicks on the view port!
247
 
  if ( item )
248
 
  {
249
 
    actionCollection()->action( "unmount_action" )->setEnabled( true );
250
 
#ifdef __linux__
251
 
    actionCollection()->action( "force_unmount_action" )->setEnabled( Smb4KSettings::useForceUnmount() );
252
 
#endif
253
 
    actionCollection()->action( "unmount_all_action" )->setEnabled( true );
254
 
 
255
 
    Smb4KShare *share = static_cast<Smb4KSharesIconViewItem *>( item )->shareObject();
256
 
 
257
 
    if ( !share->isBroken() )
258
 
    {
259
 
      actionCollection()->action( "konsole_action" )->setEnabled( !Smb4KSettings::konsole().isEmpty() );
260
 
      actionCollection()->action( "filemanager_action" )->setEnabled( true );
261
 
      actionCollection()->action( "synchronize_action" )->setEnabled( !Smb4KSettings::rsync().isEmpty() &&
262
 
                                                                      !Smb4KCore::synchronizer()->isRunning() );
263
 
    }
264
 
    else
265
 
    {
266
 
      actionCollection()->action( "konsole_action" )->setEnabled( false );
267
 
      actionCollection()->action( "filemanager_action" )->setEnabled( false );
268
 
      actionCollection()->action( "synchronize_action" )->setEnabled( false );
269
 
    }
270
 
  }
271
 
  else
272
 
  {
273
 
    // Smb4KSharesIconViewPart::slotMouseButtonPressed()
274
 
  }
275
 
}
276
 
 
277
 
 
278
 
void Smb4KSharesIconViewPart::slotMouseButtonPressed( QIconViewItem *item )
279
 
{
280
 
  // NOTE: Here we only enable or disable the KActions. All other things
281
 
  // are done in the Smb4KSharesIconView class.
282
 
 
283
 
  // Here we do all the stuff that cannot be done in
284
 
  // Smb4KSharesIconViewPart::slotSelectionChanged()
285
 
  if ( !item )
286
 
  {
287
 
    actionCollection()->action( "unmount_action" )->setEnabled( false );
288
 
#ifdef __linux__
289
 
    actionCollection()->action( "force_unmount_action" )->setEnabled( false );
290
 
#endif
291
 
    actionCollection()->action( "unmount_all_action" )->setEnabled( (m_widget->count() > 0) );
292
 
    actionCollection()->action( "konsole_action" )->setEnabled( false );
293
 
    actionCollection()->action( "filemanager_action" )->setEnabled( false );
294
 
    actionCollection()->action( "synchronize_action" )->setEnabled( false );
295
 
  }
296
 
  else
297
 
  {
298
 
    // See Smb4KSharesIconViewPart::slotSelectionChanged()
299
 
  }
300
 
}
301
 
 
302
 
 
303
 
void Smb4KSharesIconViewPart::slotMountedShares()
304
 
{
305
 
  // Get the list of shares:
306
 
  QValueList<Smb4KShare *> list = Smb4KCore::mounter()->getShares();
307
 
 
308
 
  // Update the view:
309
 
  if ( !list.isEmpty() )
310
 
  {
311
 
    // Remove all obsolete items:
312
 
    Smb4KSharesIconViewItem *test_item = static_cast<Smb4KSharesIconViewItem *>( m_widget->firstItem() );
313
 
    Smb4KSharesIconViewItem *next_item = NULL;
314
 
 
315
 
    while ( test_item )
316
 
    {
317
 
      Smb4KShare *share = Smb4KCore::mounter()->findShareByPath( test_item->shareObject()->path() );
318
 
      next_item = static_cast<Smb4KSharesIconViewItem *>( test_item->nextItem() );
319
 
 
320
 
      if( !share || (test_item->shareObject()->isForeign() && !Smb4KSettings::showAllShares()) )
321
 
      {
322
 
        delete test_item;
323
 
        test_item = NULL;
324
 
      }
325
 
 
326
 
      test_item = next_item;
327
 
    }
328
 
 
329
 
    // Now process the entries in the list:
330
 
    bool already_in_view = false;
331
 
 
332
 
    for ( QValueListConstIterator<Smb4KShare *> it = list.begin(); it != list.end(); ++it )
333
 
    {
334
 
      // Check, whether the share is already in the list. Look for the
335
 
      // mount point.
336
 
      for ( Smb4KSharesIconViewItem *item = static_cast<Smb4KSharesIconViewItem *>( m_widget->firstItem() );
337
 
            item; item = static_cast<Smb4KSharesIconViewItem *>( item->nextItem() ) )
338
 
      {
339
 
        if ( QString::compare( item->shareObject()->path(), (*it)->path() ) == 0 ||
340
 
             QString::compare( item->shareObject()->canonicalPath(), (*it)->canonicalPath() ) == 0 )
341
 
        {
342
 
          // Replace the share object if something changed:
343
 
          if ( !item->sameShareObject( *it ) )
344
 
          {
345
 
            item->replaceShareObject( *it );
346
 
          }
347
 
 
348
 
          already_in_view = true;
349
 
 
350
 
          break;
351
 
        }
352
 
        else
353
 
        {
354
 
          continue;
355
 
        }
356
 
      }
357
 
 
358
 
      if ( !already_in_view )
359
 
      {
360
 
        if ( !Smb4KSettings::showAllShares() && (*it)->isForeign() )
361
 
        {
362
 
          // If the user does not want to have foreign shares
363
 
          // displayed continue.
364
 
          continue;
365
 
        }
366
 
        else
367
 
        {
368
 
          // Put the new item into the icon view:
369
 
          (void) new Smb4KSharesIconViewItem( *it, Smb4KSettings::showMountPoint(), m_widget );
370
 
 
371
 
          continue;
372
 
        }
373
 
      }
374
 
 
375
 
      already_in_view = false;
376
 
    }
377
 
 
378
 
    m_widget->sort( m_widget->sortDirection() );
379
 
  }
380
 
  else
381
 
  {
382
 
    m_widget->clear();
383
 
  }
384
 
 
385
 
  // Update the tool tip, if it exists:
386
 
  if ( m_widget->count() != 0 )
387
 
  {
388
 
    m_widget->updateToolTip();
389
 
  }
390
 
 
391
 
  // Enable/disable the actions:
392
 
  QIconViewItem *item = m_widget->currentItem();
393
 
  bool have_selected_item = (item && item->isSelected());
394
 
 
395
 
  actionCollection()->action( "unmount_action" )->setEnabled( have_selected_item );
396
 
#ifdef __linux__
397
 
  if ( Smb4KSettings::useForceUnmount() )
398
 
  {
399
 
    actionCollection()->action( "force_unmount_action" )->setEnabled( have_selected_item );
400
 
  }
401
 
  else
402
 
  {
403
 
    actionCollection()->action( "force_unmount_action" )->setEnabled( false );
404
 
  }
405
 
#endif
406
 
  actionCollection()->action( "unmount_all_action" )->setEnabled( (m_widget->count() > 0) );
407
 
  actionCollection()->action( "konsole_action" )->setEnabled( !Smb4KSettings::konsole().isEmpty() &&
408
 
                                                               have_selected_item );
409
 
  actionCollection()->action( "filemanager_action" )->setEnabled( have_selected_item );
410
 
  actionCollection()->action( "synchronize_action" )->setEnabled( !Smb4KSettings::rsync().isEmpty() &&
411
 
                                                                  !Smb4KCore::synchronizer()->isRunning() &&
412
 
                                                                  have_selected_item );
413
 
}
414
 
 
415
 
 
416
 
void Smb4KSharesIconViewPart::slotUnmountShare()
417
 
{
418
 
  Smb4KSharesIconViewItem *item = static_cast<Smb4KSharesIconViewItem *>( m_widget->currentItem() );
419
 
 
420
 
  if ( item )
421
 
  {
422
 
    Smb4KCore::mounter()->unmountShare( item->shareObject(), false );
423
 
  }
424
 
}
425
 
 
426
 
 
427
 
void Smb4KSharesIconViewPart::slotForceUnmountShare()
428
 
{
429
 
  Smb4KSharesIconViewItem *item = static_cast<Smb4KSharesIconViewItem *>( m_widget->currentItem() );
430
 
 
431
 
  if ( item )
432
 
  {
433
 
    Smb4KCore::mounter()->unmountShare( item->shareObject(), true );
434
 
  }
435
 
}
436
 
 
437
 
 
438
 
void Smb4KSharesIconViewPart::slotUnmountAllShares()
439
 
{
440
 
  Smb4KCore::mounter()->unmountAllShares();
441
 
}
442
 
 
443
 
 
444
 
void Smb4KSharesIconViewPart::slotSynchronize()
445
 
{
446
 
  Smb4KSharesIconViewItem *item = static_cast<Smb4KSharesIconViewItem *>( m_widget->currentItem() );
447
 
  Smb4KSynchronizationDialog *dlg = static_cast<Smb4KSynchronizationDialog *>( m_widget->child( "SynchronizationDialog", "Smb4KSynchronizationDialog", true ) );
448
 
 
449
 
  if ( item && !item->shareObject()->isBroken() && !dlg )
450
 
  {
451
 
    dlg = new Smb4KSynchronizationDialog( item->shareObject(), m_widget, "SynchronizationDialog" );
452
 
 
453
 
    dlg->show();
454
 
  }
455
 
}
456
 
 
457
 
void Smb4KSharesIconViewPart::slotKonsole()
458
 
{
459
 
  Smb4KSharesIconViewItem *item = static_cast<Smb4KSharesIconViewItem *>( m_widget->currentItem() );
460
 
 
461
 
  if ( item && !item->shareObject()->isBroken() )
462
 
  {
463
 
    Smb4KCore::open( item->shareObject(), Smb4KCore::Konsole );
464
 
  }
465
 
}
466
 
 
467
 
 
468
 
void Smb4KSharesIconViewPart::slotFilemanager()
469
 
{
470
 
  Smb4KSharesIconViewItem *item = static_cast<Smb4KSharesIconViewItem *>( m_widget->currentItem() );
471
 
 
472
 
  if ( item )
473
 
  {
474
 
    // Workaround: The item is not selected if you execute it, so
475
 
    // we have to do it here:
476
 
//     item->setSelected( true );
477
 
 
478
 
    if ( !item->shareObject()->isBroken() )
479
 
    {
480
 
      Smb4KCore::open( item->shareObject(), Smb4KCore::Konqueror );
481
 
    }
482
 
  }
483
 
}
484
 
 
485
 
 
486
 
void Smb4KSharesIconViewPart::slotSynchronizationState( int state )
487
 
{
488
 
  switch ( state )
489
 
  {
490
 
    case SYNCHRONIZER_START:
491
 
    {
492
 
      actionCollection()->action( "synchronize_action" )->setEnabled( false );
493
 
 
494
 
      break;
495
 
    }
496
 
    case SYNCHRONIZER_STOP:
497
 
    {
498
 
      actionCollection()->action( "synchronize_action" )->setEnabled( true );
499
 
 
500
 
      break;
501
 
    }
502
 
    default:
503
 
    {
504
 
      break;
505
 
    }
506
 
  }
507
 
}
508
 
 
509
 
 
510
 
 
511
 
/////////////////////////////////////////////////////////////////////////////
512
 
// FACTORY STUFF
513
 
/////////////////////////////////////////////////////////////////////////////
514
 
 
515
 
Smb4KSharesIconViewPartFactory::Smb4KSharesIconViewPartFactory()
516
 
: KParts::Factory()
517
 
{
518
 
}
519
 
 
520
 
 
521
 
Smb4KSharesIconViewPartFactory::~Smb4KSharesIconViewPartFactory()
522
 
{
523
 
  delete m_instance;
524
 
  delete m_about;
525
 
 
526
 
  m_instance = 0L;
527
 
}
528
 
 
529
 
 
530
 
KParts::Part *Smb4KSharesIconViewPartFactory::createPartObject( QWidget *parentWidget, const char *widgetName,
531
 
QObject *parent, const char *name, const char *, const QStringList & )
532
 
{
533
 
  Smb4KSharesIconViewPart *obj = new Smb4KSharesIconViewPart( parentWidget, widgetName, parent, name );
534
 
 
535
 
  // See if we are to be read-write or not
536
 
//   if (QCString(classname) == "KParts::ReadOnlyPart")
537
 
//   {
538
 
//     obj->setReadWrite(false);
539
 
//   }
540
 
 
541
 
  return obj;
542
 
}
543
 
 
544
 
 
545
 
KInstance *Smb4KSharesIconViewPartFactory::instance()
546
 
{
547
 
  if( !m_instance )
548
 
  {
549
 
    m_about = new KAboutData( "smb4ksharesiconviewpart", I18N_NOOP( "Smb4KSharesIconViewPart" ), "1.0" );
550
 
    m_about->addAuthor("Alexander Reinholdt", 0, "dustpuppy@users.berlios.de");
551
 
    m_about->setLicense( KAboutData::License_GPL );
552
 
    m_instance = new KInstance( m_about );
553
 
  }
554
 
 
555
 
  return m_instance;
556
 
}
557
 
 
558
 
 
559
 
/////////////////////////////////////////////////////////////////////////////
560
 
// INIT
561
 
/////////////////////////////////////////////////////////////////////////////
562
 
 
563
 
extern "C"
564
 
{
565
 
  void *init_libsmb4ksharesiconview()
566
 
  {
567
 
    KGlobal::locale()->insertCatalogue( "smb4k" );
568
 
    return new Smb4KSharesIconViewPartFactory;
569
 
  }
570
 
}
571
 
 
572
 
 
573
 
#include "smb4ksharesiconview_part.moc"