~ubuntu-branches/ubuntu/trusty/digikam/trusty

« back to all changes in this revision

Viewing changes to extra/kipi-plugins/kopete/plugin_kopete.cpp

  • Committer: Package Import Robot
  • Author(s): Rohan Garg
  • Date: 2012-11-26 18:24:20 UTC
  • mfrom: (1.9.1) (3.1.23 experimental)
  • Revision ID: package-import@ubuntu.com-20121126182420-qoy6z0nx4ai0wzcl
Tags: 4:3.0.0~beta3-0ubuntu1
* New upstream release
  - Add build-deps :  libhupnp-dev, libqtgstreamer-dev, libmagickcore-dev
* Merge from debian, remaining changes:
  - Make sure libqt4-opengl-dev, libgl1-mesa-dev and libglu1-mesa-dev only
    install on i386,amd64 and powerpc
  - Depend on libtiff-dev instead of libtiff4-dev
  - Drop digikam breaks/replaces kipi-plugins-common since we're past the
    LTS release now
  - digikam to recommend mplayerthumbs | ffmpegthumbs. We currently only
    have latter in the archives, even though former is also supposed to
    be part of kdemultimedia. (LP: #890059)
  - kipi-plugins to recommend www-browser rather than konqueror directly
    since 2.8 no direct usage of konqueror is present in the flickr
    plugin anymore (LP: #1011211)
  - Keep kubuntu_mysqld_executable_name.diff
  - Don't install libkipi translations
  - Keep deps on libcv-dev, libcvaux-dev
  - Keep split packaging of libraries
  - Replace icons from KDE 3 time in debian/xpm.d/*.xpm with the new
    versions (LP: #658047)
* Update debian/not-installed

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
      m_kopeteDBusTest("org.kde.kopete", "/Kopete", "org.freedesktop.DBus.Introspectable")
66
66
{
67
67
    kDebug(AREA_CODE_LOADING) << "Plugin_Kopete plugin loaded";
68
 
}
69
 
 
70
 
void Plugin_Kopete::setup(QWidget* widget)
 
68
 
 
69
    setUiBaseName("kipiplugin_kopeteui.rc");
 
70
    setupXML();
 
71
}
 
72
 
 
73
Plugin_Kopete::~Plugin_Kopete()
 
74
{
 
75
}
 
76
 
 
77
void Plugin_Kopete::setup(QWidget* const widget)
71
78
{
72
79
    Plugin::setup(widget);
73
80
 
74
81
    KIconLoader::global()->addAppDir("kipiplugin_kopete");
75
82
 
76
 
    m_actionExport = actionCollection()->addAction("kopeteexport");
 
83
    setDefaultCategory(ExportPlugin);
 
84
 
 
85
    m_actionExport = new KAction(this);
77
86
    m_actionExport->setText(i18n("&Instant Messaging contact..."));
78
87
    m_actionExport->setIcon(KIcon("kopete"));
 
88
    m_actionExport->setEnabled(false);
79
89
 
80
 
    addAction(m_actionExport);
 
90
    addAction("kopeteexport", m_actionExport);
81
91
 
82
92
    m_signalMapper = new QSignalMapper(widget);
83
93
    connect(m_signalMapper, SIGNAL(mapped(QString)),
88
98
    connect(contactsMenu, SIGNAL(aboutToShow()),
89
99
            this, SLOT(slotAboutToShowMenu()));
90
100
 
91
 
    Interface* interface = dynamic_cast<Interface*>(parent());
92
 
    if (!interface)
 
101
    if (!interface())
93
102
    {
94
103
        kError() << "Kipi interface is null!";
95
 
        m_actionExport->setEnabled(false);
96
104
        return;
97
105
    }
98
106
 
99
107
    m_actionExport->setEnabled(true);
100
108
}
101
109
 
102
 
Plugin_Kopete::~Plugin_Kopete()
103
 
{
104
 
}
105
 
 
106
110
void Plugin_Kopete::slotAboutToShowMenu()
107
111
{
108
 
    Interface* interface = dynamic_cast<Interface*>(parent());
109
 
    if (!interface)
 
112
    if (!interface())
110
113
    {
111
114
        kError() << "Kipi interface is null!";
112
115
        return;
178
181
{
179
182
    kDebug() << "Received a request to transfer file(s) to contact " << contactId;
180
183
 
181
 
    Interface* interface = dynamic_cast<Interface*>(parent());
182
 
    KUrl::List imgList   = interface->currentSelection().images();
 
184
    KUrl::List imgList   = interface()->currentSelection().images();
183
185
 
184
186
    // Check if Kopete is still running
185
187
    if ( contactId.isEmpty() || !kopeteRunning() )
214
216
    return false;
215
217
}
216
218
 
217
 
Category Plugin_Kopete::category( KAction* /* action */ ) const
218
 
{
219
 
    return ExportPlugin;
220
 
}
221
 
 
222
219
} // namespace KIPIKopetePlugin