Commits

Anonymous committed 0ae30c4

import code: registration, directory chooser

Comments (0)

Files changed (1)

+from gimpfu import *
+import gtk
+import os
+import collections
+import ctypes
+
+def get_dir() :
+        MessageBox = ctypes.windll.user32.MessageBoxA
+        response = ""
+
+        # Check for new pygtk: this is new class in PyGtk 2.4
+        if (gtk.pygtk_version < (2,3,90)) :
+                MessageBox(None, "This plugin requires PyGtk 2.3.90 or later", "Error", 0)
+                return response
+
+        dialog = gtk.FileChooserDialog(
+                "Dump to...",
+                None,
+                gtk.FILE_CHOOSER_ACTION_OPEN,
+                (
+                        gtk.STOCK_CANCEL,
+                        gtk.RESPONSE_CANCEL,
+                        gtk.STOCK_OPEN,
+                        gtk.RESPONSE_OK
+                )
+        )
+        dialog.set_default_response(gtk.RESPONSE_OK)
+        dialog.set_action(gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER)
+
+        if (dialog.run() == gtk.RESPONSE_OK) :
+                response = dialog.get_filename()
+        dialog.destroy()
+
+        return response
+
+def dump_pdb() :
+        MessageBox = ctypes.windll.user32.MessageBoxA
+
+        ofstr = get_dir()
+        if("" == ofstr) :
+                return None
+
+        MessageBox(None, "directory:%s"%ofstr, "Your moms a rabbit", 0)
+
+
+        return None
+
+register(
+        #name
+        "dump-pdb",
+        #blurb
+        "dumps pdb database to HTML",
+        #help
+        "man up buttercup",
+        #author
+        "codefox",
+        #copyright
+        "MIT license => rtfm",
+        #date
+        "Jan 29, 2013",
+        #menu path
+        "<Toolbox>/Help/Procedure Dump",
+        #image types
+        None,
+        #params
+        [
+        ],
+        #results
+        [],
+        #function
+        dump_pdb
+)
+
+main()
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.