mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-27 01:28:34 +00:00
debug-viewer: use the gi GLib version rather than the old gobject glib package
This commit is contained in:
parent
ae13b16205
commit
66a6d948a6
3 changed files with 9 additions and 11 deletions
|
@ -24,8 +24,7 @@ def _ (s):
|
|||
|
||||
import logging
|
||||
|
||||
import glib
|
||||
from gi.repository import Gtk
|
||||
from gi.repository import Gtk, GLib
|
||||
|
||||
from GstDebugViewer import Common, Data
|
||||
from GstDebugViewer.GUI.colors import LevelColorThemeTango
|
||||
|
@ -347,13 +346,13 @@ class MessageColumn (TextColumn):
|
|||
end = None
|
||||
for start, end in ranges:
|
||||
if prev_end < start:
|
||||
tags.append (glib.markup_escape_text (msg[prev_end:start]))
|
||||
msg_escape = glib.markup_escape_text (msg[start:end])
|
||||
tags.append (GLib.markup_escape_text (msg[prev_end:start]))
|
||||
msg_escape = GLib.markup_escape_text (msg[start:end])
|
||||
tags.append ("<span foreground=\'#FFFFFF\'"
|
||||
" background=\'#0000FF\'>%s</span>" % (msg_escape,))
|
||||
prev_end = end
|
||||
if end is not None:
|
||||
tags.append (glib.markup_escape_text (msg[end:]))
|
||||
tags.append (GLib.markup_escape_text (msg[end:]))
|
||||
cell.props.markup = "".join (tags)
|
||||
|
||||
return message_data_func
|
||||
|
|
|
@ -28,10 +28,10 @@ import os.path
|
|||
from bisect import bisect_right, bisect_left
|
||||
import logging
|
||||
|
||||
import glib
|
||||
from gi.repository import GObject
|
||||
from gi.repository import Gtk
|
||||
from gi.repository import Gdk
|
||||
from gi.repository import GLib
|
||||
|
||||
from GstDebugViewer import Common, Data, Main
|
||||
from GstDebugViewer.GUI.columns import LineViewColumnManager, ViewColumnManager
|
||||
|
@ -850,8 +850,8 @@ class Window (object):
|
|||
bar.props.message_type = Gtk.MessageType.ERROR
|
||||
box = bar.get_content_area ()
|
||||
|
||||
markup = "<b>%s</b> %s" % (glib.markup_escape_text (message1),
|
||||
glib.markup_escape_text (message2),)
|
||||
markup = "<b>%s</b> %s" % (GLib.markup_escape_text (message1),
|
||||
GLib.markup_escape_text (message2),)
|
||||
label = Gtk.Label ()
|
||||
label.props.use_markup = True
|
||||
label.props.label = markup
|
||||
|
|
|
@ -24,8 +24,7 @@ import logging
|
|||
from GstDebugViewer import Common, Data, GUI
|
||||
from GstDebugViewer.Plugins import *
|
||||
|
||||
import glib
|
||||
from gi.repository import GObject
|
||||
from gi.repository import GObject, GLib
|
||||
from gi.repository import Gtk
|
||||
|
||||
class SearchOperation (object):
|
||||
|
@ -183,7 +182,7 @@ class FindBarWidget (Gtk.HBox):
|
|||
|
||||
def __set_status (self, text):
|
||||
|
||||
markup = "<b>%s</b>" % (glib.markup_escape_text (text),)
|
||||
markup = "<b>%s</b>" % (GLib.markup_escape_text (text),)
|
||||
|
||||
self.status_label.props.label = markup
|
||||
|
||||
|
|
Loading…
Reference in a new issue