Commit 5d62444f authored by Cédric Bellegarde's avatar Cédric Bellegarde

Update tooltip on the fly

parent 891c8721
......@@ -75,7 +75,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Pin this page</property>
<property name="opacity">0</property>
<property name="image">pin_image</property>
<property name="relief">none</property>
......
......@@ -12,6 +12,8 @@
from gi.repository import Gtk, GLib, WebKit2, Pango
from gettext import gettext as _
from eolie.label_indicator import LabelIndicator
from eolie.define import App, ArtSize
......@@ -155,8 +157,10 @@ class PagesManagerChild(Gtk.FlowBoxChild):
"""
if self.view.webview.uri in App().pinned:
self.__pin_image.set_opacity(1)
self.__pin_button.set_tooltip_text(_("Unpin this page"))
else:
self.__pin_image.set_opacity(0.5)
self.__pin_button.set_tooltip_text(_("Pin this page"))
self.__pin_button.set_opacity(1)
self.__close_button.get_image().set_from_icon_name(
"window-close-symbolic",
......
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