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

Already on GitHub? Sign in to your account

Fixes for workspace change tracking #38

Closed
pepgma opened this Issue Oct 16, 2012 · 2 comments

Comments

Projects
None yet
2 participants

pepgma commented Oct 16, 2012

Install readme file should suggest installing python-wnck for workspace changes to be detected.

Also, on the file today.py wnck is missing. Suggest adding on file start:

try:
    import wnck
except:
    logging.warning("Could not import wnck - workspace tracking will be disabled")
    wnck = None

Also workspace switching seems to be broken in today.py (and possibly appley.py) . Suggest changing on_workspace_changed() to:

                    if activity:
                        # we need dict below
                        activity = dict(name = str(activity['name']),
                                        category = str(activity['category']),
                                        description = fact.description,
                                        tags = fact.tags)

   #.....

        # check if maybe there is no need to switch, as field match:
        if self.last_activity and \
           self.last_activity.activity.lower() == activity['name'].lower() and \
           (self.last_activity.category or "").lower() == (activity['category'] or "").lower() and \
           ", ".join(self.last_activity.tags).lower() == ", ".join(activity['tags']).lower():
            return

        # ok, switch
        fact = stuff.Fact(activity['name'],
                          tags = ", ".join(activity['tags']),
                          category = activity['category'],
                          description = activity['description']);
        runtime.storage.add_fact(fact)

Don't know if the right thing to do but solves the issue. The code used was the latest from the repository as of today.

Contributor

tstriker commented Oct 17, 2012

unless i'm mistaken, python-wnck doesn't do anything on the new clutter based desktops (shell, unity).

as for the patch - i'd suggest using git pull requests to propose changes - makes it much easier to review and comment on. you just fork the project, then apply and push changes to your forked repo and then make a pull request.

right now i'm not sure what the suggested change does or changes

Contributor

tstriker commented Feb 9, 2014

fixed the activity bits in this branch
https://github.com/projecthamster/hamster/tree/pre_gtk3

and killed workspace support in master, will have to rethink it before it finds it's way back

@tstriker tstriker closed this Feb 9, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment