~ubuntu-branches/ubuntu/oneiric/kdepim/oneiric-updates

« back to all changes in this revision

Viewing changes to blogilo/src/toolbox.cpp

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2011-06-28 19:33:24 UTC
  • mfrom: (0.2.13) (0.1.13 sid)
  • Revision ID: package-import@ubuntu.com-20110628193324-8yvjs8sdv9rdoo6c
Tags: 4:4.7.0-0ubuntu1
* New upstream release
  - update install files
  - add missing kdepim-doc package to control file
  - Fix Vcs lines
  - kontact breaks/replaces korganizer << 4:4.6.80
  - tighten the dependency of kdepim-dev on libkdepim4 to fix lintian error

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
    This file is part of Blogilo, A KDE Blogging Client
3
3
 
4
 
    Copyright (C) 2008-2009 Mehrdad Momeny <mehrdad.momeny@gmail.com>
5
 
    Copyright (C) 2008-2009 Golnaz Nilieh <g382nilieh@gmail.com>
 
4
    Copyright (C) 2008-2010 Mehrdad Momeny <mehrdad.momeny@gmail.com>
 
5
    Copyright (C) 2008-2010 Golnaz Nilieh <g382nilieh@gmail.com>
6
6
 
7
7
    This program is free software; you can redistribute it and/or
8
8
    modify it under the terms of the GNU General Public License as
47
47
#include <QClipboard>
48
48
#include <QTimer>
49
49
 
 
50
class Toolbox::Private
 
51
{
 
52
public:
 
53
    QList<CatCheckBox*> listCategoryCheckBoxes;
 
54
    int mCurrentBlogId;
 
55
    KStatusBar *statusbar;
 
56
};
50
57
Toolbox::Toolbox( QWidget *parent )
51
 
        : QWidget( parent )
 
58
        : QWidget( parent ), d(new Private)
52
59
{
53
60
    kDebug();
54
 
    mCurrentBlogId = -1;
 
61
    d->mCurrentBlogId = -1;
55
62
    if ( parent )
56
 
        this->statusbar = qobject_cast<KXmlGuiWindow*>( parent )->statusBar();
 
63
        this->d->statusbar = qobject_cast<KXmlGuiWindow*>( parent )->statusBar();
57
64
    else
58
 
        this->statusbar = new KStatusBar( this );
 
65
        this->d->statusbar = new KStatusBar( this );
59
66
    setupUi( this );
60
67
    setButtonsIcon();
61
68
//     frameBlog->layout()->setAlignment( Qt::AlignTop );
63
70
//     reloadBlogList();
64
71
    optionsDate->setDate( QDateTime::currentDateTime().date() );
65
72
    optionsTime->setTime( QDateTime::currentDateTime().time() );
66
 
//     connect( btnBlogAdd, SIGNAL( clicked() ), this, SLOT( sltAddBlog() ) );
67
 
//     connect( btnBlogEdit, SIGNAL( clicked() ), this, SLOT( sltEditBlog() ) );
68
 
//     connect( btnBlogRemove, SIGNAL( clicked() ), this, SLOT( sltRemoveBlog() ) );
 
73
//     connect( btnBlogAdd, SIGNAL( clicked() ), this, SLOT( slotAddBlog() ) );
 
74
//     connect( btnBlogEdit, SIGNAL( clicked() ), this, SLOT( slotEditBlog() ) );
 
75
//     connect( btnBlogRemove, SIGNAL( clicked() ), this, SLOT( slotRemoveBlog() ) );
69
76
 
70
 
    connect( btnCatReload, SIGNAL( clicked() ), this, SLOT( sltReloadCategoryList() ) );
71
 
    connect( btnEntriesUpdate, SIGNAL( clicked() ), this, SLOT( sltUpdateEntries() ) );
 
77
    connect( btnCatReload, SIGNAL( clicked() ), this, SLOT( slotReloadCategoryList() ) );
 
78
    connect( btnEntriesUpdate, SIGNAL( clicked() ), this, SLOT( slotUpdateEntries() ) );
72
79
    connect( btnEntriesClear, SIGNAL( clicked(bool) ), this, SLOT( clearEntries()) );
73
80
 
74
 
//     connect( this, SIGNAL( sigCurrentBlogChanged( int ) ), this, SLOT( sltCurrentBlogChanged( int ) ) );
75
 
//     connect( &listBlogRadioButtons, SIGNAL( buttonClicked( int ) ), this, SLOT( sltSetCurrentBlog() ) );
 
81
//     connect( this, SIGNAL( sigCurrentBlogChanged( int ) ), this, SLOT( slotCurrentBlogChanged( int ) ) );
 
82
//     connect( &listBlogRadioButtons, SIGNAL( buttonClicked( int ) ), this, SLOT( slotSetCurrentBlog() ) );
76
83
 
77
84
    connect( lstEntriesList, SIGNAL( itemDoubleClicked( QListWidgetItem* ) ),
78
 
             this, SLOT( sltEntrySelected( QListWidgetItem* ) ) );
79
 
//     connect( btnEntriesCopyUrl, SIGNAL( clicked( bool ) ), this, SLOT( sltEntriesCopyUrl() ) );
80
 
    connect( btnEntriesRemove, SIGNAL( clicked(bool) ), this, SLOT( sltRemoveSelectedEntryFromServer() ) );
 
85
             this, SLOT( slotEntrySelected( QListWidgetItem* ) ) );
 
86
//     connect( btnEntriesCopyUrl, SIGNAL( clicked( bool ) ), this, SLOT( slotEntriesCopyUrl() ) );
 
87
    connect( btnEntriesRemove, SIGNAL( clicked(bool) ), this, SLOT( slotRemoveSelectedEntryFromServer() ) );
81
88
 
82
89
    connect( btnOptionsNow, SIGNAL( clicked(bool)), this, SLOT( setDateTimeNow() ) );
83
90
    connect( localEntriesTable, SIGNAL( cellDoubleClicked(int,int) ),
84
 
             this, SLOT(sltLocalEntrySelected(int,int)) );
85
 
    connect( btnLocalRemove, SIGNAL( clicked( bool ) ) , this, SLOT( sltRemoveLocalEntry() ) );
 
91
             this, SLOT(slotLocalEntrySelected(int,int)) );
 
92
    connect( btnLocalRemove, SIGNAL( clicked( bool ) ) , this, SLOT( slotRemoveLocalEntry() ) );
86
93
 
87
94
    lblOptionsTrackBack->setVisible( false );
88
95
    txtOptionsTrackback->setVisible( false );
98
105
void Toolbox::setCurrentBlogId( int blog_id )
99
106
{
100
107
    kDebug()<<blog_id;
101
 
    if( mCurrentBlogId == blog_id )
 
108
    if( d->mCurrentBlogId == blog_id )
102
109
        return;
103
110
//     btnBlogEdit->setEnabled( true );
104
111
//     btnBlogRemove->setEnabled( true );
105
 
    mCurrentBlogId = blog_id;
 
112
    d->mCurrentBlogId = blog_id;
106
113
    if( blog_id <= 0 )
107
114
        return;
108
 
    sltLoadCategoryListFromDB( blog_id );
109
 
    sltLoadEntriesFromDB( blog_id );
 
115
    slotLoadCategoryListFromDB( blog_id );
 
116
    slotLoadEntriesFromDB( blog_id );
110
117
    Qt::LayoutDirection ll = DBMan::self()->blogList().value( blog_id )->direction();
111
118
    frameCat->setLayoutDirection( ll );
112
119
    lstEntriesList->setLayoutDirection( ll );
113
120
}
114
121
 
115
 
void Toolbox::sltReloadCategoryList()
 
122
void Toolbox::slotReloadCategoryList()
116
123
{
117
124
    kDebug();
118
125
//     QAbstractButton *btn = listBlogRadioButtons.checkedButton();
119
 
    if ( mCurrentBlogId == -1 ) {
 
126
    if ( d->mCurrentBlogId == -1 ) {
120
127
        KMessageBox::sorry( this, i18n( "No blog has been selected: \
121
128
you have to select a blog from the Blogs page before asking for the list of categories." ) );
122
129
        return;
123
130
    }
124
131
 
125
 
    Backend *b = new Backend( mCurrentBlogId );
 
132
    Backend *b = new Backend( d->mCurrentBlogId );
 
133
    connect( b, SIGNAL( sigCategoryListFetched( int ) ), this, SLOT( slotLoadCategoryListFromDB( int ) ) );
 
134
    connect( b, SIGNAL( sigError( const QString& ) ), this, SIGNAL( sigError( const QString& ) ) );
 
135
    emit sigBusy( true );
 
136
    d->statusbar->showMessage( i18n( "Requesting list of categories..." ) );
126
137
    b->getCategoryListFromServer();
127
 
    connect( b, SIGNAL( sigCategoryListFetched( int ) ), this, SLOT( sltLoadCategoryListFromDB( int ) ) );
128
 
    connect( b, SIGNAL( sigError( const QString& ) ), this, SIGNAL( sigError( const QString& ) ) );
129
 
    statusbar->showMessage( i18n( "Requesting list of categories..." ) );
130
 
    this->setCursor( Qt::BusyCursor );
131
 
    emit sigBusy( true );
 
138
//     this->setCursor( Qt::BusyCursor );
132
139
}
133
140
 
134
 
void Toolbox::sltUpdateEntries(int count)
 
141
void Toolbox::slotUpdateEntries(int count)
135
142
{
136
143
    kDebug();
137
 
    if ( mCurrentBlogId == -1 ) {
 
144
    if ( d->mCurrentBlogId == -1 ) {
138
145
        KMessageBox::sorry( this, i18n( "No blog has been selected: \
139
146
you have to select a blog from the Blogs page before asking for the list of entries." ) );
140
147
        kDebug() << "There isn't any selected blog.";
151
158
            dia->deleteLater();
152
159
        }
153
160
    }
154
 
    Backend *entryB = new Backend( mCurrentBlogId, this);
 
161
    Backend *entryB = new Backend( d->mCurrentBlogId, this);
155
162
    entryB->getEntriesListFromServer( count );
156
 
    connect( entryB, SIGNAL( sigEntriesListFetched( int ) ), this, SLOT( sltLoadEntriesFromDB( int ) ) );
 
163
    connect( entryB, SIGNAL( sigEntriesListFetched( int ) ), this, SLOT( slotLoadEntriesFromDB( int ) ) );
157
164
    connect( entryB, SIGNAL( sigError( const QString& ) ), this, SIGNAL( sigError( const QString& ) ) );
158
 
    statusbar->showMessage( i18n( "Requesting list of entries..." ) );
 
165
    d->statusbar->showMessage( i18n( "Requesting list of entries..." ) );
159
166
    this->setCursor( Qt::BusyCursor );
160
167
    emit sigBusy( true );
161
168
}
162
169
 
163
 
void Toolbox::sltLoadEntriesFromDB( int blog_id )
 
170
void Toolbox::slotLoadEntriesFromDB( int blog_id )
164
171
{
165
172
    kDebug();
166
173
    if ( blog_id == -1 ) {
181
188
        lstItem->setData( 32, listEntries[i].value("id").toInt() );
182
189
        lstEntriesList->addItem( lstItem );
183
190
    }
184
 
    statusbar->showMessage( i18n( "List of entries received." ), STATUSTIMEOUT );
 
191
    d->statusbar->showMessage( i18n( "List of entries received." ), STATUSTIMEOUT );
185
192
    this->unsetCursor();
186
193
    emit sigBusy( false );
187
194
}
188
195
 
189
 
void Toolbox::sltLoadCategoryListFromDB( int blog_id )
 
196
void Toolbox::slotLoadCategoryListFromDB( int blog_id )
190
197
{
191
198
    kDebug();
192
199
    if ( blog_id == -1 ) {
202
209
    for ( i = listCategories.constBegin(); i != endIt; ++i ) {
203
210
        CatCheckBox *cb = new CatCheckBox( i->name, this );
204
211
        cb->setCategory( *i );
205
 
        listCategoryCheckBoxes.append( cb );
 
212
        d->listCategoryCheckBoxes.append( cb );
206
213
        frameCat->layout()->addWidget( cb );
207
214
    }
208
 
    statusbar->showMessage( i18n( "List of categories received." ), STATUSTIMEOUT );
 
215
    d->statusbar->showMessage( i18n( "List of categories received." ), STATUSTIMEOUT );
209
216
    this->unsetCursor();
210
217
    emit sigBusy( false );
211
218
}
212
219
 
213
 
void Toolbox::sltRemoveSelectedEntryFromServer()
 
220
void Toolbox::slotRemoveSelectedEntryFromServer()
214
221
{
215
222
    if(lstEntriesList->selectedItems().count() < 1)
216
223
        return;
217
224
    if( KMessageBox::warningYesNoCancel(this, i18n( "Removing a post from your blog cannot be undone.\
218
225
\nAre you sure you want to remove the post with title \"%1\" from your blog?", lstEntriesList->currentItem()->text() ))
219
226
    == KMessageBox::Yes) {
220
 
        BilboPost post = DBMan::self()->getPostInfo( lstEntriesList->currentItem()->data(32).toInt() );
221
 
        Backend *b = new Backend( mCurrentBlogId, this);
 
227
        BilboPost *post = new BilboPost( DBMan::self()->getPostInfo( lstEntriesList->currentItem()->
 
228
                                                                     data(32).toInt() ) );
 
229
        Backend *b = new Backend( d->mCurrentBlogId, this);
222
230
        connect(b, SIGNAL(sigPostRemoved(int,const BilboPost&)), this, SLOT(slotPostRemoved(int,const BilboPost&)) );
223
231
        connect(b, SIGNAL(sigError(const QString&)), this, SLOT(slotError(const QString&)));
224
232
        b->removePost(post);
225
 
        statusbar->showMessage( i18n( "Removing post..." ) );
 
233
        d->statusbar->showMessage( i18n( "Removing post..." ) );
226
234
    }
227
235
}
228
236
 
230
238
{
231
239
    KMessageBox::information( this, i18nc( "Post removed from Blog", "Post with title \"%1\" removed from \"%2\".",
232
240
                                          post.title(), DBMan::self()->blogList().value(blog_id)->title() ) );
233
 
    sltLoadEntriesFromDB( blog_id );
234
 
    statusbar->showMessage( i18n( "Post removed" ), STATUSTIMEOUT );
 
241
    slotLoadEntriesFromDB( blog_id );
 
242
    d->statusbar->showMessage( i18n( "Post removed" ), STATUSTIMEOUT );
235
243
    sender()->deleteLater();
236
244
}
237
245
 
238
 
 
239
246
void Toolbox::slotError(const QString& errorMessage)
240
247
{
241
248
    KMessageBox::detailedError( this, i18n( "An error occurred in the latest transaction." ), errorMessage );
242
 
    statusbar->showMessage( i18nc( "Operation failed", "Failed" ), STATUSTIMEOUT );
 
249
    d->statusbar->showMessage( i18nc( "Operation failed", "Failed" ), STATUSTIMEOUT );
243
250
    sender()->deleteLater();
244
251
}
245
252
 
279
286
void Toolbox::clearCatList()
280
287
{
281
288
    kDebug();
282
 
    foreach( CatCheckBox* cat, listCategoryCheckBoxes ){
 
289
    foreach( CatCheckBox* cat, d->listCategoryCheckBoxes ){
283
290
        cat->deleteLater();
284
291
    }
285
 
    listCategoryCheckBoxes.clear();
 
292
    d->listCategoryCheckBoxes.clear();
286
293
}
287
294
 
288
 
void Toolbox::getFieldsValue( BilboPost &currentPost )
 
295
void Toolbox::getFieldsValue( BilboPost* currentPost )
289
296
{
290
297
    kDebug();
291
 
    currentPost.setCategoryList( this->selectedCategories() );
292
 
    currentPost.setTags( this->currentTags() );
293
 
    currentPost.setModifyTimeStamp( this->chkOptionsTime->isChecked() );
294
 
    if ( currentPost.status() == KBlog::BlogPost::New ) {
 
298
    currentPost->setCategoryList( this->selectedCategories() );
 
299
    currentPost->setTags( this->currentTags() );
 
300
    currentPost->setModifyTimeStamp( this->chkOptionsTime->isChecked() );
 
301
    if ( currentPost->status() == KBlog::BlogPost::New ) {
295
302
        if ( chkOptionsTime->isChecked() ) {
296
 
            currentPost.setModificationDateTime( KDateTime( optionsDate->date(), optionsTime->time() ) );
297
 
            currentPost.setCreationDateTime( KDateTime( optionsDate->date(), optionsTime->time() ) );
 
303
            currentPost->setModificationDateTime( KDateTime( optionsDate->date(), optionsTime->time() ) );
 
304
            currentPost->setCreationDateTime( KDateTime( optionsDate->date(), optionsTime->time() ) );
298
305
        } else {
299
 
            currentPost.setCreationDateTime( KDateTime::currentLocalDateTime() );
300
 
            currentPost.setModificationDateTime( KDateTime::currentLocalDateTime() );
 
306
            currentPost->setCreationDateTime( KDateTime::currentLocalDateTime() );
 
307
            currentPost->setModificationDateTime( KDateTime::currentLocalDateTime() );
301
308
        }
302
309
    } else {
303
 
        currentPost.setCreationDateTime( KDateTime( optionsDate->date(), optionsTime->time() ) );
304
 
        currentPost.setModificationDateTime( KDateTime( optionsDate->date(), optionsTime->time() ) );
 
310
        currentPost->setCreationDateTime( KDateTime( optionsDate->date(), optionsTime->time() ) );
 
311
        currentPost->setModificationDateTime( KDateTime( optionsDate->date(), optionsTime->time() ) );
305
312
    }
306
 
    if( currentPost.creationDateTime().isUtc() || currentPost.modificationDateTime().isUtc() ){
 
313
    if( currentPost->creationDateTime().isUtc() || currentPost->modificationDateTime().isUtc() ){
307
314
        kDebug()<<"creationDateTime was UTC!";
308
 
        currentPost.setCreationDateTime( KDateTime( currentPost.creationDateTime().dateTime(),
 
315
        currentPost->setCreationDateTime( KDateTime( currentPost->creationDateTime().dateTime(),
309
316
                                                    KDateTime::LocalZone ) );
310
 
        currentPost.setModificationDateTime( KDateTime( currentPost.modificationDateTime().dateTime(),
 
317
        currentPost->setModificationDateTime( KDateTime( currentPost->modificationDateTime().dateTime(),
311
318
                                                    KDateTime::LocalZone ) );
312
319
    }
313
 
    currentPost.setSlug( txtSlug->text() );
314
 
    currentPost.setPrivate(( comboOptionsStatus->currentIndex() == 1 ) ? true : false );
315
 
    currentPost.setCommentAllowed( chkOptionsComments->isChecked() );
316
 
    currentPost.setTrackBackAllowed( chkOptionsTrackback->isChecked() );
317
 
    currentPost.setSummary( txtSummary->toPlainText() );
 
320
    currentPost->setSlug( txtSlug->text() );
 
321
    currentPost->setPrivate(( comboOptionsStatus->currentIndex() == 1 ) ? true : false );
 
322
    currentPost->setCommentAllowed( chkOptionsComments->isChecked() );
 
323
    currentPost->setTrackBackAllowed( chkOptionsTrackback->isChecked() );
 
324
    currentPost->setSummary( txtSummary->toPlainText() );
318
325
}
319
326
 
320
327
void Toolbox::setFieldsValue( BilboPost* post )
355
362
{
356
363
    kDebug();
357
364
    QList<Category> list;
358
 
    int count = listCategoryCheckBoxes.count();
 
365
    int count = d->listCategoryCheckBoxes.count();
359
366
    for ( int i = 0; i < count; ++i ) {
360
 
        if ( listCategoryCheckBoxes[i]->isChecked() )
361
 
            list.append( listCategoryCheckBoxes[i]->category() );
 
367
        if ( d->listCategoryCheckBoxes[i]->isChecked() )
 
368
            list.append( d->listCategoryCheckBoxes[i]->category() );
362
369
    }
363
370
    return list;
364
371
}
367
374
{
368
375
    kDebug();
369
376
    QStringList list;
370
 
    int count = listCategoryCheckBoxes.count();
 
377
    int count = d->listCategoryCheckBoxes.count();
371
378
    for ( int i = 0; i < count; ++i ) {
372
 
        if ( listCategoryCheckBoxes[i]->isChecked() )
373
 
            list.append( listCategoryCheckBoxes[i]->category().name );
 
379
        if ( d->listCategoryCheckBoxes[i]->isChecked() )
 
380
            list.append( d->listCategoryCheckBoxes[i]->category().name );
374
381
    }
375
382
    return list;
376
383
}
377
384
 
378
 
QList< int > Toolbox::selectedCategoriesId()
379
 
{
380
 
    ///TODO Implement it
381
 
    kDebug() << "NOT IMPLEMENTED YET!";
382
 
    return QList<int>();
383
 
}
384
 
 
385
385
void Toolbox::setSelectedCategories( const QStringList &list )
386
386
{
387
387
    unCheckCatList();
388
 
    int count = listCategoryCheckBoxes.count();
 
388
    int count = d->listCategoryCheckBoxes.count();
389
389
    for ( int i = 0; i < count; ++i ) {
390
 
        if ( list.contains( listCategoryCheckBoxes[i]->category().name, Qt::CaseInsensitive ) )
391
 
            listCategoryCheckBoxes[i]->setChecked( true );
 
390
        if ( list.contains( d->listCategoryCheckBoxes[i]->category().name, Qt::CaseInsensitive ) )
 
391
            d->listCategoryCheckBoxes[i]->setChecked( true );
392
392
    }
393
393
}
394
394
 
395
 
void Toolbox::setSelectedCategories( const QList< int > & )
396
 
{
397
 
    ///TODO Implement it
398
 
    kDebug() << "NOT IMPLEMENTED YET!";
399
 
}
400
 
 
401
395
QStringList Toolbox::currentTags()
402
396
{
403
397
    kDebug();
409
403
    return t;
410
404
}
411
405
 
412
 
void Toolbox::sltEntrySelected( QListWidgetItem * item )
 
406
void Toolbox::slotEntrySelected( QListWidgetItem * item )
413
407
{
414
408
    kDebug();
415
409
//     setFieldsValue(*post);
416
410
    BilboPost post = DBMan::self()->getPostInfo( item->data( 32 ).toInt() );
417
411
    kDebug() << "Emiting sigEntrySelected...";
418
 
    Q_EMIT sigEntrySelected( post, mCurrentBlogId );
 
412
    Q_EMIT sigEntrySelected( post, d->mCurrentBlogId );
419
413
}
420
414
 
421
415
void Toolbox::setCurrentPage( int index )
423
417
    box->setCurrentIndex( index );
424
418
}
425
419
 
426
 
void Toolbox::sltEntriesCopyUrl()
 
420
void Toolbox::slotEntriesCopyUrl()
427
421
{
428
422
    if ( lstEntriesList->currentItem() == 0 ) {
429
423
        return;
440
434
Toolbox::~Toolbox()
441
435
{
442
436
    kDebug();
 
437
    delete d;
443
438
}
444
439
 
445
440
void Toolbox::unCheckCatList()
446
441
{
447
 
    int count = listCategoryCheckBoxes.count();
 
442
    int count = d->listCategoryCheckBoxes.count();
448
443
    for ( int j = 0; j < count; ++j ) {
449
 
        listCategoryCheckBoxes[j]->setChecked( false );
 
444
        d->listCategoryCheckBoxes[j]->setChecked( false );
450
445
    }
451
446
}
452
447
 
495
490
    }
496
491
}
497
492
 
498
 
void Toolbox::sltLocalEntrySelected( int row, int column )
 
493
void Toolbox::slotLocalEntrySelected( int row, int column )
499
494
{
500
495
    kDebug()<<"Emitting sigEntrySelected...";
501
496
    Q_UNUSED(column);
503
498
    emit sigEntrySelected( post, localEntriesTable->item(row, 1)->data(32).toInt() );
504
499
}
505
500
 
506
 
void Toolbox::sltRemoveLocalEntry()
 
501
void Toolbox::slotRemoveLocalEntry()
507
502
{
508
503
    kDebug();
509
504
    if(localEntriesTable->selectedItems().count() > 0) {
526
521
void Toolbox::clearEntries()
527
522
{
528
523
    kDebug();
529
 
    if( mCurrentBlogId == -1 )
 
524
    if( d->mCurrentBlogId == -1 )
530
525
        return;
531
526
    if ( KMessageBox::warningContinueCancel(this, i18n("Are you sure you want to clear the list of entries?")) ==
532
527
         KMessageBox::Cancel )
533
528
        return;
534
 
    if ( DBMan::self()->clearPosts( mCurrentBlogId ) )
 
529
    if ( DBMan::self()->clearPosts( d->mCurrentBlogId ) )
535
530
        lstEntriesList->clear();
536
531
    else
537
532
        KMessageBox::detailedSorry(this, i18n( "Cannot clear the list of entries." ) , DBMan::self()->lastErrorText());
552
547
    connect( actEntriesOpenInBrowser, SIGNAL( triggered() ), this, SLOT( openPostInBrowser() ) );
553
548
    KAction *actEntriesCopyUrl = new KAction( KIcon("edit-copy"),
554
549
                                              i18n("Copy URL"), entriesContextMenu );
555
 
    connect( actEntriesCopyUrl, SIGNAL( triggered(bool) ), this, SLOT( sltEntriesCopyUrl() ) );
 
550
    connect( actEntriesCopyUrl, SIGNAL( triggered(bool) ), this, SLOT( slotEntriesCopyUrl() ) );
556
551
    KAction *actEntriesCopyTitle = new KAction( KIcon("edit-copy"),
557
552
                                                i18n("Copy title"), entriesContextMenu );
558
553
    connect( actEntriesCopyTitle, SIGNAL( triggered(bool) ), this, SLOT( copyPostTitle() ) );
573
568
    else if ( !post.link().isEmpty() )
574
569
        url = post.link().pathOrUrl();
575
570
    else
576
 
        url = DBMan::self()->blogList().value( mCurrentBlogId )->blogUrl();
 
571
        url = DBMan::self()->blogList().value( d->mCurrentBlogId )->blogUrl();
577
572
    KToolInvocation::invokeBrowser ( url );
578
573
}
579
574