From 995ef47c94fb0f3806a45b7e6b3e65927ad2dd5f Mon Sep 17 00:00:00 2001 From: Christian Jacobs Date: Sat, 23 Mar 2013 21:25:05 +0000 Subject: [PATCH] Update some comments. --- src/logbook.py | 10 ++++------ src/pyqso.py | 12 ++++-------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/src/logbook.py b/src/logbook.py index fd81364..db2c1f8 100644 --- a/src/logbook.py +++ b/src/logbook.py @@ -28,15 +28,13 @@ class Logbook(Gtk.ListStore): def __init__(self): - self.SELECTED_FIELD_NAMES_TYPES = AVAILABLE_FIELD_NAMES_TYPES # FIXME: Allow the user to select the field names. By default, let's select them all. + # FIXME: Allow the user to select the field names. By default, let's select them all. + self.SELECTED_FIELD_NAMES_TYPES = AVAILABLE_FIELD_NAMES_TYPES - # The ListStore constructor needs to know the data types of the - # columns, so let's make a list containing these now. + # The ListStore constructor needs to know the data types of the columns. + # The index is always an integer. We will assume the ADIF fields are strings. data_types = [int] for key in self.SELECTED_FIELD_NAMES_TYPES.keys(): - # NOTE: we store all boolean field values as strings - # and use the combo boxes rather than the toggle buttons. - # The latter are are easier to modify accidentally. data_types.append(str) # Call the constructor of the super class (Gtk.ListStore) diff --git a/src/pyqso.py b/src/pyqso.py index e24f652..fe61250 100644 --- a/src/pyqso.py +++ b/src/pyqso.py @@ -38,8 +38,7 @@ class PyQSO(Gtk.Window): self.set_size_request(500, 300) self.set_position(Gtk.WindowPosition.CENTER) - # Kills the application if the close button is clicked - # on the main window itself. + # Kills the application if the close button is clicked on the main window itself. self.connect("delete-event", Gtk.main_quit) vbox_outer = Gtk.VBox() @@ -51,17 +50,15 @@ class PyQSO(Gtk.Window): # Set up menu bar and populate it menu = Menu(self, vbox_outer) - # Under the menu, we want the data entry panel on the left and the logbook on the right, - # so we'll place these in an HBox. + # Under the menu, we want the data entry panel on the left and the logbook on the right. hbox = Gtk.HBox() vbox_outer.pack_start(hbox, True, True, 0) + self.data_entry_panel = DataEntryPanel(self, hbox) + # Render the logbook self.treeview = Gtk.TreeView(self.logbook) self.treeview.set_grid_lines(Gtk.TreeViewGridLines.BOTH) - - self.data_entry_panel = DataEntryPanel(self, hbox) - # Allow the Logbook to be scrolled up/down sw = Gtk.ScrolledWindow() sw.set_shadow_type(Gtk.ShadowType.ETCHED_IN) @@ -89,7 +86,6 @@ class PyQSO(Gtk.Window): self.show_all() return - def add_record_callback(self, widget): self.logbook.add_record()