[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [Kamoso] 46f19e2: Minor improvements on the Youtube plugin interface
From:       Alex Fiestas <alex () eyeos ! org>
Date:       2010-12-31 17:31:50
Message-ID: 20101231173150.0B659A609B () git ! kde ! org
[Download RAW message or body]

commit 46f19e264086c33ab8af10369529f7734d85f952
branch master
Author: Alex Fiestas <alex@eyeos.org>
Date:   Fri Dec 31 17:44:51 2010 +0100

    Minor improvements on the Youtube plugin interface

diff --git a/src/plugins/youtube/videoInfo.ui b/src/plugins/youtube/videoInfo.ui
index 31c20b0..27f1bb9 100644
--- a/src/plugins/youtube/videoInfo.ui
+++ b/src/plugins/youtube/videoInfo.ui
@@ -51,7 +51,11 @@
      </widget>
     </item>
     <item row="0" column="1">
-     <widget class="QLineEdit" name="titleText"/>
+     <widget class="QLineEdit" name="titleText">
+      <property name="placeholderText">
+       <string>Kamoso</string>
+      </property>
+     </widget>
     </item>
     <item row="1" column="0">
      <widget class="QLabel" name="label_4">
@@ -61,7 +65,11 @@
      </widget>
     </item>
     <item row="1" column="1">
-     <widget class="QLineEdit" name="tagText"/>
+     <widget class="QLineEdit" name="tagText">
+      <property name="placeholderText">
+       <string>Kamoso, KDE</string>
+      </property>
+     </widget>
     </item>
     <item row="2" column="0">
      <widget class="QLabel" name="label_3">
diff --git a/src/plugins/youtube/youtubejob.cpp b/src/plugins/youtube/youtubejob.cpp
index bd5488f..9f5c114 100644
--- a/src/plugins/youtube/youtubejob.cpp
+++ b/src/plugins/youtube/youtubejob.cpp
@@ -177,30 +177,6 @@ void YoutubeJob::uploadDone(KIO::Job *job, const QByteArray \
&data)  }
 }
 
-void YoutubeJob::setVideoInfo(QMap<QString, QString>& videoInfo)
-{
-    //This method will parse the content in the near future
-    if(!videoInfo["videoTitle"].isEmpty()){
-        //TODO: Scape
-    }else{
-        videoInfo["videoTitle"] = i18n("Video recorded using Kamoso");
-    }
-
-    if(!videoInfo["videoDesc"].isEmpty()){
-        //TODO: Scape
-    }else{
-        videoInfo["videoDesc"] = i18n("This video has been recorded using Kamoso, a \
                KDE software to play with webcams!");
-    }
-
-    if(!videoInfo["videoTags"].isEmpty()){
-        //TODO: Scape
-    }else{
-        videoInfo["videoTags"] = "KDE, Kamoso";
-    }
-
-    m_videoInfo = videoInfo;
-}
-
 QMap<QString, QString> YoutubeJob::showVideoDialog()
 {
     Ui::videoForm *videoForm = new Ui::videoForm;
@@ -215,18 +191,24 @@ QMap<QString, QString> YoutubeJob::showVideoDialog()
     dialog->setMinimumHeight(315);
     dialog->setMaximumWidth(425);
     dialog->setMaximumHeight(315);
+    videoForm->titleText->setFocus();
+    videoForm->titleText->setText(i18n("Kamoso %1", \
QDate::currentDate().toString(Qt::ISODate)));  int response = dialog->exec();
 
     QMap<QString, QString> videoInfo;
     if(response == QDialog::Accepted){
         if(!videoForm->descriptionText->toPlainText().isEmpty()){
             videoInfo["videoDesc"] = videoForm->descriptionText->toPlainText();
+        } else {
+            videoInfo["videoDesc"] = i18n("This video has been recorded using \
Kamoso, a KDE software to play with webcams!");  }
         if(!videoForm->titleText->text().isEmpty()){
             videoInfo["videoTitle"] = videoForm->titleText->text();
         }
         if(!videoForm->tagText->text().isEmpty()){
             videoInfo["videoTags"] = videoForm->tagText->text();
+        } else {
+            videoInfo["videoTags"] = "KDE, Kamoso";
         }
     }
     return videoInfo;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic