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