Verified Commit 3ec622cb authored by tallero's avatar tallero

README: update flathub badge

parents 5f935258 4033436b
......@@ -40,7 +40,7 @@ You can download the installer [here](https://gitlab.gnome.org/World/Daty/upload
#### Flatpak
[![](https://terminal.run/stuff/flathub_download_badge.png)](https://flathub.org/apps/details/ml.prevete.Daty)
[![](https://flathub.org/assets/badges/flathub-badge-en.png)](https://flathub.org/apps/details/ml.prevete.Daty)
#### Archlinux
The package `daty-git` has been published on [AUR](https://aur.archlinux.org/packages/daty-git/).
......
......@@ -79,15 +79,21 @@ class Entity(Stack):
self.label.props.valign = 1
self.unit.props.valign = 1
self.new = new
if self.new:
print("new entity")
item_new = lambda Q: {'snaktype':'value',
'datavalue':{'type':'wikibase-entityid',
'value':{'entity-type':'item',
'numeric-id':Q}},
'datatype':'wikibase-item'}
snak = item_new(352346)
try:
self.read(snak)
except Exception as err:
raise err
self.new = new
if self.new:
print("new entity")
self.entry_focus_out_connection = self.entry.connect("focus-out-event",
self.entry_focus_out_event_cb)
self.entry_focus_in_connection = self.entry.connect("focus-in-event",
......@@ -233,7 +239,11 @@ class Entity(Stack):
self.popover.set_visible(True)
self.emit("entity-editing", self.popover)
except AttributeError as e:
<<<<<<< HEAD
raise e
=======
print("Exception", e)
>>>>>>> 4033436b19a40fea5b7d881328f2b82a1837d434
print("no popover available for this type of value")
else:
self.entry.emit("search-changed")
......@@ -259,6 +269,8 @@ class Entity(Stack):
try:
self.popover.popdown()
except AttributeError as e:
print(self.label.get_text())
print(e)
print("this entity has no popover")
self.emit("entity-leaving", self)
return True
......
......@@ -144,8 +144,13 @@ class Page(ScrolledWindow):
'value':{'entity-type':'item',
'numeric-id':1}},
'datatype':'wikibase-item'}}
<<<<<<< HEAD
value = Value(claim=claim, new=True)
values.insert(value,0)
=======
value = Value(claim={}, new=True)
values.add(value)
>>>>>>> 4033436b19a40fea5b7d881328f2b82a1837d434
values.show_all()
#event = EventButton()
#value.entity.value_eventbox.do_button_press_event(self, event)
......
......@@ -90,7 +90,12 @@ class Value(Grid):
self.reference_row = 0
self.references_expanded = False
self.entity = Entity(claim['mainsnak'], new=new)
if new:
snak = None
else:
snak = claim['mainsnak']
self.entity = Entity(snak=snak, new=new)
self.entity.connect("entity-editing", self.entity_editing_cb)
self.entity.connect("entity-leaving", self.entity_leaving_cb)
self.entity.connect("object-selected", self.object_selected_cb, claim)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment