--- /dev/null
+# Get A Clue (C) 2010 V. Harishankar
+# Crossword puzzle maker program
+# Licensed under the GNU GPL v3
+
+# Main window class for GetAClue player
+
+import pygtk
+pygtk.require20 ()
+import gtk
+
+class MainWindow:
+ def gtk_main_quit (self, *args):
+ gtk.main_quit ()
+
+ def __init__ (self, file_to_play = None):
+ # load the user interface
+ self.ui = gtk.Builder ()
+ self.ui.add_from_file ("playerwindow.glade")
+
+ # window object
+ self.window = self.ui.get_object ("mainwindow")
+ self.window.show ()
+
+ # set the cell renderer
+ cell = gtk.CellRendererText ()
+ tree_acol1 = self.ui.get_object ("tree_clues_across").get_column (0)
+ tree_acol2 = self.ui.get_object ("tree_clues_across").get_column (1)
+ tree_acol1.pack_start (cell)
+ tree_acol1.add_attribute (cell, "text", 0)
+ tree_acol2.pack_start (cell)
+ tree_acol2.add_attribute (cell, "text", 1)
+
+ tree_down = self.ui.get_object ("tree_clues_down")
+ tree_dcol1 = self.ui.get_object ("tree_clues_down").get_column (0)
+ tree_dcol2 = self.ui.get_object ("tree_clues_down").get_column (1)
+ tree_dcol1.pack_start (cell)
+ tree_dcol1.add_attribute (cell, "text", 0)
+ tree_dcol2.pack_start (cell)
+ tree_dcol2.add_attribute (cell, "text", 1)
+
+ # connect the signals
+ self.ui.connect_signals (self)
+
+ # set the window title
+ if file_to_play:
+ self.window.set_title ("GetAClue player - " + file_to_play)
+
+ gtk.main ()
+
+
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk+" version="2.16"/>
+ <!-- interface-naming-policy project-wide -->
+ <object class="GtkListStore" id="clues_across">
+ <columns>
+ <!-- column-name Number -->
+ <column type="gchararray"/>
+ <!-- column-name Across -->
+ <column type="gchararray"/>
+ </columns>
+ </object>
+ <object class="GtkListStore" id="clues_down">
+ <columns>
+ <!-- column-name Number -->
+ <column type="gchararray"/>
+ <!-- column-name Down -->
+ <column type="gchararray"/>
+ </columns>
+ </object>
+ <object class="GtkWindow" id="mainwindow">
+ <property name="width_request">480</property>
+ <property name="height_request">360</property>
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">GetAClue player</property>
+ <signal name="destroy" handler="gtk_main_quit"/>
+ <child>
+ <object class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkMenuBar" id="menubar1">
+ <property name="visible">True</property>
+ <property name="ubuntu_local">True</property>
+ <child>
+ <object class="GtkMenuItem" id="file">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_File</property>
+ <property name="use_underline">True</property>
+ <child type="submenu">
+ <object class="GtkMenu" id="menu1">
+ <property name="visible">True</property>
+ <property name="ubuntu_local">True</property>
+ <child>
+ <object class="GtkMenuItem" id="open">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Open...</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem" id="sep1">
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="save_as">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Save _As...</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="quit">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Quit</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="view">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_View</property>
+ <property name="use_underline">True</property>
+ <child type="submenu">
+ <object class="GtkMenu" id="menu2">
+ <property name="visible">True</property>
+ <property name="ubuntu_local">True</property>
+ <child>
+ <object class="GtkMenuItem" id="revealword">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Reveal _word...</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="revealsolution">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Reveal _solution...</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="help">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Help</property>
+ <property name="use_underline">True</property>
+ <child type="submenu">
+ <object class="GtkMenu" id="menu3">
+ <property name="visible">True</property>
+ <property name="ubuntu_local">True</property>
+ <child>
+ <object class="GtkMenuItem" id="about">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_About</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox1">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkDrawingArea" id="puzzlegrid">
+ <property name="width_request">120</property>
+ <property name="height_request">120</property>
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVPaned" id="vpaned1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <child>
+ <object class="GtkTreeView" id="tree_clues_across">
+ <property name="width_request">80</property>
+ <property name="height_request">150</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="model">clues_across</property>
+ <child>
+ <object class="GtkTreeViewColumn" id="number">
+ <property name="title">Number</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkTreeViewColumn" id="clueacross">
+ <property name="title">Clue Across</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="resize">False</property>
+ <property name="shrink">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkTreeView" id="tree_clues_down">
+ <property name="width_request">80</property>
+ <property name="height_request">150</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="model">clues_down</property>
+ <child>
+ <object class="GtkTreeViewColumn" id="downnum">
+ <property name="title">Number</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkTreeViewColumn" id="cluedown">
+ <property name="title">Clue Down</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="resize">True</property>
+ <property name="shrink">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>