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



commit ef116ee617059897f905e0813eb0561e686f0ec4
Author: John Stowers <john stowers gmail com>
Date:   Fri Oct 22 13:27:59 2010 +1300

    Shortcut removal is not needed on post-uninstall

 pygtk_postinstall.py |   16 +++-------------
 1 files changed, 3 insertions(+), 13 deletions(-)
---
diff --git a/pygtk_postinstall.py b/pygtk_postinstall.py
index 5690096..471c4b2 100644
--- a/pygtk_postinstall.py
+++ b/pygtk_postinstall.py
@@ -58,23 +58,14 @@ def create_shortcuts():
     if os.path.isfile(pygtk_doc_link):   
         os.remove(pygtk_doc_link)
     create_shortcut(doc_url,'PyGTK Documentation',pygtk_doc_link)
+    file_created(pygtk_doc_link)
    
     homepage_link = os.path.join(pygtk_shortcuts,
                                  "PyGTK Home.lnk")
     if os.path.isfile(homepage_link):   
         os.remove(homepage_link)
     create_shortcut("http://www.pygtk.org";,'PyGTK Homepage',homepage_link)
-
-def remove_shortcuts():
-    pygtk_shortcuts = os.path.join(
-        get_special_folder_path('CSIDL_COMMON_PROGRAMS'), 'PyGTK')
-    os.remove(os.path.join(pygtk_shortcuts,'PyGTK Documentation.lnk'))
-    os.remove(os.path.join(pygtk_shortcuts,'PyGTK Home.lnk'))
-    try:
-        os.rmdir(pygtk_shortcuts)
-    except OSError, e:
-        # Directory is not empty, so leave it like that !
-        pass
+    file_created(homepage_link)
 
 if len(sys.argv) == 2:
     if sys.argv[1] == "-install":
@@ -84,5 +75,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]