Permalink
Browse files

More work on gui

  • Loading branch information...
1 parent b3681cd commit ec4badbaa34b09667d36c94faed7a6e0692d25b1 @riverrun committed Apr 16, 2012
View
@@ -9,10 +9,10 @@ A crossword generator
Description
===========
-Genxword is a crossword generator written in Python. It runs from the command line, and it creates
-a crossword from a list of words and clues in a text file. There is an option to save the
-crossword, with clues, as a pdf file, or you can save the empty grid and key in png and/or svg format,
-together with the word bank and clues in a text file.
+Genxword is a crossword generator written in Python. There are now two versions, genxword-gtk, which has a
+graphical user interface, and genxword, which runs from the command line. Both versions create
+a crossword from a list of words and clues. You can save the crossword, with clues, as a pdf file,
+or you can save the empty grid and key in png and/or svg format, together with the word bank and clues in a text file.
Usage
=====
@@ -26,8 +26,9 @@ Linux
-----
To run this program, you need to have **Python 2.7** or **Python 3** installed.
-It will not work with earlier versions of Python. It depends on Py2cairo (or Pycairo),
+It will not work with earlier versions of Python. The command line version depends on Py2cairo (or Pycairo),
which is already installed on most popular distros, to produce the image files.
+The GUI version depends on Pygobject (also known as python-gobject or python-gi).
To install this program, run the following commands (the **install** script needs to be run as root or with sudo)::
View
@@ -0,0 +1,7 @@
+#!/usr/bin/python3
+# -*- coding: utf-8 -*-
+
+from genxword import gui
+
+if __name__ == '__main__':
+ gui.main()
View
@@ -6,6 +6,6 @@ Terminal=false
Exec=genxword-gtk
Name=genxword-gtk
Comment=Create crosswords in pdf, png and svg formats
-Icon=genxword
+Icon=genxword-gtk
Categories=Graphics;GTK;
StartupNotify=True
View
@@ -253,7 +253,7 @@ def save_options(self, button, name):
def win_icon(self):
try:
- self.set_icon_from_file('/usr/share/pixmaps/genxword.png')
+ self.set_icon_from_file('/usr/share/pixmaps/genxword-gtk.png')
except:
pass
@@ -350,8 +350,6 @@ def save_xword(self, button):
saved_message = 'Your crossword files have been saved in ' + os.getcwd()
self.textbuffer.set_text(saved_message)
self.enter_name.set_text('Name of crossword')
- self.choose_nwords.set_value(50)
- self.choose_gsize.set_value(17)
else:
self.textbuffer.set_text('Please fill in the name of the crossword and how you want it saved.')
self.textbuffer.insert_at_cursor('\nThen click on the Save button again.')
View
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Exec=genxword3-gtk
+Name=genxword3-gtk
+Comment=Create crosswords in pdf, png and svg formats
+Icon=genxword-gtk
+Categories=Graphics;GTK;
+StartupNotify=True
File renamed without changes
View
@@ -19,12 +19,11 @@ else
fi
printf "Installing the desktop file and icon for $APP_NAME\n"
-cp genxword-gtk.desktop $DESKTOP_DIR || { printf "$ERROR_MESSAGE"; exit 1; }
-cp icons/genxword.png $ICON_DIR || { printf "$ERROR_MESSAGE"; exit 1; }
+cp $APP_NAME-gtk.desktop $DESKTOP_DIR || printf "The desktop file could not be installed\n"
+cp icons/genxword-gtk.png $ICON_DIR || printf "The icon could not be installed\n"
cd man
printf "Installing the man page for $APP_NAME\n"
-cp $APP_NAME.1 $MAN_DIR && gzip -f $MAN_DIR/$APP_NAME.1 || { printf "$ERROR_MESSAGE"; exit 1; }
+cp $APP_NAME.1 $MAN_DIR && gzip -f $MAN_DIR/$APP_NAME.1 || printf "The man page could not be installed\n"
-printf "$(tput setaf 2)The program $APP_NAME has been successfully installed.\n\
-Run $APP_NAME -h for basic info about the program or read the man page for further options.$(tput sgr0)\n"
+printf "$(tput setaf 2)The programs $APP_NAME and $APP_NAME-gtk have been installed.$(tput sgr0)\n"
View
@@ -1,5 +1,5 @@
.\" Manpage for genxword.
-.TH genxword 1 "06/03/2012" "0.2.4" "genxword man page"
+.TH genxword 1 "16/04/2012" "0.3.0" "genxword man page"
.SH NAME
genxword \- a crossword generator
.SH SYNOPSIS
View
@@ -1,9 +1,9 @@
.\" Manpage for genxword3.
-.TH genxword3 1 "06/03/2012" "0.2.4" "genxword3 man page"
+.TH genxword3 1 "16/04/2012" "0.3.0" "genxword3 man page"
.SH NAME
genxword3 \- a crossword generator
.SH SYNOPSIS
-genxword3 [\-a] [\-n] [\-o] [\-t] infile saveformat
+genxword3 [\-a] [\-n] [\-o] infile saveformat
.SH DESCRIPTION
genxword3 is the Python 3 version of genxword - a crossword generator written in Python.
It reads words and clues, or just words, from a text file. The crossword that is generated can be saved,
View
@@ -23,7 +23,7 @@
from distutils.core import setup
if sys.version[0] == '3':
- scripts = ['bin/genxword3']
+ scripts = ['bin/genxword3', 'bin/genxword3-gtk']
else:
scripts = ['bin/genxword', 'bin/genxword-gtk']
@@ -35,7 +35,7 @@ def read(fname):
setup(
name = 'genxword',
- version = '0.2.5',
+ version = '0.3.0',
packages = ['genxword'],
scripts = scripts,
author = 'David Whitlock',

0 comments on commit ec4badb

Please sign in to comment.