From d17158bc7d2c1a6261a4fa313ca49380d8863e91 Mon Sep 17 00:00:00 2001 From: Jakub Filak Date: Wed, 3 Jun 2015 07:29:52 +0200 Subject: [PATCH] Enabled the Details also for the System problems Since gnome-abrt gets the problem details from D-Bus, we can enable the Details dialogue also for the System problems. Non-root but privileged users have access to all problems via the Problems D-Bus service but they do not have file system permissions to read the system problems which were required to show the Details dialogue. Closes #64 Signed-off-by: Jakub Filak --- src/gnome-abrt | 4 ++-- src/gnome_abrt/views.py | 9 +-------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/gnome-abrt b/src/gnome-abrt index 984ec3d..25e8b02 100755 --- a/src/gnome-abrt +++ b/src/gnome-abrt @@ -262,11 +262,11 @@ class OopsApplication(Gtk.Application): if len(sources) == 0: raise UnavailableSource("No available problem source.") - self.all_sources = [(_("My"), MultipleSources(sources), True)] + self.all_sources = [(_("My"), MultipleSources(sources))] try: self.all_sources.append((_("System"), - get_foreign_problems_source(), False)) + get_foreign_problems_source())) except UnavailableSource as ex: logging.warning(str(ex)) diff --git a/src/gnome_abrt/views.py b/src/gnome_abrt/views.py index 685d5a9..c96b998 100644 --- a/src/gnome_abrt/views.py +++ b/src/gnome_abrt/views.py @@ -472,11 +472,9 @@ class OopsWindow(Gtk.ApplicationWindow): self.connect("key-press-event", self._on_key_press_event) - def _update_detail_buttons_visibility(self): - self._builder.btn_detail.set_visible(self._source.allow_details) def _configure_sources(self, sources): - for name, src, allow_details in sources: + for name, src in sources: self._all_sources.append(src) src.attach(self._source_observer) @@ -500,8 +498,6 @@ class OopsWindow(Gtk.ApplicationWindow): src.name = name # add an extra member button (I don't like it but it so easy) src.button = src_btn - # add an extra member allow_details (I don't like it but it so easy) - src.allow_details = allow_details src_btn.connect("clicked", self._on_source_btn_clicked, src) self._source = self._all_sources[0] @@ -532,7 +528,6 @@ class OopsWindow(Gtk.ApplicationWindow): # source's button self._set_button_toggled(btn, False) else: - self._update_detail_buttons_visibility() if old_source is not None: # sources were switched and we have to untoggle old source's # button @@ -589,7 +584,6 @@ class OopsWindow(Gtk.ApplicationWindow): if (not temporary or source_index != 0) and self._all_sources: self._source = self._all_sources[0] self._set_button_toggled(self._source.button, True) - self._update_detail_buttons_visibility() else: self._source = None @@ -738,7 +732,6 @@ class OopsWindow(Gtk.ApplicationWindow): if res: self._set_button_toggled(old_source.button, False) self._set_button_toggled(source.button, True) - self._update_detail_buttons_visibility() break problem_row = self._find_problem_row(problem_id) -- 2.1.0