Пример #1
0
void AlbumChooserWidget::slotReloadAlbumsRequest()
{
    updateBusyStatus(true);

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

    startAlbumsReload();
}
Пример #2
0
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;
}
Пример #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);
}
Пример #4
0
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);
}