Skip to content

Commit

Permalink
clean up comments and lines
Browse files Browse the repository at this point in the history
  • Loading branch information
sshil authored and msrb committed Sep 29, 2024
1 parent 02a3614 commit 8a46d45
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 39 deletions.
5 changes: 0 additions & 5 deletions data/css/oops.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
.checking {
background-color: red;
}


GtkListBoxRow, row {
padding: 8px;
margin: 5px;
Expand Down
16 changes: 0 additions & 16 deletions src/gnome-abrt
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,6 @@ class OopsApplication(Gtk.Application):
message="No available problem source.")

# pylint: disable=W0105
'''
This is a trick to make xgettext think we are C language
and emit the translators comment correctly. It's a bug
in xgettext that it recognizes Python files only after
their .py extension, there is no way to force the format.
See: bugs.launchpad.net/intltool/+bug/377872
// Translators: a list header, "My" is a shortcut for "My bugs"
_("My")
'''
self.all_sources = [("All Problems", MultipleSources(sources))]

controller = Controller(self.all_sources,
Expand Down Expand Up @@ -264,18 +255,11 @@ class OopsApplication(Gtk.Application):
"Michal Toman <michal.toman@gmail.com>",
"Rafał Lużyński <digitalfreak@lingonborough.com>",
"Richard Marko <rmarko@fedoraproject.org>"])
#dialog.set_artists(artists)
#dialog.set_translator_credits(_("translator-credits"))

windows = self.get_windows()
if windows:
dialog.set_transient_for(windows[0])

#dialog.run()
dialog.present()
#dialog.destroy()
#dialog.connect("response", lambda d, r: d.destroy())
#dialog.connect("close", dialog.destroy)

#pylint: disable=W0613
def on_action_quit(self, action, parameter):
Expand Down
21 changes: 3 additions & 18 deletions src/gnome_abrt/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ def __init__(self, problem_values):
self._lbl_app = Gtk.Label.new(problem_values[0])
self._lbl_app.set_halign(Gtk.Align.START)
self._lbl_app.set_hexpand(True)
#self._lbl_app.set_alignment(0.0, 0.5)
self._lbl_app.set_xalign(0.0)
self._lbl_app.set_yalign(0.5)
self._lbl_app.set_ellipsize(Pango.EllipsizeMode.END)
Expand All @@ -240,7 +239,6 @@ def __init__(self, problem_values):
self._lbl_type = Gtk.Label.new(problem_values[2])
self._lbl_type.set_halign(Gtk.Align.START)
self._lbl_type.set_hexpand(True)
#self._lbl_type.set_alignment(0.0, 0.5)
self._lbl_type.set_xalign(0.0)
self._lbl_type.set_yalign(0.5)
self._lbl_type.get_style_context().add_class('dim-label')
Expand Down Expand Up @@ -359,25 +357,16 @@ def __init__(self, application, sources, controller):
self.app_menu_button.set_menu_model(builder.get_object('app_menu'))

self.menu_problem_item = builder.get_object('menu_problem_item')
#self.menu_problem_item = Gtk.Menu.new_from_model(self.menu_problem_item)
self.menu_problem_item = Gtk.PopoverMenu.new_from_model(self.menu_problem_item) #jft

#self.menu_problem_item.attach_to_widget(self) #jft
self.menu_problem_item = Gtk.PopoverMenu.new_from_model(self.menu_problem_item)

self.menu_multiple_problems = builder.get_object(
'menu_multiple_problems')
#self.menu_multiple_problems = Gtk.Menu.new_from_model(
# self.menu_multiple_problems)
self.menu_multiple_problems = Gtk.PopoverMenu.new_from_model(self.menu_multiple_problems) #jft

#self.menu_multiple_problems.attach_to_widget(self) #jft
self.menu_multiple_problems = Gtk.PopoverMenu.new_from_model(self.menu_multiple_problems)

#pylint: disable=E1120
css_prv = Gtk.CssProvider.new()
css_prv.load_from_resource('/org/freedesktop/GnomeAbrt/css/oops.css')
stl_ctx = self.get_style_context()
#stl_ctx.add_provider_for_screen(stl_ctx.get_screen(), css_prv, 6000)
#stl_ctx.add_provider_for_display(Gdk.Display.get_default(), css_prv, 6000) #jft
stl_ctx.add_provider_for_display(Gdk.Display.get_default(), css_prv,
Gtk.STYLE_PROVIDER_PRIORITY_USER)

Expand Down Expand Up @@ -421,7 +410,6 @@ def __init__(self, application, sources, controller):
# enable observer
self._source_observer.enable()

#self.lb_problems.connect("key-press-event", self._on_key_press_event)
key_controller = Gtk.EventControllerKey()
key_controller.connect("key-pressed", self._on_key_press_event)
self.add_controller(key_controller)
Expand Down Expand Up @@ -511,7 +499,6 @@ def _add_actions(self, application):
application.set_accels_for_action('win.search', ['<Primary>f'])

def _configure_sources(self, sources):
stack = Gtk.Stack()
for name, src in sources:
self._all_sources.append(src)
src.attach(self._source_observer)
Expand Down Expand Up @@ -684,8 +671,6 @@ def _reload_problems(self, source):

self._reloading = True
try:
#self.lb_problems.foreach(lambda w, u: w.destroy(), None)
#jft
child = self.lb_problems.get_first_child()
while child:
next_child = child.get_next_sibling()
Expand Down Expand Up @@ -768,7 +753,7 @@ def _show_problem_message(self, message):
msg.set_wrap(True)
msg.set_selectable(True)
msg.set_xalign(0)
self.vbx_problem_messages.append(msg) #jft
self.vbx_problem_messages.append(msg)

def _get_reason_for_problem_type(self, application, problem_type, human_type):
if problem_type == 'Kerneloops':
Expand Down

0 comments on commit 8a46d45

Please sign in to comment.