maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar (https://talk.maemo.org/showthread.php?t=40408)

shanttu 2012-03-16 13:39

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Quote:

Originally Posted by reinob (Post 1180219)
Just to add: I've decided to remove all support for synchronizing alarms, so the alarms I set on the N900 stay there and the alarms I set in google calendar stay also there.

Now I'm a fully happy user of erminig :)

Would like that as well. Would you mind sharing the instructions (=what lines to edit)?

gbuergisser 2012-03-16 13:49

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Or even better a unified diff.

reinob 2012-03-16 14:20

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Quote:

Originally Posted by shanttu (Post 1180246)
Would like that as well. Would you mind sharing the instructions (=what lines to edit)?

Hmm.. I guess it's too late for that. It was a quick search-&-destroy-and-leave-no-backups kind of job :)

I only edited two files: Event.py and erminig-core.py

In Event.py you basically have to make sure that no matter what self.alarm is never assigned to anything other than -1.

At the very end you have the notorious def get_alarm that should stay as "return self.alarm" (i.e. NOT str(self.alarm)) or anything else. As a bonus you can also put "return -1" but that doesn't really matter.

What matters is at the beginning (def __init__ ...) The last line of that function should read "self-alarm = -1".

This way you make sure that anything coming from google (i.e. any event being created to be stored on the N900) will be stripped of any alarms.

For the other direction (i.e. no alarms of your N900 will go to google), you need to edit erminig_core.py.

The changes there were a bit larger. Basically removing any line dealing with the word "alarm" (except those calling the shared library, because I didn't want to recompile it.)

You can have a look here: http://geni.ath.cx/maemo/erminig-0.2.11.patch
That was the patch that brought the alarm framework to erminig, so basically you have to "undo" those changes, except, again, those dealing with the shared library.

So delete things like:
Code:

  if len(e.reminder) > 0:
                                alarm = int(e.reminder[0].minutes)

..

 if len(e.when[0].reminder) > 0:
                                alarm = int(e.when[0].reminder[0].minutes)

..

                if len(event.reminder) > 0:
                        event.reminder[0].minutes = evt.get_alarm()
                else:        event.reminder.append(gdata.calendar.Reminder(minutes=evt.get_alarm()));


..

                if len(event.when[0].reminder) > 0:
                        event.when[0].reminder[0].minutes = evt.get_alarm()
                else:
event.when[0].reminder.append(gdata.calendar.Reminder(minutes=evt.get_alarm()));

That's four small chunks, so it should be trivial to do.
Otherwise I can send you my erminig_core.py and you do the diff. Or you wait until I have time to grab the file from the .deb and do the diff myself (but I can't do it from work, i.e. now, and at home I usually have no time to hack around..)

Cheers.

HolgerN 2012-04-17 09:21

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
I want to make a new release of erminig containing the newest patches. I hope this is ok, but if you think i should not touch the package, than i will not do anything.

I want to add the patch from http://talk.maemo.org/showpost.php?p...&postcount=558 for full day events

Quote:

/opt/maemo/usr/share/erminig/erminig_core.py:
Quote:

tz = time.timezone
if (time.daylight):
tz = time.altzone
start_time += tz
end_time += tz
#start_time += time.timezone
#end_time += time.timezone
I also want to add the patch from http://talk.maemo.org/showpost.php?p...&postcount=595

which fixes the 0 minute alarm bug
Quote:

def get_alarm(self):
return self.alarm
Do you have more patches which i should inserted in the new version of erminig? What do you think?

I will only change those few line and nothing else.

HolgerN 2012-04-18 12:15

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Ok i pushed a new version 0.2.12.5 to extras devel.

I fixed the full day events bug for daylight savings
Quote:

tz = time.timezone
if (time.localtime(start_time).tm_isdst):
tz = time.altzone
start_time += tz
end_time += tz
#start_time += time.timezone
#end_time += time.timezone

The 0 minute alarm bug is also fixed.

guilledoc 2012-04-18 12:31

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Hi
Allways wanted to use Erminig but never being able to.
This is the log file I get when trying to modify, delete account or sync:

Traceback (most recent call last):
File "/opt/maemo/usr/share/erminig/settings_ui.py", line 17, del_google_acct(widget=<hildon.Button object at 0x41e743c8 (HildonButton at 0x5cc490)>, data=<hildon.Dialog object at 0x41e70698 (HildonDialog at 0x5bb9d0)>)
def del_google_acct(widget, data):
id = get_google_acct_id()
account = google_accounts.get_account_by_id(id)
variables: {'id': ('builtin', <built-in function id>), 'get_google_acct_id': ('global', <function get_google_acct_id at 0x416c9af0>)}
File "/opt/maemo/usr/share/erminig/settings_ui.py", line 14, get_google_acct_id()
(model, iter) = ts.get_selected()
return model.get_value(iter, 0)
variables: {'model.get_value': ('local', <built-in method get_value of gtk.ListStore object at 0x41e74170>), 'iter': ('local', None)}
TypeError: iter must be a GtkTreeIter

Any idea I really want to give it a try :(

ivgalvez 2012-04-18 12:55

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Quote:

Originally Posted by guilledoc (Post 1193804)
Hi
Allways wanted to use Erminig but never being able to.
This is the log file I get when trying to modify, delete account or sync:

Traceback (most recent call last):
File "/opt/maemo/usr/share/erminig/settings_ui.py", line 17, del_google_acct(widget=<hildon.Button object at 0x41e743c8 (HildonButton at 0x5cc490)>, data=<hildon.Dialog object at 0x41e70698 (HildonDialog at 0x5bb9d0)>)
def del_google_acct(widget, data):
id = get_google_acct_id()
account = google_accounts.get_account_by_id(id)
variables: {'id': ('builtin', <built-in function id>), 'get_google_acct_id': ('global', <function get_google_acct_id at 0x416c9af0>)}
File "/opt/maemo/usr/share/erminig/settings_ui.py", line 14, get_google_acct_id()
(model, iter) = ts.get_selected()
return model.get_value(iter, 0)
variables: {'model.get_value': ('local', <built-in method get_value of gtk.ListStore object at 0x41e74170>), 'iter': ('local', None)}
TypeError: iter must be a GtkTreeIter

Any idea I really want to give it a try :(

Yes, once in I while I retest it and found all this weird crashes, my suggestion is to reinstall the application but first run a dpkg --purge and be sure that no configuration files are left.

ivgalvez 2012-04-18 13:33

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Installed, entered the Google account and not checked the auto-synchronize option, then pressed the + button and the application stopped responding.

Now every time I open Erming-NG and press the + button it stops.

guilledoc 2012-04-18 19:53

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Quote:

Originally Posted by ivgalvez (Post 1193810)
Yes, once in I while I retest it and found all this weird crashes, my suggestion is to reinstall the application but first run a dpkg --purge and be sure that no configuration files are left.

did it same problem any ideas?:(

BertvanDorp 2012-04-18 20:03

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Wow, HolgerN, thanks for picking up on the development!

A while ago, I tried running Erminig 3.0 (from the repos, check garage) on the N900 (Maemo5), but I was not able to get it together. I believe it was something with the built-in calendar in Maemo4. However, I remember some fixes for the Google Accounts handling was included in the 3.0 version. The source/data can be found here: https://garage.maemo.org/frs/?group_id=702. Hope to be of help!


All times are GMT. The time now is 03:08.

vBulletin® Version 3.8.8