Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with schema not visible #18

Open
jest opened this issue May 7, 2015 · 4 comments
Open

Problem with schema not visible #18

jest opened this issue May 7, 2015 · 4 comments

Comments

@jest
Copy link

jest commented May 7, 2015

My platform:

  • Mint 17.1 "Rebecca"
  • hamster from dylanmccall's "daily" PPA
  • cinnamon-applet from git

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...

@Songworks
Copy link

Came upon the same issue on a fresh Linux Mint 17.3 installation.
Suprised it did. Installed master of this applet month ago on a Linux Mint 17.1 machine and it worked out of box (the applet on cinnamon-spices.linuxmint.com didn't since 17.1, I think). I suppose it might be because I had the applet installed through cinnamon beforehand but removed again, which didn't clean the schema?

Could the readme be updated with a mention to jest's solution for this possible problem?
Only found this issue by chance.

@andonisantos
Copy link

I also had this issue using Cinnamon on Arch Linux. I saw on projecthamster.org that you plan on rewriting a lot of things. However, seeing that "as it looks right now, the current hamster repository will stay as it is", it would be nice to at least include the workaround in the README file as Songworks suggested. At least for the time being.

@ghost
Copy link

ghost commented May 15, 2017

New shema have been build and codebase have been updated on cinnamon spice
linuxmint/cinnamon-spices-applets@bcd6d7e

It should solve the issue.

@elbenfreund
Copy link
Contributor

As this Issue documents the cinnamon applet is now maintained by the Mint Linux team.
As such this repository is kept around for historical and migration reasons.
Contributors are encouraged to head over there and no work will be done on this
repository at all.
Thanks for your support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants