[SCM] ktp-send-file packaging branch, master, updated. debian/15.12.1-2-216-g8f07cdf

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:13:59 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-send-file.git;a=commitdiff;h=eaf1917

The following commit has been merged in the master branch:
commit eaf19176090dfb5c8c48887269f94089cd0c1d0c
Author: Francesco Nwokeka <francesco.nwokeka at gmail.com>
Date:   Wed Jun 8 18:00:37 2011 +0200

    ADD: dolphin action
    
    the program is callable via dolphin and accepts a file url to send
---
 CMakeLists.txt |  2 +-
 main.cpp       | 11 ++++++++++-
 mainwindow.cpp |  2 +-
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e48b01a..e6fdef5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -66,7 +66,7 @@ target_link_libraries(telepathy-kde-file-transfer
 )
 
 install(TARGETS telepathy-kde-file-transfer ${INSTALL_TARGETS_DEFAULT_ARGS})
-install(FILES mainwindow.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
+install(FILES telepathy-dolphin.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
 
 macro_display_feature_log()
 
diff --git a/main.cpp b/main.cpp
index 9e54da6..21dae49 100644
--- a/main.cpp
+++ b/main.cpp
@@ -3,6 +3,7 @@
 #include <KApplication>
 #include <KAboutData>
 #include <KLocale>
+#include <KUrl>
 
 #include "mainwindow.h"
 
@@ -19,8 +20,16 @@ int main(int argc, char *argv[])
     KCmdLineArgs::init(argc, argv, &aboutData);
 
     KCmdLineOptions options;
+    options.add("+[file]", ki18n("File to send"));
+
     KCmdLineArgs::addCmdLineOptions(options);
-    KCmdLineArgs::parsedArgs();
+
+    KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+
+    if (args->count()) {
+        qDebug() << "FILE URL IS: " << args->url(0).url();
+    }
+
     KApplication app;
 
     MainWindow *w = new MainWindow();
diff --git a/mainwindow.cpp b/mainwindow.cpp
index 855fe2f..ab63bdf 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -24,7 +24,7 @@ MainWindow::MainWindow(QWidget *parent) :
 
     KFileItem file(KUrl("/home/david/a.png"), "image/png", KFileItem::Unknown);
 
-    KIO::PreviewJob* job = KIO::filePreview(KFileItemList() << file, ui->filePreviewLabel->size());
+    KIO::PreviewJob* job = KIO::filePreview(KFileItemList() << file, ui->filePreviewLabel->width(), ui->filePreviewLabel->height());
 
     ui->fileNameLabel->setText(file.name());
     ui->filePreviewLabel->setText(QString());

-- 
ktp-send-file packaging



More information about the pkg-kde-commits mailing list