void AlbumChooserWidget::slotReloadAlbumsRequest()
{
    updateBusyStatus(true);

    int aid = 0;
    if (getCurrentAlbumId(aid))
    {
        m_albumToSelect = aid;
    }

    startAlbumsReload();
}
void AlbumChooserWidget::slotEditAlbumRequest()
{
    VkontakteAlbumDialog::AlbumInfo album;
    int aid = 0;
    if (!getCurrentAlbumInfo(album) || !getCurrentAlbumId(aid))
    {
        return;
    }

    QPointer<VkontakteAlbumDialog> dlg = new VkontakteAlbumDialog(this, album);

    if (dlg->exec() == QDialog::Accepted)
    {
        updateBusyStatus(true);
        startAlbumEditing(aid, dlg->album());
    }

    delete dlg;
}
Example #3
0
void AlbumChooserWidget::slotDeleteAlbumRequest()
{
    VkontakteAlbumDialog::AlbumInfo album;
    int aid = 0;

    if (!getCurrentAlbumInfo(album) || !getCurrentAlbumId(aid))
    {
        return;
    }

    if (QMessageBox::question(this, i18nc("@title:window", "Confirm Album Deletion"),
                              i18n("<qt>Are you sure you want to remove the album <b>%1</b> "
                                   "including all photos in it?</qt>", album.title))
            != QMessageBox::Yes)
    {
        return;
    }

    updateBusyStatus(true);
    startAlbumDeletion(aid);
}
void AlbumChooserWidget::slotDeleteAlbumRequest()
{
    VkontakteAlbumDialog::AlbumInfo album;
    int aid = 0;
    if (!getCurrentAlbumInfo(album) || !getCurrentAlbumId(aid))
    {
        return;
    }

    if (KMessageBox::warningContinueCancel(
        this,
        i18n("<qt>Are you sure you want to remove the album <b>%1</b> including all photos in it?</qt>", album.title),
        i18nc("@title:window", "Confirm Album Deletion"),
        KStandardGuiItem::del(),
        KStandardGuiItem::cancel(),
        QString("kipi_vkontakte_delete_album_with_photos")) != KMessageBox::Continue)
    {
        return;
    }

    updateBusyStatus(true);
    startAlbumDeletion(aid);
}