Commit 89fa44ae authored by Gilles Caulier's avatar Gilles Caulier 🗼
Browse files

factoring

parent 3634ac5e
......@@ -95,8 +95,6 @@ public:
KUrlLabel* logo;
Interface* interface;
Gallery* gallery;
GalleryTalker* talker;
......@@ -114,8 +112,6 @@ public:
GalleryWindow::Private::Private(GalleryWindow* const parent)
{
interface = 0;
gallery = 0;
talker = 0;
progressDlg = 0;
......@@ -215,12 +211,11 @@ GalleryWindow::Private::Private(GalleryWindow* const parent)
// --------------------------------------------------------------------------------------------------------------
GalleryWindow::GalleryWindow(Interface* const interface, QWidget* const parent, Gallery* const pGallery)
GalleryWindow::GalleryWindow(QWidget* const parent, Gallery* const pGallery)
: KPToolDialog(parent),
d(new Private(this))
{
d->interface = interface;
d->gallery = pGallery;
d->gallery = pGallery;
setWindowTitle( i18n("Gallery Export") );
setButtons( KDialog::Close | KDialog::User1 | KDialog::Help);
......@@ -693,7 +688,7 @@ void GalleryWindow::slotAddPhoto()
return; // NO album name found: FIXME: do something
// photoPath
const KUrl::List urls(d->interface->currentSelection().images());
const KUrl::List urls(iface()->currentSelection().images());
if (urls.isEmpty())
return; // NO photo selected: FIXME: do something
......
......@@ -61,7 +61,7 @@ class GalleryWindow : public KPToolDialog
public:
GalleryWindow(Interface* const interface, QWidget* const parent, Gallery* const pGallery);
GalleryWindow(QWidget* const parent, Gallery* const pGallery);
~GalleryWindow();
private:
......
......@@ -7,9 +7,9 @@
* Description : a plugin to export to a remote Gallery server.
*
* Copyright (C) 2003-2005 by Renchi Raju <renchi dot raju at gmail dot com>
* Copyright (C) 2006 by Colin Guthrie <kde@colin.guthr.ie>
* Copyright (C) 2006 by Colin Guthrie <kde@colin.guthr.ie>
* Copyright (C) 2006-2012 by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2008 by Andrea Diamantini <adjam7 at gmail dot com>
* Copyright (C) 2008 by Andrea Diamantini <adjam7 at gmail dot com>
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
......@@ -114,13 +114,6 @@ Plugin_GalleryExport::~Plugin_GalleryExport()
// this slot uses GalleryWindow Class
void Plugin_GalleryExport::slotSync()
{
Interface* interface = dynamic_cast<Interface*>(parent());
if (!interface)
{
kError() << "Kipi interface is null!";
return;
}
QPointer<GalleryEdit> configDlg;
QPointer<GalleryWindow> dlg;
......@@ -131,7 +124,7 @@ void Plugin_GalleryExport::slotSync()
configDlg->exec();
}
dlg = new GalleryWindow(interface, kapp->activeWindow(), d->gallery);
dlg = new GalleryWindow(kapp->activeWindow(), d->gallery);
dlg->exec();
delete configDlg;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment