maweki / twitchlive-extension

TwitchLive-Panel Gnome Shell Extension displaying your favorite streamers
GNU General Public License v3.0
39 stars 8 forks source link

Add update-now-button #8

Closed maweki closed 8 years ago

maweki commented 8 years ago

If the pc is put to sleep and the update time is quite long, it won't update the data right away. Two possible solutions:

If #5 is being done, this could be right beside it.

bildschirmfoto von 2016-05-10 09-12-51

RaphaelRochet commented 8 years ago

Aren't extensions re-enabled on resume ?

maweki commented 8 years ago

Not on every setup. On my desktop machine, I have disabled locking the screen when the screen turns off. Now if the screen turns off because of inaction, the extensions are disabled anyways. If you force it into hibernation though, without inactivity, the extensions aren't disabled because the screen is neither locked nor is the shell put into inactive mode. If you come back from that setup, you aren't greeted with the clock-overlay.

RaphaelRochet commented 8 years ago

Ok. Maybe there's some signal or file we can connect to in order to act on resume. I will dig in that way.

maweki commented 8 years ago

If we make space for a settings-button anyways, we can add a manual update button. Should not be an issue this way.

RaphaelRochet commented 8 years ago

Menu item introduced by a1db1cc0f44da67de10516ae20cdcd8be8e7e1ff

maweki commented 8 years ago

Is it possible to keep the menu open when the button is clicked? Having the label change to "updating..." is very nice.

RaphaelRochet commented 8 years ago

That'd be nice. I tried a few tricks but none worked. I'll look at it later, time to sleep for now !

maweki commented 8 years ago

Openweather does it by having buttons that react to the clicked event.

RaphaelRochet commented 8 years ago

Ok. Seems we really need to use buttons for this, as menuitems always close the menu. So "update now" and settings should become buttons, grouped in a button box.

maweki commented 8 years ago

I don't know whether this looks presentable but I think "emblem-synchronizing-symbolic" is ok for update now. And during the update-process, we could switch between "network-transmit-symbolic" and "network-receive-symbolic" every half a second, if there is no way to spin the synchronize-button.

RaphaelRochet commented 8 years ago

There's a AnimatedIcon class available. I will try to use it !

maweki commented 8 years ago

Strange enough, clicking a streamer's name in the panel no longer closes the menu for me...

RaphaelRochet commented 8 years ago

Neither it does for me. The scroll tweak and/or the late update may be responsible for this. There's investigation to do there !

maweki commented 8 years ago

Give me a few minutes. I will bisect the issue. Maybe it gives us a hint on how to abuse that to achieve the result.

maweki commented 8 years ago

Yeah, the issue was introduced in d48a88f735042420ef2f645ace7994be2754d109

RaphaelRochet commented 8 years ago

That scroll tweak uses some menuitems' actor and thus bypasses some signal/events. That's the point :)

maweki commented 8 years ago

We can abuse this to not let the update-button close the menu, but clicking a streamer's icon should and then the user should see some indicator that the command is being executed (like in the gnome-shell example extension)

RaphaelRochet commented 8 years ago

Ok. I will work on this if you don't.

maweki commented 8 years ago

Feel free to do so.

RaphaelRochet commented 8 years ago

I added a line to close menu(0080c2d). I will try now to apply the same scheme on update menuitem.

RaphaelRochet commented 8 years ago

Please try ab0f984. The menu should NOT be closed now !

Edit: sorry, I copy/paste a bunch of lines by mistake. I forced-update to remove the silly commit.

maweki commented 8 years ago

We've done that and it works :)