OSDN Git Service

Introduce uri opener.
[fukui-no-namari/fukui-no-namari.git] / src / hage1
index 90b3cba..3c7a1ac 100755 (executable)
--- a/src/hage1
+++ b/src/hage1
@@ -31,6 +31,7 @@ from Hage1 import thread_window
 from Hage1 import board_window
 from Hage1 import config
 from Hage1 import dbus_object
+from Hage1 import uri_opener
 
 APPNAME = 'Hage1'
 APPVERSION = '0.1'
@@ -96,10 +97,7 @@ if __name__ == "__main__":
             from Hage1.BbsType import bbs_type_exception
             for uri in uris:
                 try:
-                    bbs_type = bbs_type_judge_uri.get_type(uri)
-                    if bbs_type.is_board():
-                        board_window.open_board(uri)
-                    thread_window.open_thread(uri)
+                    uri_opener.open_uri(uri)
                 except bbs_type_exception.BbsTypeError, msg:
                     print msg
             gtk.main()
@@ -115,9 +113,6 @@ if __name__ == "__main__":
             from Hage1.BbsType import bbs_type_exception
             for uri in uris:
                 try:
-                    bbs_type = bbs_type_judge_uri.get_type(uri)
-                    if bbs_type.is_board():
-                        iface.open_board(uri)
-                    iface.open_thread(uri)
+                    iface.open_uri(uri)
                 except bbs_type_exception.BbsTypeError, msg:
                     print msg