Nieuws:

Welkom, Gast. Alsjeblieft inloggen of registreren.
Heb je de activerings-mail niet ontvangen?

Auteur Topic: Mail notificatie  (gelezen 1231 keer)

Offline tonio11

  • Lid
Mail notificatie
« Gepost op: 2011/08/19, 15:27:47 »
Bij ubuntu staat bovenaan een applet voor binnekomende mails, maar dit werkt enkel voor evolution. Ik werk met thunderbird en mijn vraag is of men het zo kan instellen dat binnenkomende mails met thunderbird ook genotifieerd worden ?

Re: Mail notificatie
« Reactie #1 Gepost op: 2011/08/19, 17:05:46 »
Gebruik je gmail?
Desktop:
Processor: Intel® Core™2 Quad CPU Q8300 @ 2.50GHz × 4, Geheugen: 3.9Gb, GPU: nVidia 220GT OS: Windows 7 64 bit / Ubuntu 12.04 64 bit
Notebook:
Processor: Intel® Core™ i7-4700MQ, Geheugen: 8Gb, GPU: nVidia GTX765m (met Optimus) OS: Windows 8 64 bit / Elementary OS Luna 64 bit

Offline tonio11

  • Lid
Re: Mail notificatie
« Reactie #2 Gepost op: 2011/08/19, 17:12:30 »
nee niet via thunderbird, een gewoon pop bij free (frankrijk)

Offline welrob

  • Lid
    • robvanderwel
Re: Mail notificatie
« Reactie #3 Gepost op: 2011/08/19, 20:27:04 »
Kijk hier eens naar gebruik hem zelf ook naar alle tevredenheid
http://www.webupd8.org/2011/02/thunderbird-indicator-adds-folders.html
Kubuntu  15.04 -- Plasma 5.3 <------> Loving IT

Een dag niet gelachen is een dag niet .........

Offline tonio11

  • Lid
Re: Mail notificatie
« Reactie #4 Gepost op: 2011/08/19, 20:47:52 »
Yes, dat zou het moeten zijn, maar een test geeft me geen groene enveloppe !
Zoek het verder nog wel uit, thanks alvast

Offline tonio11

  • Lid
Re: Mail notificatie
« Reactie #5 Gepost op: 2011/08/19, 20:50:57 »
Was nog vergeten te melden dat ik met een Ubuntu 11.04 werk.

Offline welrob

  • Lid
    • robvanderwel
Re: Mail notificatie
« Reactie #6 Gepost op: 2011/08/19, 21:47:44 »
Ik ook met 11.04 en geen groene enveloppe maar een blauwe hier;)
Kubuntu  15.04 -- Plasma 5.3 <------> Loving IT

Een dag niet gelachen is een dag niet .........

Offline tonio11

  • Lid
Re: Mail notificatie
« Reactie #7 Gepost op: 2011/08/21, 21:53:28 »
Noch groen, noch blauw ! Er schijnt blijkbaar iets mis te lopen, als ik de "fout melding" in de console van thunderbird mag geloven. Er staan namelijk twee boodschappen in: " onLoad libnotifypopups" en eronder: "pythonpath: /home/ik/.thunderbird/yysx82pc.default/extensions/libnotifypopups@patrik.dufresne/indicator.py"
Wat dit mag beteken weet ik ook niet.

Offline welrob

  • Lid
    • robvanderwel
Re: Mail notificatie
« Reactie #8 Gepost op: 2011/08/21, 22:26:54 »
Geen idee heb ik hier nooit gehad, het werkt vanaf het begin goed.
Maar ga terug naar dat linkje en schrijf je fout even daar in het lijntje als ik het goed heb schrijft de ontwikkelaar daar ook en anders weet Andrew misschien wel wat er aan de hand is.

Die heeft mij ook al meer dan eens de goede kant op geholpen.
Kubuntu  15.04 -- Plasma 5.3 <------> Loving IT

Een dag niet gelachen is een dag niet .........

Re: Mail notificatie
« Reactie #9 Gepost op: 2011/08/22, 08:04:13 »
/home/ik/.thunderbird/yysx82pc.default/extensions/libnotifypopups@patrik.dufresne/indicator.py"
Check anders even of dit bestand er wel staat, en misschien ook wat er in staat.
Desktop:
Processor: Intel® Core™2 Quad CPU Q8300 @ 2.50GHz × 4, Geheugen: 3.9Gb, GPU: nVidia 220GT OS: Windows 7 64 bit / Ubuntu 12.04 64 bit
Notebook:
Processor: Intel® Core™ i7-4700MQ, Geheugen: 8Gb, GPU: nVidia GTX765m (met Optimus) OS: Windows 8 64 bit / Elementary OS Luna 64 bit

Offline tonio11

  • Lid
Re: Mail notificatie
« Reactie #10 Gepost op: 2011/08/22, 16:30:04 »
[code]Ja dat staat er degelijk, en de inhoud is het volgende:
Maar daar snap ik niets van mensen !!
[code]
#!/usr/bin/env python
import gtk, glib, sys, fcntl, os
import gobject

import indicate
class MessagingServer:
  def __init__(self, subtype, desktop):
    self.indicators = {}
    self.actions = {}
    self.user_cb = None[/code]
    self.server_cb = None
    self.desktop = desktop

    self.srv = indicate.indicate_server_ref_default()
    type = "message.%s" % subtype
    self.srv.set_type(type)
    self.srv.set_desktop_file(desktop)
    self.srv.show()

  def show_indicator(self, name, count, draw_attention=True):
    # update existing indicator, or create new one
    try:
      ind = self.indicators[name]
    except KeyError:
      print "NEW"
      ind = indicate.Indicator()
      self.indicators[name] = ind

    ind.set_property('name', name)
    ind.set_property('count', str(count))
    ind.set_property('draw-attention', 'true' if draw_attention else 'false')
    ind.connect('user-display', self.cb_user_display)

    # hide and reshow actions to keep them at top of list
    for a in self.actions.values():
      a.hide()
    ind.show()
    for a in self.actions.values():
      a.show()

    return ind

  def hide_indicator(self, name):
    try:
      self.indicators[name].hide()
      del(self.indicators[name])
    except KeyError:
      print "ERROR: No indicator named '%s' to hide" % name

  def add_action(self, name, cb):
    ind = indicate.Indicator()
    self.actions[name] = ind
    ind.set_property('name', name)
    ind.set_property('subtype', 'menu')
    ind.connect('user-display', cb)
    ind.show()
    return ind

  def set_user_cb(self, cb):
    self.user_cb = cb

  def set_server_cb(self, cb):
    self.server_cb = cb

  def cb_server_display(self, srv, id):
    print "SERVER DISPLAY"
    if (self.server_cb):
      self.server_cb(self)

  def cb_user_display(self, ind, id):
    print "USER DISPLAY"
    if (self.user_cb):
      self.user_cb(ind.get_property('name'), ind.get_property('count'))
    ind.hide()

def set_nonblock(fd, nonblock):
  fl = fcntl.fcntl(fd, fcntl.F_GETFL)
  if nonblock:
    fl |= os.O_NONBLOCK
  else:
    fl &= ~os.O_NONBLOCK
  fcntl.fcntl(fd, fcntl.F_SETFL, fl)

def user_display(name, count):
  os.system("thunderbird -mail&")

def server_display(srv):
  os.system("thunderbird -mail&")

def io_cb(f, condition, srv):
  commands = {
      'show': [srv.show_indicator, 2],
      'hide': [srv.hide_indicator, 1],
      'exit': [exit, 0]
    }

  if condition == glib.IO_IN:
    data = f.read().strip()
    args = data.strip().split("::")
    cmd = args.pop(0)

    try:
      fn, numargs = commands[cmd]
    except KeyError:
      print "ERROR: command '%s' not known" % cmd
      return True

    if numargs != len(args):
      print "ERROR: '%s' command takes %d arguments but were %d given" % (cmd,
          numargs, len(args))
      return True

    print "CMD: %s" % cmd
    if fn:
      fn(*args)

  else:
    print "ERROR: I/O Error"
    exit()
  return True

if __name__ == "__main__":
  def action_compose(indicator, id):
    os.system("thunderbird -compose&")

  def action_addressbook(indicator, id):
    os.system("thunderbird -addressbook&")

  def timeout(srv):
    srv.add_action("Contacts", action_addressbook)
    srv.add_action("Compose New Message", action_compose)

  srv = MessagingServer('email', '/usr/share/applications/thunderbird.desktop')
  srv.set_user_cb(user_display)
  srv.set_server_cb(server_display)

  fifopath = sys.argv[1]
  if not os.path.exists(fifopath):
    os.mkfifo(fifopath)

  if len(sys.argv) > 2 and sys.argv[2] == 'mkfifoonly':
    exit()

  fdr = os.open(fifopath, os.O_RDONLY | os.O_NONBLOCK)
  fdw = os.open(fifopath, os.O_WRONLY | os.O_NONBLOCK)
  f = os.fdopen(fdr)
  glib.io_add_watch(f, glib.IO_IN | glib.IO_ERR, io_cb, srv)

  gobject.timeout_add_seconds(0, timeout, srv)
  gtk.main()
[/code]

Re: Mail notificatie
« Reactie #11 Gepost op: 2011/08/22, 16:45:39 »
Ziet er gewoon goed uit. Ik ken python maar zo goed ben ik er ook niet in, en ik ga niet alles doorlezen.
Aan het .py bestand zal het denk ik niet liggen. Wat het misschien wel kan zijn is dat 11.04 een nieuwere python heeft wat de fout veroorzaakt.
Desktop:
Processor: Intel® Core™2 Quad CPU Q8300 @ 2.50GHz × 4, Geheugen: 3.9Gb, GPU: nVidia 220GT OS: Windows 7 64 bit / Ubuntu 12.04 64 bit
Notebook:
Processor: Intel® Core™ i7-4700MQ, Geheugen: 8Gb, GPU: nVidia GTX765m (met Optimus) OS: Windows 8 64 bit / Elementary OS Luna 64 bit

Offline tonio11

  • Lid
Re: Mail notificatie
« Reactie #12 Gepost op: 2011/08/22, 17:43:35 »
Sorry voor het lichte geknoei van het vorige bericht  :(
Ja ik weet het ook niet, maar binnenkort komt er de nieuwe ubuntu versie (10.10), na deze update zal ik er me eens in verdiepen.
Maar als iemand ondertussen raad weet ...
Bedankt voor jullie hulp alvast

Re: Mail notificatie
« Reactie #13 Gepost op: 2011/08/22, 17:46:30 »
Het is 2011 hoor :P (11.10)
Desktop:
Processor: Intel® Core™2 Quad CPU Q8300 @ 2.50GHz × 4, Geheugen: 3.9Gb, GPU: nVidia 220GT OS: Windows 7 64 bit / Ubuntu 12.04 64 bit
Notebook:
Processor: Intel® Core™ i7-4700MQ, Geheugen: 8Gb, GPU: nVidia GTX765m (met Optimus) OS: Windows 8 64 bit / Elementary OS Luna 64 bit

Offline tonio11

  • Lid
Re: Mail notificatie
« Reactie #14 Gepost op: 2011/08/22, 22:08:02 »
Oeps ja natuurlijk ik heb nu al 11.04 op mijn pc staan  :-[
bedankt voor de rechtzetting C A