diff options
author | René Stadler <mail@renestadler.de> | 2009-01-29 23:10:01 +0200 |
---|---|---|
committer | René Stadler <mail@renestadler.de> | 2009-02-07 23:07:56 +0200 |
commit | 239f8e1c9c883c71d8f3ab4082c81339d1f9d768 (patch) | |
tree | 303ba91331c21604aebed88af9210f58bcba491d | |
parent | 6bd1fb9396c648ce3d9b7bcf4a0e3899d7db535e (diff) |
Use gobject.set_application_name (if available)
-rw-r--r-- | GstInspector/GUI/window.py | 13 | ||||
-rw-r--r-- | GstInspector/main.py | 6 |
2 files changed, 14 insertions, 5 deletions
diff --git a/GstInspector/GUI/window.py b/GstInspector/GUI/window.py index 439f368..741a460 100644 --- a/GstInspector/GUI/window.py +++ b/GstInspector/GUI/window.py @@ -559,13 +559,16 @@ class InspectorWindow (Data.Consumer): # dialog displays the program name as set in the glade file when we run # against GTK+ 2.12. - # TODO: Once we depend on a recent enough pygobject, use - # gobject.set_application_name in main instead. The about dialog will - # pick it up from there. + # TODO: Once we depend on a recent enough pygobject, remove these + # checks. The about dialog will pick up the application name from what + # we set in main. try: - dialog.props.program_name = _("GStreamer Inspector") + gobject.set_application_name except AttributeError: - pass + try: + dialog.props.program_name = _("GStreamer Inspector") + except AttributeError: + pass dialog.props.version = GstInspector.version diff --git a/GstInspector/main.py b/GstInspector/main.py index 0ce0795..887f3a7 100644 --- a/GstInspector/main.py +++ b/GstInspector/main.py @@ -524,6 +524,12 @@ def main (): _init_excepthooks () _init_paths () _init_locale () + + try: + gobject.set_application_name (_("GStreamer Inspector")) + except AttributeError: + pass + options = _init_options () _init_logging (options.log_level) |