chiark / gitweb /
Added new function ENSURE-TREE-PATH
[clg] / gtk / gtktree.lisp
index 15c9a56dd8a67ef10532018737849f664274c7c9..170041d66bb2c2ae73d561505c1b665b3d5538cc 100644 (file)
@@ -20,7 +20,7 @@
 ;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-;; $Id: gtktree.lisp,v 1.21 2006-06-23 12:25:37 espen Exp $
+;; $Id: gtktree.lisp,v 1.22 2006-06-23 12:46:26 espen Exp $
 
 
 (in-package "GTK")
@@ -308,6 +308,11 @@ (define-type-method destroy-function ((type tree-path) &key temp inlined)
   #'(lambda (location &optional (offset 0))
       (%tree-path-free (ref-pointer location offset))))
 
+(defun ensure-tree-path (path)
+  (etypecase path
+    (string (coerce (clg-utils:split-string path :delimiter #\:) 'vector))
+    (vector path)))
+
 
 (defbinding %tree-row-reference-new () pointer
   (model tree-model)