Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Van Assche <dvanassche@guadalinex-nubae.(none)>2009-09-08 12:17:46 (GMT)
committer David Van Assche <dvanassche@guadalinex-nubae.(none)>2009-09-08 12:17:46 (GMT)
commita4fe57d04da5cc9a10288cecaa7a1718d9113ca0 (patch)
tree166b2d7c554c3ec0d1881d9b304801f2e25e49d2
parent3c2a32b6f0df73b4b1426607303f00110bd8b903 (diff)
added proper instructions in image and added new pyclic.py
-rw-r--r--pyclic.pngbin181847 -> 220695 bytes
-rw-r--r--pyclic.py38
2 files changed, 19 insertions, 19 deletions
diff --git a/pyclic.png b/pyclic.png
index eeb844d..04a8fad 100644
--- a/pyclic.png
+++ b/pyclic.png
Binary files differ
diff --git a/pyclic.py b/pyclic.py
index 0786824..3e71eba 100644
--- a/pyclic.py
+++ b/pyclic.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
-# PyClicAdmin application, Administration interface. User loads an image, then places lables on them with circled
+# PyqClicAdmin application, Administration interface. User loads an image, then places lables on them with circled
# numbers in colour of their choice (application has colour changing ability), then user writes meanings of labels on
# right hand side, and stores all this in an XML file. XML file contains tags as listed in pylic-common.py file,
# along with base 64 encoded image. This is for transportability reasons, specifically, transporting across xmpp
@@ -15,23 +15,7 @@ import math
from xml.dom import minidom
import os
import sys
-from pyclic_common import PyClicCommon
-
-# Create XML dictionary
-MAIN_TAG = 0
-QUIZ_TAG = 1
-CATEGORY_TAG = 2
-TITLE_TAG = 3
-COLOR_TAG = 4
-IMAGE_TAG = 5
-AUTHOR_TAG = 6
-QUESTIONS_TAG = 7
-QUESTION_TAG = 8
-COORDINATES_TAG = 9
-ENTRY_TAG = 10
-
-# set extension file to be used for opening and saving quiz files/projects. Currently uses pgx, as that seams unused.
-FILE_EXT = "pcx"
+from pyclic_common import *
class PyClicAdmin:
@@ -483,6 +467,19 @@ class PyClicAdmin:
if (self.xml_save_to_file(self.xml_file)):
#Allright it all worked! Set the Title
self.pcc.set_window_title_from_file(self.xml_file,self.window)
+ self.on_info(self.window)
+
+
+
+ def on_info(self,window):
+ dialog = gtk.MessageDialog(self.window,
+ gtk.DIALOG_DESTROY_WITH_PARENT,
+ gtk.MESSAGE_INFO, gtk.BUTTONS_CLOSE, "File saved successfully")
+ dialog.set_title("Save Successful")
+ dialog.run()
+ dialog.destroy()
+
+
def on_file_save_as(self, widget):
"""Let the user save the current file to a new location."""
@@ -548,7 +545,7 @@ class PyClicAdmin:
# create the main window, and attach delete_event signal to terminating
# the application
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
-
+
#set icon for app
try:
self.window.set_icon_from_file("pyclicicon.png")
@@ -650,7 +647,10 @@ class PyClicAdmin:
# A drawing area inside a fixed()
fix = gtk.Fixed()
+
+
self.darea=gtk.DrawingArea()
+
self.image = cairo.ImageSurface.create_from_png("pyclic.png")
self.image_filename="pyclic.png"
self.darea.connect("expose_event", self.expose)