~ubuntu-branches/ubuntu/karmic/kdeplasma-addons/karmic-updates

« back to all changes in this revision

Viewing changes to applets/previewer/plasma-previewer.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Harald Sitter, Christian Mangold, Alessandro Ghersi, Harald Sitter
  • Date: 2009-08-30 20:11:55 UTC
  • mfrom: (1.1.16 upstream)
  • Revision ID: james.westby@ubuntu.com-20090830201155-ftsg6ehgrdsrcn8f
Tags: 4:4.3.1-0ubuntu1
[ Christian Mangold ]
* New upstream release
* Bump version of KDE build-deps to 4.3.1

[Alessandro Ghersi]
* Add libxcomposite-dev, libxrender-dev and libxdamage-dev to build-deps
  to build compositing support for Lancelot. (LP: #408235)
  (Thanks to Khashayar Naderehvandi)

[ Harald Sitter ]
* Fix armel build using kubuntu_01_fix_armel_build.diff

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
      m_base(0),
56
56
      m_dialog(0),
57
57
      m_part(0),
 
58
      m_currentFile(QString()),
58
59
      m_previewWidget(0)
59
60
{
60
61
    new PreviewerAdaptor(this);
68
69
    setAcceptDrops(true);
69
70
 
70
71
    resize(PreviewWidget::suggestedWidth(), 150);
 
72
    if (args.count()) {
 
73
        kDebug() << "Opening file from arg passed into applet ..." << args.value(0).toString();
 
74
        m_currentFile = args.value(0).toString();
 
75
    }
71
76
}
72
77
 
73
78
Previewer::~Previewer()
99
104
{
100
105
    setPopupIcon("previewer");
101
106
    setupActions();
 
107
    if (!m_currentFile.isEmpty()) {
 
108
        openFile(m_currentFile);
 
109
    }
102
110
}
103
111
 
104
112
void Previewer::constraintsEvent(Plasma::Constraints constraints)
257
265
    m_dialog->setWindowFlags(Qt::FramelessWindowHint);
258
266
    m_dialog->show();
259
267
 
260
 
    int buttonCode = KMessageBox::questionYesNo(m_dialog, i18n("Are you sure you want to remove:\n%1", cur.pathOrUrl()), 
 
268
    int buttonCode = KMessageBox::questionYesNo(m_dialog, i18n("Are you sure you want to remove:\n%1", cur.pathOrUrl()),
261
269
                                                  i18n("Deleting File"));
262
270
 
263
271
    m_dialog->setWindowFlags(Qt::X11BypassWindowManagerHint);