[kde-doc-english] KDE/kdeplasma-addons/applets/pastebin

Nikhil Shantanu Marathe nsm.nikhil at gmail.com
Tue Jan 26 05:52:01 CET 2010


SVN commit 1080319 by nikhilm:

Imgur support implementation done.

Added UI changes and configuration saving to the Pastebin
applet so that Imgur is now an entry in the Image server
list.

GUI:
CCMAIL: aditya.kavoor at gmail.com


 M  +13 -0     pastebin.cpp  
 M  +1 -1      pastebin.h  
 M  +5 -0      pastebinConfig.ui  


--- trunk/KDE/kdeplasma-addons/applets/pastebin/pastebin.cpp #1080318:1080319
@@ -523,6 +523,10 @@
             serverAddress = cg.readEntry("simplestimagehosting",
                                          "http://api.simplest-image-hosting.net");
             break;
+        
+        case Pastebin::IMGUR:
+            serverAddress = cg.readEntry("imgur", "http://imgur.com/api/upload");
+            break;
     }
 
     uiServers.server->setText(serverAddress);
@@ -544,6 +548,11 @@
         case Pastebin::SIMPLESTIMAGEHOSTING:
             cg.writeEntry("simplestimagehosting", uiServers.server->text());
             break;
+
+        case Pastebin::IMGUR:
+            cg.writeEntry("imgur", uiServers.server->text());
+            break;
+
     }
     closeServerDialog();
 }
@@ -842,6 +851,10 @@
                 ops.writeEntry("server", cg.readEntry("simplestimagehosting",
                                                       "http://api.simplest-image-hosting.net"));
                 break;
+
+            case Pastebin::IMGUR:
+                ops.writeEntry("server", cg.readEntry("imgur", "http://imgur.com/api/upload"));
+                break;
         }
 
         ops.writeEntry("fileName", text);
--- trunk/KDE/kdeplasma-addons/applets/pastebin/pastebin.h #1080318:1080319
@@ -71,7 +71,7 @@
     };
 
     enum textServers { PASTEBINCA, PASTEBINCOM };
-    enum imageServers { IMAGEBINCA, IMAGESHACK, SIMPLESTIMAGEHOSTING };
+    enum imageServers { IMAGEBINCA, IMAGESHACK, SIMPLESTIMAGEHOSTING, IMGUR };
 
 public slots:
     void configAccepted();
--- trunk/KDE/kdeplasma-addons/applets/pastebin/pastebinConfig.ui #1080318:1080319
@@ -118,6 +118,11 @@
          <string>Simplest-Image-Hosting.net</string>
         </property>
        </item>
+       <item>
+        <property name="text">
+         <string>Imgur</string>
+        </property>
+       </item>
       </widget>
      </item>
      <item row="2" column="0">



More information about the kde-doc-english mailing list