diff options
author | Fred Wright <fw@fwright.net> | 2016-04-08 10:07:47 -0700 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2016-04-09 04:39:16 -0400 |
commit | 1edf5d2a7490ec7c1ee0f7ac8a77f30dcea82d03 (patch) | |
tree | 2cdcbe95bb0304095e8af7aee1eb8b798be78d88 /xgpsspeed | |
parent | db33488b20d15506eac5ad033b687cc90f8edd69 (diff) | |
download | gpsd-1edf5d2a7490ec7c1ee0f7ac8a77f30dcea82d03.tar.gz |
Fixes Gtk warnings related to xgps/xgpsspeed error boxes.
The Gtk MessageDialog function gives a warning if no parent window is
specified. Since the main window already exists in those cases, it's
simply a matter of passing the extra argument to MessageDialog.
This has the side effect of changing the position of the dialog box,
such that it's centered over the parent window rather than being near
its upper left-hand corner. In the xgps case, it appears to be
centered over whichever subwindow was most recently updated.
TESTED:
Verified that both the gpsd not running and gpsd stopped running cases
no longer produce warning messages on the terminal.
Diffstat (limited to 'xgpsspeed')
-rwxr-xr-x | xgpsspeed | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -608,6 +608,7 @@ class Main(object): def handle_hangup(self, _dummy, _unused): w = Gtk.MessageDialog( + parent=self.window, type=Gtk.MessageType.ERROR, flags=Gtk.DialogFlags.DESTROY_WITH_PARENT, buttons=Gtk.ButtonsType.OK @@ -653,6 +654,7 @@ class Main(object): Gtk.main() except SocketError: w = Gtk.MessageDialog( + parent=self.window, type=Gtk.MessageType.ERROR, flags=Gtk.DialogFlags.DESTROY_WITH_PARENT, buttons=Gtk.ButtonsType.OK |