OSDN Git Service

"Open as URL" is append 'http://' to the selected text.
authorAiwota Programmer <aiwotaprog@tetteke.tk>
Thu, 3 Jan 2008 08:05:53 +0000 (17:05 +0900)
committerAiwota Programmer <aiwotaprog@tetteke.tk>
Thu, 3 Jan 2008 08:05:53 +0000 (17:05 +0900)
src/FukuiNoNamari/thread_window.py

index b0339e1..6a9f50d 100644 (file)
@@ -294,7 +294,10 @@ class WinWrap(winwrapbase.WinWrapBase):
             clip.set_text(text, len(text))
 
     def on_popup_threadview_menu_openasuri_activate(self, widget):
-        self.on_threadview_uri_clicked(self.threadview.get_selected_text())
+        text = self.threadview.get_selected_text()
+        if not text.startswith("http://"):
+            text = "http://" + text
+        self.on_threadview_uri_clicked(text)
 
     def on_popup_threadview_menu_refresh_activate(self, widget):
         self.update(widget)