projecthamster / cinnamon-applet Goto Github PK
View Code? Open in Web Editor NEW!DEPRECATED! hamster applet for the cinnamon DE
Home Page: http://projecthamster.org
License: GNU General Public License v3.0
!DEPRECATED! hamster applet for the cinnamon DE
Home Page: http://projecthamster.org
License: GNU General Public License v3.0
The HamsterBox in the Cinnamon applet menu has some appearance problems, particularly with the default Cinnamon them used in Linux Mint (probably the most-used theme!).
The Cinnamon settings API was made available in Cinnamon 1.8. We should use it...
A good example/tutorial can be found on LinuxMint Segfault:
http://segfault.linuxmint.com/2013/05/applet-desklet-extension-settings-api-a-brief-example/
Using the new API gives us:
prefs.js
)The downside is that is is only available in Cinnamon >= 1.8. This shouldn't be a really big deal since Cinnamon 1.8 is available in most current distributions, is packaged with the current Linux Mint 15 and is even being backported to earlier versions of Linux Mint (13, 14 and LMDE) although I'm not sure when that will happen. I don't really want to make this change until 1.8 has been made widely available
Line 10 in b251b05
- Portions originate from the gnome-shell source code, Copyright (c)
- its respectives authors.
- This project is released under the GNU GPL License.
- See COPYING for details.
Please provide a valid COPYING file. Can you add this header to all javascript files (also prefs.js and stuff.js)?
The applet icon and label are redrawn every 1 minute or on an activity update.
Due to the way the update currently works the label may be set to ""
before being set the the correct string. This can cause a short "glitch" where the ""
label is seen. It is especially noticeable since this glitch changes the size of the applet causing surrounding applets to move too.
Should be easy to fix by re-ordering the label update code so that the label is never set to ""
if it is about to be set to something else afterwards
The applet does not load with most recent cjs
version:
error t=2014-08-21T12:50:18Z No JS module 'dbus' found in search path
error t=2014-08-21T12:50:18Z [Applet "[email protected]"]: Error importing applet.js from [email protected]
error t=2014-08-21T12:50:18Z Could not load applet [email protected]
seems like just as in gjs
the dbus module was removed
see also http://segfault.linuxmint.com/2014/08/attention-applet-desklet-extension-developers/
When updating the applet from cinnamon spices using cinnamon applet settings application I get the following message.
An error occurred during installation or updating. You may wish to report this incident to the developer of [email protected].
If this was an update, the previous installation is unchanged
Details: Cannot call rmtree on a symbolic link
I think it something to do with updating the gsettings schema...
When I did the initial port of the shell extension, I disabled translations until I figured out how to get them working properly in Cinnamon.
It shouldn't be to hard to get them working again....
Applet is installed and works fine, but I can't call it with super+H in linux mint 17.
Any suggestion about how to fix it?
Similar post:
projecthamster/hamster#156 (comment)
The current applet icon will only display correctly in CInnamon's applet settings form if the user already has installed hamster (since it uses the hamster-time-tracker icon).
This means that users browsing the applets via Cinnamon settings and who don't already have hamster installed will get the "default applet" icon.
This can be addressed by including a icon.png
file in the root dir of the the applet
Whilst issue #3 made the menu readable again using the default cinnamon menu styles it's still not quite there.
We'll probably need to go back to an applet-specific stylesheet.css
to get these right. This should be a minimal as possible to make sure that the applet plays nicely with different themes.
@jonbrett With the Cinnamon applets now being hosted by Linux Mint on Github, we're trying to clean things up and get them working again. It seems like the current version here is more functional than the one we have from the spices site, and I'd like to update your applet to reflect the more recent changes here, if that's OK with you.
I was also wondering what your intentions are for this applet long term. I know you passed off development of the feeds applet. Are you planning to do the same with this one as well, or do you want to maintain it yourself still?
Projecthamster/cinnamon-applet need a develop branch to push the PR at. But I dont have sufficient permissions to crate it.
@jonbrett I am sorry to misuse the tracker like this, but I wanted to make sure to reach you :)
I do not mean to bother you but as my mail a month ago went unanswered I was not sure if that was deliberate or not. So I do hope you can overlook this rather drastic way to get in touch...
So i guess my question is: Did my mail get to you?
Thanks for your time, Eric.
My platform:
According to the docs it is enough to clone the repo into ~/.local/share/cinnamon/applets
. However, when doing so, I'm able to see the applet on the list, but adding it to the panel results in the error. The corresponding lines in the log:
error t=2015-05-07T11:56:43Z Schema "org.cinnamon.hamster-applet" not found.
error t=2015-05-07T11:56:43Z [Applet "[email protected]"]: Failed to evaluate 'main' function on applet: [email protected]/28
error t=2015-05-07T11:56:43Z Could not load applet [email protected]
After digging a bit, looks like this results from the lines in convenience.js
:
function getSettings(schema) {
/* Try getting a schema from the schemas path, fallback to default
* schema */
schema = schema || HAMSTER_APPLET_SCHEMA;
if (Gio.Settings.list_schemas().indexOf(schema) == -1)
throw _("Schema \"%s\" not found.").format(schema);
return new Gio.Settings({ schema: schema });
}
Indeed, running gsettings list-schemas
doesn't show org.cinnamon.hamster-applet
. Only after doing what is normally done by proper package, i.e. dropping schemas/org.cinnamon.hamster-applet.gschema.xml
into /usr/share/glib-2.0/schemas
and running glib-compile-schemas .
inside, the applet is able to see the schema, installs and runs correctly.
Is this some specificity of my platform, or is it supposed to work that way? If so, the README is oversimplifying things...
Maybe adding some detection of the schema in applet's local dir would be helpful? I see that Gio.SettingsSchema describes exactly this use case. If you think it is the way to go, I can hack some PR from this...
In the initial port of the cinnamon applet, the applet preferences were disabled. These should be re-enabled using suitable Cinnamon APIs.
In Cinnamon 1.6.x we will need to use gsettings and can port the prefs.js
from the shell extension in order to provide a GUI form to change these.
Ultimately we should move to the new Cinnamon settings API, since this will integrate nicely into the cinnamon settings generates the GUI for us. Unfortunately that is not available until Cinnamon 1.8.
Example here:
http://segfault.linuxmint.com/2013/05/applet-desklet-extension-settings-api-a-brief-example/
Also useful info here:
http://segfault.linuxmint.com/2013/05/cinnamon-1-8-settings-api-some-lesser-known-bits/
The shell extension had three settings. The Cinnamon applet should initially support these:
<----------------
@/home/maria/.local/share/cinnamon/applets/[email protected]/applet.js:22
Extension.prototype._init@/usr/share/cinnamon/js/ui/extension.js:180
Extension@/usr/share/cinnamon/js/ui/extension.js:138
loadExtension@/usr/share/cinnamon/js/ui/extension.js:468
onEnabledAppletsChanged@/usr/share/cinnamon/js/ui/appletManager.js:207
---------------->
error t=2015-09-29T13:41:00.334Z [Applet "[email protected]"]: Error importing applet.js from [email protected]
error t=2015-09-29T13:41:00.335Z Could not load applet [email protected]
OS: Linux Mint 20.1 Cinnamon (4.8.6)
When I add text in the "Activity" and press enter, the applet just closes without adding anything.
info t=2014-12-03T02:08:39.707Z Adding systray: mintupdate.py
error t=2014-12-03T02:09:07.834Z No JS module 'dbus' found in search path
trace t=2014-12-03T02:09:07.834Z
<----------------
@/home/vagif/.local/share/cinnamon/applets/[email protected]/applet.js:22
Extension.prototype._init@/usr/share/cinnamon/js/ui/extension.js:152
Extension@/usr/share/cinnamon/js/ui/extension.js:119
loadExtension@/usr/share/cinnamon/js/ui/extension.js:383
onEnabledAppletsChanged@/usr/share/cinnamon/js/ui/appletManager.js:192
---------------->
error t=2014-12-03T02:09:07.834Z [Applet "[email protected]"]: Error importing applet.js from [email protected]
error t=2014-12-03T02:09:07.835Z Could not load applet [email protected]
The current strings in the translation .po
files are from the shell extension (from which this applet was forked).
Whilst most, if not all, of the strings currently used in the applet match those in the .po
files, the comments about where the string was generated don't make sense (extension.js
doesn't even exist!).
The .po
files should be re-generated from the current applet source and any strings that have already been translated can be copied across.
I remembered this when merging #9
Using master.
Trying to add the applet to the panel i'm getting this error:
error t=2017-05-17T16:15:08Z redeclaration of let fact trace t=2017-05-17T16:15:08Z <---------------- Extension.prototype._init@/usr/share/cinnamon/js/ui/extension.js:155:13 Extension@/usr/share/cinnamon/js/ui/extension.js:116:5 loadExtension@/usr/share/cinnamon/js/ui/extension.js:449:25 onEnabledAppletsChanged@/usr/share/cinnamon/js/ui/appletManager.js:236:13 ----------------> error t=2017-05-17T16:15:08Z [Applet "[email protected]"]: Error importing applet.js from [email protected] error t=2017-05-17T16:15:08Z Could not load applet [email protected]
linuxmint/cinnamon#4121 (comment)
I mean I saw a fix somewhere. Please push upstream.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.