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

Some fixes #11

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Some fixes #11

wants to merge 5 commits into from

Conversation

daschuer
Copy link

Hi @jferrao,

Thank you for your grate applet.

I use it for long, but is suffers some issues.
I have fixed them and I hope you will merge and release it.
For me this is a better solution then release it as a fork.

Kind regards,

Daniel

@SvenRieke
Copy link

I tried it, but it doesn't load at all in Cinnamon 17.1

error t=2015-01-16T10:08:30.746Z GSettings schema not found: undefined
trace t=2015-01-16T10:08:30.747Z 
<----------------
check_schema_and_init@/usr/share/cinnamon/js/ui/overrides.js:24
overrideGio/Gio.Settings.prototype._init@/usr/share/cinnamon/js/ui/overrides.js:71
getSettings@/home/sven/.local/share/cinnamon/applets/all-in-one-places@jofer/applet.js:657
main@/home/sven/.local/share/cinnamon/applets/all-in-one-places@jofer/applet.js:672
createApplet@/usr/share/cinnamon/js/ui/appletManager.js:329
addAppletToPanels@/usr/share/cinnamon/js/ui/appletManager.js:243
finishExtensionLoad@/usr/share/cinnamon/js/ui/appletManager.js:56
loadExtension@/usr/share/cinnamon/js/ui/extension.js:386
onEnabledAppletsChanged@/usr/share/cinnamon/js/ui/appletManager.js:192
---------------->
error t=2015-01-16T10:08:30.747Z [Applet "all-in-one-places@jofer"]: Failed to evaluate 'main' function on applet: all-in-one-places@jofer/45
error t=2015-01-16T10:08:30.748Z Could not load applet all-in-one-places@jofer

I first installed the applet from Spices, then put a symbolic link on the checkout code.

@SvenRieke
Copy link

The function getSettings in applet.js needs to be changed as well:

function getSettings(schema, applet_dir)
{
    /* 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 });
}

@daschuer
Copy link
Author

Hi @SvenRieke
Thank you for testing this pull request.
I have just tested it and it refused to load with your proposed changes.
What does || HAMSTER_APPLET_SCHEMA; do?
The original version still works for me on Ubuntu Trusty.

@SvenRieke
Copy link

Hi Daniel,

seems that one of the recent updates of Cinnamon changed things, now the commits to this pull request work without any change on my Ubuntu Trusty/Mint 17.1 Rebecca

Anyway, the change that I proposed was copied from another applet (Hamster-Applet) and I missed to change the used variable.
It should read like this:

function getSettings(schema) {
    /* Try getting a schema from the schemas path, fallback to default
     * schema */
    schema = schema || SCHEMA_NAME;
    if (Gio.Settings.list_schemas().indexOf(schema) == -1)
        throw _("Schema \"%s\" not found.").format(schema);
    return new Gio.Settings({ schema: schema });
}

SCHEMA_NAME is the one that is used:

const SCHEMA_NAME = "org.cinnamon.applets.AllInOnePlaces";

Basically, if no schema is passed to getSettings, then this variable is used as default value.

But as I said before, now it works without changing the getSettings() method, don't know why it failed before.

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

Successfully merging this pull request may close these issues.

2 participants