mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-02 17:26:17 +01:00
gobject.py: Simplify or_join_array
This commit is contained in:
parent
bfbe7127d5
commit
243bec9d0d
@ -160,16 +160,8 @@ class SignalFrame:
|
|||||||
def or_join_array (self, array):
|
def or_join_array (self, array):
|
||||||
if len(array) == 0:
|
if len(array) == 0:
|
||||||
return "???"
|
return "???"
|
||||||
|
else:
|
||||||
v = {}
|
return ' or '.join(set(array))
|
||||||
for i in range(len(array)):
|
|
||||||
v[str(array[i])] = 1
|
|
||||||
array = v.keys()
|
|
||||||
s = array[0]
|
|
||||||
for i in range(1, len(array)):
|
|
||||||
s = s + " or %s"%array[i]
|
|
||||||
|
|
||||||
return s
|
|
||||||
|
|
||||||
def get_detailed_signal_from_frame(self, frame, signal):
|
def get_detailed_signal_from_frame(self, frame, signal):
|
||||||
detail = self.read_var (frame, "detail")
|
detail = self.read_var (frame, "detail")
|
||||||
|
Loading…
Reference in New Issue
Block a user