Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fixes for workspace change tracking #38

Closed
pepgma opened this Issue · 2 comments

2 participants

@pepgma

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.

@tbaugis
Owner

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

@tbaugis
Owner

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

@tbaugis tbaugis closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.