cifrado r66 - trunk
- From: bersace svn gnome org
- To: svn-commits-list gnome org
- Subject: cifrado r66 - trunk
- Date: Thu, 3 Apr 2008 18:12:22 +0100 (BST)
Author: bersace
Date: Thu Apr 3 18:12:22 2008
New Revision: 66
URL: http://svn.gnome.org/viewvc/cifrado?rev=66&view=rev
Log:
Ouvre le dernier fichier ouvert.
Modified:
trunk/ChangeLog
trunk/cifrado.in
Modified: trunk/cifrado.in
==============================================================================
--- trunk/cifrado.in (original)
+++ trunk/cifrado.in Thu Apr 3 18:12:22 2008
@@ -1,7 +1,8 @@
#!/usr/bin/env python2.5
-# -*- coding: utf-8 -*-
+# -*- mode: python; coding: utf-8 -*-
import sys
+import gtk
sys.path.append("package")
sys.path.append("@PKGPYTHONDIR@")
@@ -13,6 +14,18 @@
if len(sys.argv) == 2:
cifrado.charger(sys.argv[1])
else:
- cifrado.nouveau()
+ rec = gtk.recent_manager_get_default()
+ infos = rec.get_items()
+ fichier = None
+ for info in infos:
+ mtype = info.get_mime_type()
+ if mtype == 'application/x-cifrado+xml':
+ fichier = info.get_uri()
+ break
+
+ if fichier is None:
+ cifrado.nouveau()
+ else:
+ cifrado.charger(fichier)
cifrado.lancer()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]