Page 7 of 8 FirstFirst ... 5678 LastLast
Results 61 to 70 of 80

Thread: FBuntu: Facebook Notifier for Messaging Menu

  1. #61
    Join Date
    Apr 2007
    Location
    UK
    Beans
    233
    Distro
    Ubuntu

    Re: FBuntu: Facebook Notifier for Messaging Menu

    Quote Originally Posted by jimmygoska View Post
    I've tried running 'bzr update' a couple more times and it still says version 35.
    I haven't replied before now because I don't know what might be causing this!

    The only thing I can think of would be to try deleting your FBuntu install, and starting from scratch. (So run "bzr branch lp:fbuntu" and you should get the text "Branched 38 revisions."
    Linux User #381008
    Ubuntu User #22532

  2. #62
    Join Date
    Apr 2007
    Location
    UK
    Beans
    233
    Distro
    Ubuntu

    Re: FBuntu: Facebook Notifier for Messaging Menu

    Quote Originally Posted by funkwave View Post
    Hello! (Please, excuse my English ) It works perfectly!

    ¿Do you have any idea of how to set a sound for those notifications?

    Thanks in advance!
    You can play a sound from the terminal using "aplay /usr/share/sounds/alsa/Front_Center.wav" (obviously replace the file by the wav/mp3/ogg/etc that you'd like to play).

    The way to integrate this into FBuntu would depend a little on whether you want the sound for Inbox Messages or for Notifications. I'll give you the notifications method, but I'm sure you could work out the same idea for inbox messages.

    Open the graphNotificationChecker.py file, and at around line 64 change to:
    Code:
                if notificationAlreadyKnown == False:
                    self.logger.debug("Notification %s not previously known about" % (response['id']))
                    self.notificationArray.append(notification(self, response))
                    os.system('aplay /usr/share/sounds/alsa/Front_Center.wav')
    (the bottom line is the important new one)

    And at the top of the file, you'll need to change to:
    Code:
    import logging, urllib, urllib2, json, time, os
    Last edited by fluteflute; May 16th, 2012 at 05:27 PM.
    Linux User #381008
    Ubuntu User #22532

  3. #63
    Join Date
    Nov 2010
    Beans
    3

    Re: FBuntu: Facebook Notifier for Messaging Menu

    Quote Originally Posted by fluteflute View Post
    You can play a sound from the terminal using "aplay /usr/share/sounds/alsa/Front_Center.wav" (obviously replace the file by the wav/mp3/ogg/etc that you'd like to play).

    The way to integrate this into FBuntu would depend a little on whether you want the sound for Inbox Messages or for Notifications. I'll give you the notifications method, but I'm sure you could work out the same idea for inbox messages.

    Open the notificationChecker.py file, and at around line 91 change to
    Code:
                if threadAlreadyKnown == False:
                    self.logger.debug("Thread %s not previously known about" % (response['thread_id']))
                    self.messageArray.append(inboxMessage(self,response))
                    os.system('aplay /usr/share/sounds/alsa/Front_Center.wav')
    And at the top of the file, you'll need to change to:
    Code:
    import logging, urllib, urllib2, json, time, os

    Thanks! What a great technical service! I'll try it!

  4. #64
    Join Date
    Apr 2007
    Location
    UK
    Beans
    233
    Distro
    Ubuntu

    Re: FBuntu: Facebook Notifier for Messaging Menu

    Quote Originally Posted by funkwave View Post
    Thanks! What a great technical service! I'll try it!
    My pleasure! Sorry it took so long. I've edited my post slightly, so make sure you're looking at that version when you try it
    Linux User #381008
    Ubuntu User #22532

  5. #65
    Join Date
    Nov 2010
    Beans
    3

    Re: FBuntu: Facebook Notifier for Messaging Menu

    Quote Originally Posted by fluteflute View Post
    My pleasure! Sorry it took so long. I've edited my post slightly, so make sure you're looking at that version when you try it
    Ook! No problem
    Thanks again!

  6. #66
    Join Date
    Apr 2012
    Beans
    1

    Re: FBuntu: Facebook Notifier for Messaging Menu

    Quote Originally Posted by fluteflute View Post
    I haven't replied before now because I don't know what might be causing this!

    The only thing I can think of would be to try deleting your FBuntu install, and starting from scratch. (So run "bzr branch lp:fbuntu" and you should get the text "Branched 38 revisions."
    Cheers, it is indeed at revision 38 and working properly! Many thanks!

  7. #67
    Join Date
    Nov 2010
    Beans
    3

    Re: FBuntu: Facebook Notifier for Messaging Menu

    Quote Originally Posted by fluteflute View Post
    My pleasure! Sorry it took so long. I've edited my post slightly, so make sure you're looking at that version when you try it
    It works for notifications (graphNotificationChecker.py) and messages (legacyInboxChecker.py)

    Thanks,
    Antonio

  8. #68
    Join Date
    Nov 2011
    Beans
    88

    Re: FBuntu: Facebook Notifier for Messaging Menu

    Hey man, I was wondering if there is a way to limit how long the notification is? For instance There are some groups on facebook that have really long names and it makes the notifications bar really big and pushes it to one side of the screen. I'd be interested in trying to fix this myself but I don't know really where to start?

    I was thinking would it be as easy as finding the notification variable, check to see the length of the string and if it is above a certain limit cut it down to a certain length followed by "..." for instance?

  9. #69
    Join Date
    Apr 2007
    Location
    UK
    Beans
    233
    Distro
    Ubuntu

    Re: FBuntu: Facebook Notifier for Messaging Menu

    Quote Originally Posted by shizz View Post
    Hey man, I was wondering if there is a way to limit how long the notification is? For instance There are some groups on facebook that have really long names and it makes the notifications bar really big and pushes it to one side of the screen. I'd be interested in trying to fix this myself but I don't know really where to start?

    I was thinking would it be as easy as finding the notification variable, check to see the length of the string and if it is above a certain limit cut it down to a certain length followed by "..." for instance?
    Because we're talking about notifications, you want the graphNotificationChecker.py file.

    Line 100 says mmText = self.response['title']. This is the line that sets the text to be displayed in the messaging menu. Change that to mmText = self.response['title'][0:40] (change the 40 to anything you like).

    Oh and if you want three dots afterwards, you'll need append that. So change the line to mmText = self.response['title'][0:40] + "...". Although that will add three dots whether or not the text has actually been chopped. I'll leave the full solution as a challenge for you to figure out (But do ask if you can't work it out.)
    Last edited by fluteflute; May 20th, 2012 at 07:30 PM.
    Linux User #381008
    Ubuntu User #22532

  10. #70
    Join Date
    Nov 2011
    Beans
    88

    Re: FBuntu: Facebook Notifier for Messaging Menu

    Quote Originally Posted by fluteflute View Post
    Because we're talking about notifications, you want the graphNotificationChecker.py file.

    Line 100 says mmText = self.response['title']. This is the line that sets the text to be displayed in the messaging menu. Change that to mmText = self.response['title'][0:40] (change the 40 to anything you like).

    Oh and if you want three dots afterwards, you'll need append that. So change the line to mmText = self.response['title'][0:40] + "...". Although that will add three dots whether or not the text has actually been chopped. I'll leave the full solution as a challenge for you to figure out (But do ask if you can't work it out.)
    Thanks man that was a lot more than I was expecting haha is mmText the name of the variable? Also is it stored as a matrix of sorts and you are limiting the columns to 40? Just trying to get my head around it. Haven't really done python. So could I do an if loop to check if mmText has > 40 columns then mmText = self.response['title'][0:40] + "..." else the normal way?

Page 7 of 8 FirstFirst ... 5678 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •