diff --git a/README.md b/README.md index 1d1c4f5..aaa2b18 100644 --- a/README.md +++ b/README.md @@ -26,11 +26,11 @@ PyQSO is a contact logging tool for amateur radio operators. Installation and running ------------------------ -Assuming that the current working directory is PyQSO's base directory (the directory that the Makefile is in), PyQSO can be installed via the terminal with the following command: +Assuming that the current working directory is PyQSO's base directory (the directory that the `Makefile` is in), PyQSO can be installed via the terminal with the following command: make install -Note: 'sudo' may be needed for this. Once installed, the following command will run PyQSO: +Note: `sudo` may be needed for this. Once installed, the following command will run PyQSO: pyqso diff --git a/pyqso/blank.py b/pyqso/blank.py index d6b8bd0..dd696f5 100644 --- a/pyqso/blank.py +++ b/pyqso/blank.py @@ -21,8 +21,11 @@ from gi.repository import Gtk class Blank(object): + + """ A blank page in the logbook for the "+" (New Log) tab. """ + def __init__(self, application): - """ Create a blank page in the Gtk.Notebook for the "+" (New Log) tab. + """ Create the blank page. :arg application: The PyQSO application containing the main Gtk window, etc. """ diff --git a/pyqso/cabrillo.py b/pyqso/cabrillo.py index e7d71a9..150f540 100644 --- a/pyqso/cabrillo.py +++ b/pyqso/cabrillo.py @@ -43,7 +43,7 @@ class Cabrillo: :returns: None :raises IOError: if the Cabrillo file cannot be written (e.g. due to lack of write permissions).""" - logging.debug("Writing records to an Cabrillo file...") + logging.debug("Writing records to a Cabrillo file...") try: f = open(path, mode='w', errors="replace") # Open file for writing diff --git a/pyqso/calendar_dialog.py b/pyqso/calendar_dialog.py index 04a75d1..9e7635a 100644 --- a/pyqso/calendar_dialog.py +++ b/pyqso/calendar_dialog.py @@ -30,14 +30,14 @@ class CalendarDialog: :arg application: The PyQSO application containing the main Gtk window, etc. """ - logging.debug("Setting up the calendar dialog...") + self.builder = application.builder glade_file_path = os.path.join(os.path.realpath(os.path.dirname(__file__)), os.pardir, "res/pyqso.glade") self.builder.add_objects_from_file(glade_file_path, ("calendar_dialog",)) self.dialog = self.builder.get_object("calendar_dialog") self.calendar = self.builder.get_object("calendar") self.dialog.show_all() - logging.debug("Calendar dialog ready!") + return @property diff --git a/pyqso/log.py b/pyqso/log.py index 090b700..a12437b 100644 --- a/pyqso/log.py +++ b/pyqso/log.py @@ -26,13 +26,13 @@ from pyqso.adif import AVAILABLE_FIELD_NAMES_ORDERED class Log(Gtk.ListStore): - """ A single log inside of the whole logbook. A Log object can store multiple Record objects. """ + """ A single log inside of the whole logbook. A Log object can store multiple records. This is """ def __init__(self, connection, name): """ Set up a new Log object. :arg connection: An sqlite database connection. - :arg str name: The name of the log (i.e. the sqlite table name). + :arg str name: The name of the log (i.e. the database table name). """ # The ListStore constructor needs to know the data types of the columns. @@ -44,7 +44,6 @@ class Log(Gtk.ListStore): self.connection = connection self.name = name - logging.debug("New Log instance created!") return def populate(self): diff --git a/pyqso/logbook.py b/pyqso/logbook.py index 24c682d..399295c 100644 --- a/pyqso/logbook.py +++ b/pyqso/logbook.py @@ -54,7 +54,7 @@ class Logbook: self.notebook = self.builder.get_object("logbook") self.connection = None self.logs = [] - logging.debug("New Logbook instance created!") + return def new(self, widget=None): diff --git a/pyqso/menu.py b/pyqso/menu.py index e3f08f7..26ae1d3 100644 --- a/pyqso/menu.py +++ b/pyqso/menu.py @@ -28,7 +28,7 @@ import os.path class Menu: - """ The PyQSO menu bar along the top of the main window. """ + """ The menu bar along the top of the main window. """ def __init__(self, application): """ Set up all menu items and connect to the various functions. @@ -36,8 +36,6 @@ class Menu: :arg application: The PyQSO application containing the main Gtk window, etc. """ - logging.debug("Setting up the menu bar...") - self.application = application self.builder = self.application.builder @@ -131,8 +129,6 @@ class Menu: self.set_log_items_sensitive(False) self.set_record_items_sensitive(False) - logging.debug("Menu bar ready!") - return def set_logbook_item_sensitive(self, sensitive): @@ -140,11 +136,10 @@ class Menu: :arg bool sensitive: If True, enable the 'new logbook' and 'open logbook' menu items. If False, disable them. """ - logging.debug("Setting the 'Create/Open Logbook' menu item's sensitivity to: %s..." % sensitive) + self.items["NEW_LOGBOOK"].set_sensitive(sensitive) self.items["OPEN_LOGBOOK"].set_sensitive(sensitive) self.items["CLOSE_LOGBOOK"].set_sensitive(not sensitive) - logging.debug("Set the 'Create/Open Logbook' menu item's sensitivity to: %s." % sensitive) return def set_log_items_sensitive(self, sensitive): @@ -152,10 +147,9 @@ class Menu: :arg bool sensitive: If True, enable all the log-related menu items. If False, disable them all. """ - logging.debug("Setting log-related menu item sensitivity to: %s..." % sensitive) + for item_name in ["NEW_LOG", "DELETE_LOG", "RENAME_LOG", "IMPORT_LOG", "EXPORT_LOG_ADIF", "EXPORT_LOG_CABRILLO", "PRINT_LOG"]: self.items[item_name].set_sensitive(sensitive) - logging.debug("Set log-related menu item sensitivity to: %s." % sensitive) return def set_record_items_sensitive(self, sensitive): @@ -163,8 +157,7 @@ class Menu: :arg bool sensitive: If True, enable all the record-related menu items. If False, disable them all. """ - logging.debug("Setting record-related menu item sensitivity to: %s..." % sensitive) + for item_name in ["ADD_RECORD", "EDIT_RECORD", "DELETE_RECORD", "REMOVE_DUPLICATES", "RECORD_COUNT"]: self.items[item_name].set_sensitive(sensitive) - logging.debug("Set record-related menu item sensitivity to: %s." % sensitive) return diff --git a/pyqso/telnet_connection_dialog.py b/pyqso/telnet_connection_dialog.py index ae8ca11..d5dfb0b 100644 --- a/pyqso/telnet_connection_dialog.py +++ b/pyqso/telnet_connection_dialog.py @@ -31,8 +31,6 @@ class TelnetConnectionDialog: :arg application: The PyQSO application containing the main Gtk window, etc. """ - logging.debug("Building new Telnet connection dialog...") - self.builder = application.builder glade_file_path = os.path.join(os.path.realpath(os.path.dirname(__file__)), os.pardir, "res/pyqso.glade") self.builder.add_objects_from_file(glade_file_path, ("telnet_connection_dialog",)) @@ -45,8 +43,6 @@ class TelnetConnectionDialog: self.dialog.show_all() - logging.debug("Telnet connection dialog built.") - return @property diff --git a/pyqso/toolbar.py b/pyqso/toolbar.py index bbe0b4b..0ae3203 100644 --- a/pyqso/toolbar.py +++ b/pyqso/toolbar.py @@ -30,8 +30,6 @@ class Toolbar: :arg application: The PyQSO application containing the main Gtk window, etc. """ - logging.debug("Setting up the toolbar...") - self.application = application self.builder = self.application.builder @@ -70,8 +68,6 @@ class Toolbar: self.set_record_buttons_sensitive(False) self.filter_source.set_sensitive(False) - logging.debug("Toolbar ready!") - return def set_logbook_button_sensitive(self, sensitive): @@ -79,11 +75,9 @@ class Toolbar: :arg bool sensitive: If True, enable the 'new logbook' and 'open logbook' toolbar items. If False, disable them. """ - logging.debug("Setting logbook-related toolbar item sensitivity to: %s..." % sensitive) self.buttons["NEW_LOGBOOK"].set_sensitive(sensitive) self.buttons["OPEN_LOGBOOK"].set_sensitive(sensitive) self.buttons["CLOSE_LOGBOOK"].set_sensitive(not sensitive) - logging.debug("Set logbook-related toolbar item sensitivity to: %s." % sensitive) return def set_record_buttons_sensitive(self, sensitive): @@ -91,8 +85,6 @@ class Toolbar: :arg bool sensitive: If True, enable all the record-related toolbar items. If False, disable them all. """ - logging.debug("Setting record-related toolbar item sensitivity to: %s..." % sensitive) for button_name in ["ADD_RECORD", "EDIT_RECORD", "DELETE_RECORD"]: self.buttons[button_name].set_sensitive(sensitive) - logging.debug("Set record-related toolbar item sensitivity to: %s." % sensitive) return diff --git a/pyqso/toolbox.py b/pyqso/toolbox.py index a653071..368c42c 100644 --- a/pyqso/toolbox.py +++ b/pyqso/toolbox.py @@ -34,8 +34,6 @@ class Toolbox: :arg application: The PyQSO application containing the main Gtk window, etc. """ - logging.debug("Setting up the toolbox...") - self.application = application self.builder = self.application.builder @@ -47,8 +45,6 @@ class Toolbox: self.tools.connect_after("switch-page", self.on_switch_page) - logging.debug("Toolbox ready!") - return def toggle_visible_callback(self, widget=None):