diff options
author | John Kacur <jkacur@redhat.com> | 2020-07-29 09:59:10 -0400 |
---|---|---|
committer | John Kacur <jkacur@redhat.com> | 2020-07-31 22:55:22 -0400 |
commit | 9684f59d920d2d863045d1055fcf4e729f60375c (patch) | |
tree | 487f4c90fd475990c6f178c6774c9c245a890f3b | |
parent | 0428729d4a0d08d8a9e827c78e3f96f22187b77e (diff) | |
download | tuna-9684f59d920d2d863045d1055fcf4e729f60375c.tar.gz |
tuna_gui.py: Fix inconsistent spacing from in tuna_gui.py
Fixing some spacing that wasn't consistent from the changes to modernize
the spacing in tuna_gui.py
Signed-off-by: John Kacur <jkacur@redhat.com>
-rwxr-xr-x | tuna/tuna_gui.py | 108 |
1 files changed, 54 insertions, 54 deletions
diff --git a/tuna/tuna_gui.py b/tuna/tuna_gui.py index eaa5573..f9d44c0 100755 --- a/tuna/tuna_gui.py +++ b/tuna/tuna_gui.py @@ -113,58 +113,58 @@ class main_gui: Gtk.IconSize.SMALL_TOOLBAR) self.window.set_icon(pixbuf) - def on_status_icon_activate(self, status_icon): - if self.window.is_active(): - self.window.hide() - else: - self.window.present() - - def on_status_icon_popup_menu(self, icon, event_button, event_time): - menu = Gtk.Menu() - - quit = Gtk.MenuItem("_Quit") - menu.add(quit) - quit.connect_object('activate', self.on_mainbig_window_delete_event, icon) - quit.show() - - menu.popup(None, None, None, event_button, event_time) - - def on_mainbig_window_delete_event(self, obj, event=None): - Gtk.main_quit() - - def show(self): - self.cpuview.refresh() - self.irqview.show() + def on_status_icon_activate(self, status_icon): + if self.window.is_active(): + self.window.hide() + else: + self.window.present() + + def on_status_icon_popup_menu(self, icon, event_button, event_time): + menu = Gtk.Menu() + + quit = Gtk.MenuItem("_Quit") + menu.add(quit) + quit.connect_object('activate', self.on_mainbig_window_delete_event, icon) + quit.show() + + menu.popup(None, None, None, event_button, event_time) + + def on_mainbig_window_delete_event(self, obj, event=None): + Gtk.main_quit() + + def show(self): + self.cpuview.refresh() + self.irqview.show() + self.procview.show() + + def refresh(self): + if not self.procview.evlist: # Poll, as we don't have perf + self.ps.reload() + self.ps.reload_threads() self.procview.show() - - def refresh(self): - if not self.procview.evlist: # Poll, as we don't have perf - self.ps.reload() - self.ps.reload_threads() - self.procview.show() - self.irqview.refresh() - return True - - def check_root(self): - if os.getuid() == 0: - return False - self.binpath = sys.executable.strip(os.path.basename(sys.executable)) - os.execv(self.binpath + 'pkexec', - [sys.executable] + [self.binpath + 'tuna'] + sys.argv[1:]) - return True - - def check_env(self): - if not os.path.exists(self.config.config["root"]): - try: - os.stat(self.config.config["root"]) - except (IOError, OSError): - os.mkdir(self.config.config["root"]) - if not os.path.exists("/root/.local/share/"): - try: - os.stat("/root/.local/share/") - except (IOError, OSError): - os.mkdir("/root/.local/") - os.mkdir("/root/.local/share/") - - def run(self): - Gtk.main() + self.irqview.refresh() + return True + + def check_root(self): + if os.getuid() == 0: + return False + self.binpath = sys.executable.strip(os.path.basename(sys.executable)) + os.execv(self.binpath + 'pkexec', + [sys.executable] + [self.binpath + 'tuna'] + sys.argv[1:]) + return True + + def check_env(self): + if not os.path.exists(self.config.config["root"]): + try: + os.stat(self.config.config["root"]) + except (IOError, OSError): + os.mkdir(self.config.config["root"]) + if not os.path.exists("/root/.local/share/"): + try: + os.stat("/root/.local/share/") + except (IOError, OSError): + os.mkdir("/root/.local/") + os.mkdir("/root/.local/share/") + + def run(self): + Gtk.main() |