sugarlabs / sugar

Sugar GTK shell
GNU General Public License v3.0
253 stars 241 forks source link

[Feature] Tamagtochi Widget #852

Open Hrishi1999 opened 4 years ago

Hrishi1999 commented 4 years ago

Adds Tamagotchi widget. The XO icon responds/changes according to changes in the number of journal entries, battery status, and disk status. Please use https://github.com/Hrishi1999/sugar-artwork/tree/tamagotchi-widget to test this feature since the artwork for Tamagotchi widget is not complete.

aperezbios commented 4 years ago

I hate to be "that guy" but the word Tamagotchi is trademarked, and actively in force. It would be in our best interest to not use it in this, or any other, context. See https://trademarks.justia.com/752/47/tamagotchi-75247559.html

Please consider changing the name to a more generic term prior to release.

Hrishi1999 commented 4 years ago

Thanks, we discussed this topic in the GSoC Weekly meeting (http://meeting.sugarlabs.org/sugar-meeting/2019-08-12). I will change it.

Hrishi1999 commented 4 years ago

@quozl Review?

quozl commented 4 years ago

I've lost track of your plan. I can't find a feature page on the Wiki.

You're asking for a merge to master branch, so that means you are targeting future release of Sugar, not OLPC XO laptops. But you were careful to get the Dashboard tested on Fedora 18. I'm confused as to what you want to do. Tell me more?

Hrishi1999 commented 4 years ago

This feature is not a dashboard. This is a widget, which replaces the XO icon on the Sugar desktop. I've also opened a pull request for Dashboard integration. My GSoC project includes two projects 1) This widget (to be renamed) 2) Dashboard. Dashboard (integration) can be merged with the master branch for a future release but the Dashboard activity will work on XOs too.

quozl commented 4 years ago

Thanks. You are intending Tamagtochi for master. Please fill out the feature template. If you don't have a Wiki account, then either get one or add the answers to the pull request.

I've briefly reviewed the change;

Hrishi1999 commented 4 years ago

I will try to fix these issues this week. Thanks.

Hrishi1999 commented 4 years ago

@quozl Added gsettings key in https://github.com/sugarlabs/sugar/pull/852/commits/740eea4621a676643c36b01471ea05e371aa454c I've found a way to import extensions.deviceicon.battery but I think I will be required to make modifications to extensions/deviceicon/battery or still use an existing modification of setup() method (like I am using right now). I am still figuring it out. For the Cairo part, we will need to replace CanvasIcon with a Gtk.DrawingArea and I think that will affect how buddyicon's signals are used (notify::present and notify::color).

quozl commented 4 years ago

@quozl Added gsettings key in 740eea4 I've found a way to import extensions.deviceicon.battery but I think I will be required to make modifications to extensions/deviceicon/battery

That's expected. Modularity has several advantages in software development. If a module has a clear purpose (interface to battery), and callers don't need 100% of the functionality, it's normal.

or still use an existing modification of setup() method (like I am using right now). I am still figuring it out. For the Cairo part, we will need to replace CanvasIcon with a Gtk.DrawingArea and I think that will affect how buddyicon's signals are used (notify::present and notify::color).

Yes, I expect so. You can create signals if you need them.

Hrishi1999 commented 4 years ago

@quozl I tried to connect with Created and Deleted signals. I initially do a datastore query and then use the signals to maintain a count, but instead of Created signal I am using Updated signal. The count won't be incremented when I use Created, but it does decrement when I use Deleted signal. Using Update signal would sometimes increment the counter multiple times.

quozl commented 4 years ago

Yes, that's right. As you can see from the datastore source, updated signal occurs when a journal object is changed by an activity or Sugar, and that won't change the number of objects unless the find is given search criteria.

Is there a feature page yet?

Hrishi1999 commented 4 years ago

I will create a feature page this week. The has_battery change was unintentional. I will try to do a datastore query with some search criteria and then try to use Created signal. Thanks

Hrishi1999 commented 4 years ago

Feature page: https://wiki.sugarlabs.org/go/Features/Variable-Appearance-of-Buddy-Icon

quozl commented 4 years ago

Thanks.

quozl commented 4 years ago

It's been almost a month and there hasn't been;

I don't think anyone else has seen it. Do what you can to get input?

srevinsaju commented 4 years ago

@Hrishi1999 I have created a small update on your repo. I am not getting any visible changes to the XO icon on the Home page, I have built sugar-artwork from Hrishi1999/sugar-artwork:master