[pygobject] Shortcut removal is not needed on post-uninstall



commit 8c87d622dcc6d76a981edfc5818fe67bb2e114e2
Author: John Stowers <john stowers gmail com>
Date:   Fri Oct 22 13:28:31 2010 +1300

    Shortcut removal is not needed on post-uninstall

 pygobject_postinstall.py |   14 ++------------
 1 files changed, 2 insertions(+), 12 deletions(-)
---
diff --git a/pygobject_postinstall.py b/pygobject_postinstall.py
index 5251219..0b66773 100644
--- a/pygobject_postinstall.py
+++ b/pygobject_postinstall.py
@@ -49,16 +49,7 @@ def create_shortcuts():
     if os.path.isfile(pygobject_doc_link):   
         os.remove(pygobject_doc_link)
     create_shortcut(doc_url,'PyGObject Documentation',pygobject_doc_link)
-
-def remove_shortcuts():
-    pygtk_shortcuts = os.path.join(
-        get_special_folder_path('CSIDL_COMMON_PROGRAMS'), 'PyGTK')
-    os.remove(os.path.join(pygtk_shortcuts,'PyGObject Documentation.lnk'))
-    try:
-        os.rmdir(pygtk_shortcuts)
-    except OSError, e:
-        # Directory is not empty, so leave it like that !
-        pass
+    file_created(pygobject_doc_link)
 
 if len(sys.argv) == 2:
     if sys.argv[1] == "-install":
@@ -68,5 +59,4 @@ if len(sys.argv) == 2:
         # TODO: Add an installer option for shortcut creation 
         # create_shortcuts()
         print __doc__
-    elif sys.argv[1] == "-remove":
-        remove_shortcuts()
+



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]