Re: [Sugar-devel] Widget to show a notification message with a link
Hi Jerry, My mistake, i missed write down the line added on /usr/share/sugar/data/mime.default file. I added exactly this line: x-scheme-handler/http org.laptop.WebActivity However after that, links were still opened with Firefox, I agree with you, tat should be work, but i don't know why. Any way, I found a workaround, adding the settings of ~/.local/share/applications/mimeapps.list on sugar-session. For the right setting when sugar is starting. And also added a script on /etc/lightdm/lightdm.conf to setting the right ones for Gnome, when it is starting. Thanks. Gustavo. On Wed, Dec 10, 2014 at 8:10 PM, Jerry Vonau m...@jvonau.ca wrote: On December 9, 2014 at 6:59 AM Gustavo Duarte gus.dua...@gmail.com wrote: I checked this file, and there are these entries, already, as is showed bellow. text/html org.laptop.WebActivity application/xhtml+xml org.laptop.WebActivity application/xmlorg.laptop.WebActivity However, it doesn't work, Firefox is opened when I click on a link of notification message. Note that x-scheme-handler/http is not present, did you try adding: x-scheme-handler/http org.laptop.WebActivity to mime-defaults? The result *should be* the same as changing the default with xdg-mime but just for the sugar processes, that is your goal correct? May be this behaviour could be, due 1) Sugar is running in Ubuntu. 2) Only happens on links inside notification messages, no other way to test open a link comes on my mind, at this moment. I'll try on Sugar running on XO/Fedora From Sebastian reply, xdg-open http://sugarlabs.org/ Prior to adding the above line the webpage would not load at all(closes terminal). This appears to work with the altered mime-defaults as above on XO's here but it doesn't look like the browse activity, more like epiphany. Jerry ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Widget to show a notification message with a link
Just other info: I tried, add line x-scheme-handler/http org.laptop.WebActivity on /usr/share/sugar/data/mime.default on a XO 1.75 with Sugar 0.98 and the same results. URL Links are opened with Firefox. Seems x-scheme-handler mime types aren't well managed by Sugar. Regards. On Thu, Dec 11, 2014 at 10:56 AM, Gustavo Duarte gus.dua...@gmail.com wrote: Hi Jerry, My mistake, i missed write down the line added on /usr/share/sugar/data/mime.default file. I added exactly this line: x-scheme-handler/http org.laptop.WebActivity However after that, links were still opened with Firefox, I agree with you, tat should be work, but i don't know why. Any way, I found a workaround, adding the settings of ~/.local/share/applications/mimeapps.list on sugar-session. For the right setting when sugar is starting. And also added a script on /etc/lightdm/lightdm.conf to setting the right ones for Gnome, when it is starting. Thanks. Gustavo. On Wed, Dec 10, 2014 at 8:10 PM, Jerry Vonau m...@jvonau.ca wrote: On December 9, 2014 at 6:59 AM Gustavo Duarte gus.dua...@gmail.com wrote: I checked this file, and there are these entries, already, as is showed bellow. text/html org.laptop.WebActivity application/xhtml+xml org.laptop.WebActivity application/xmlorg.laptop.WebActivity However, it doesn't work, Firefox is opened when I click on a link of notification message. Note that x-scheme-handler/http is not present, did you try adding: x-scheme-handler/http org.laptop.WebActivity to mime-defaults? The result *should be* the same as changing the default with xdg-mime but just for the sugar processes, that is your goal correct? May be this behaviour could be, due 1) Sugar is running in Ubuntu. 2) Only happens on links inside notification messages, no other way to test open a link comes on my mind, at this moment. I'll try on Sugar running on XO/Fedora From Sebastian reply, xdg-open http://sugarlabs.org/ Prior to adding the above line the webpage would not load at all(closes terminal). This appears to work with the altered mime-defaults as above on XO's here but it doesn't look like the browse activity, more like epiphany. Jerry ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Widget to show a notification message with a link
Otra alternativa es que manejes el evento activate-link https://developer.gnome.org/gtk3/stable/GtkLinkButton.html Gonzalo On Thu, Dec 11, 2014 at 10:07 AM, Gustavo Duarte gus.dua...@gmail.com wrote: Just other info: I tried, add line x-scheme-handler/http org.laptop.WebActivity on /usr/share/sugar/data/mime.default on a XO 1.75 with Sugar 0.98 and the same results. URL Links are opened with Firefox. Seems x-scheme-handler mime types aren't well managed by Sugar. Regards. On Thu, Dec 11, 2014 at 10:56 AM, Gustavo Duarte gus.dua...@gmail.com wrote: Hi Jerry, My mistake, i missed write down the line added on /usr/share/sugar/data/mime.default file. I added exactly this line: x-scheme-handler/http org.laptop.WebActivity However after that, links were still opened with Firefox, I agree with you, tat should be work, but i don't know why. Any way, I found a workaround, adding the settings of ~/.local/share/applications/mimeapps.list on sugar-session. For the right setting when sugar is starting. And also added a script on /etc/lightdm/lightdm.conf to setting the right ones for Gnome, when it is starting. Thanks. Gustavo. On Wed, Dec 10, 2014 at 8:10 PM, Jerry Vonau m...@jvonau.ca wrote: On December 9, 2014 at 6:59 AM Gustavo Duarte gus.dua...@gmail.com wrote: I checked this file, and there are these entries, already, as is showed bellow. text/html org.laptop.WebActivity application/xhtml+xml org.laptop.WebActivity application/xmlorg.laptop.WebActivity However, it doesn't work, Firefox is opened when I click on a link of notification message. Note that x-scheme-handler/http is not present, did you try adding: x-scheme-handler/http org.laptop.WebActivity to mime-defaults? The result *should be* the same as changing the default with xdg-mime but just for the sugar processes, that is your goal correct? May be this behaviour could be, due 1) Sugar is running in Ubuntu. 2) Only happens on links inside notification messages, no other way to test open a link comes on my mind, at this moment. I'll try on Sugar running on XO/Fedora From Sebastian reply, xdg-open http://sugarlabs.org/ Prior to adding the above line the webpage would not load at all(closes terminal). This appears to work with the altered mime-defaults as above on XO's here but it doesn't look like the browse activity, more like epiphany. Jerry ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Gonzalo Odiard SugarLabs - Software for children learning ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Widget to show a notification message with a link
On December 9, 2014 at 6:59 AM Gustavo Duarte gus.dua...@gmail.com wrote: I checked this file, and there are these entries, already, as is showed bellow. text/html org.laptop.WebActivity application/xhtml+xml org.laptop.WebActivity application/xml org.laptop.WebActivity However, it doesn't work, Firefox is opened when I click on a link of notification message. Note that x-scheme-handler/http is not present, did you try adding: x-scheme-handler/http org.laptop.WebActivity to mime-defaults? The result *should be* the same as changing the default with xdg-mime but just for the sugar processes, that is your goal correct? May be this behaviour could be, due 1) Sugar is running in Ubuntu. 2) Only happens on links inside notification messages, no other way to test open a link comes on my mind, at this moment. I'll try on Sugar running on XO/Fedora From Sebastian reply, xdg-open http://sugarlabs.org/ Prior to adding the above line the webpage would not load at all(closes terminal). This appears to work with the altered mime-defaults as above on XO's here but it doesn't look like the browse activity, more like epiphany. Jerry ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Widget to show a notification message with a link
I checked this file, and there are these entries, already, as is showed bellow. text/html org.laptop.WebActivity application/xhtml+xml org.laptop.WebActivity application/xmlorg.laptop.WebActivity However, it doesn't work, Firefox is opened when I click on a link of notification message. May be this behaviour could be, due 1) Sugar is running in Ubuntu. 2) Only happens on links inside notification messages, no other way to test open a link comes on my mind, at this moment. I'll try on Sugar running on XO/Fedora thanks On Mon, Dec 8, 2014 at 1:58 PM, Gonzalo Odiard godi...@sugarlabs.org wrote: We have that file in sugar module in the data directory. Gonzalo On Mon, Dec 8, 2014 at 12:48 PM, Gustavo Duarte gus.dua...@gmail.com wrote: Ahh no, I didn't know this file, sound a good option, i'll try and let you know the results. Thanks Gustavo. On Mon, Dec 8, 2014 at 11:17 AM, Walter Bender walter.ben...@gmail.com wrote: Did you try in /usr/share/sugar/data/mime-defaults by any chance? On Mon, Dec 8, 2014 at 7:27 AM, Gustavo Duarte gus.dua...@gmail.com wrote: Unfortunately, this settings on activity.info doesn't work. Now i'm wonder, where should be the best place to configure these mime entries, in which point of Sugar session starting procedure ? Inside sugar-session script, it would be a right place ? Because this mime types settings is valid only on Sugar desktop, when the PC switch to Gnome, the mime types should be changed to Firefox. Thanks in advance. Gustavo. On Sun, Dec 7, 2014 at 12:01 PM, Gustavo Duarte gus.dua...@gmail.com wrote: Good point, i'll try it and let you know. El 07/12/2014 02:38, Jerry Vonau m...@jvonau.ca escribió: Just a thought, wonder if adding x-scheme-handler/http to mime_types= in browse's activity.info file would allow sugar to override what the system is providing? Another place for that definition might be in /usr/share/sugar/data/mime.defaults. Jerry On December 6, 2014 at 8:57 PM Gustavo Duarte gus.dua...@gmail.com wrote: Finally I found the setting needed to open links with Browser Activity by default. xdg-mime default sugar-browser.desktop x-scheme-handler/http and xdg-mime default sugar-browser.desktop x-scheme-handler/https Adding this settings, links on notifications messages should be opened by BrowserActivity. Offcourse a bash script to launch BrowserActivit is needed. Something like: #!/bin/sh while [ -n $2 ] ; do case $1 in -u | --uri) uri=$2 ;; *) echo unknown argument $1 $2 ;; esac shift;shift done sugar-launch org.laptop.WebActivity --uri $uri Thanks a lot for all your tips, were very helpfully. Gustavo. On Sat, Dec 6, 2014 at 3:59 PM, Jerry Vonau m...@jvonau.ca wrote: Hi Gustavo, On December 6, 2014 at 10:42 AM Gustavo Duarte gus.dua...@gmail.com wrote: Add an actions, isn't an option, because the notification-daemon (Ubuntu 12.04 precise) does't support actions. From freedesktop specs https://developer.gnome.org/notification-spec/ Actions The actions send a request message back to the notification client when invoked. This functionality may not be implemented by the notification server, conforming clients should check if it is available before using it (see the GetCapabilities message in Protocol). An implementation is free to ignore any requested by the client. As an example one possible rendering of actions would be as buttons in the notification popup. Actions are sent over as a list of pairs. Each even element in the list (starting at index 0) represents the identifier for the action. Each odd element in the list is the localized string that will be displayed to the user. However hyperlinks is supported, if I add a href=http://sugarlabs.org; SugarLabs , works. Not exactly as I want :( When I do a click on the link, Firefox is opened. I tried change the system default browser setting with: gconftool-2 -s /desktop/gnome/applications/browser/exec --type string '/usr/local/bin/sugar-browser %s' Notice: sugar-browser is a bash script to launch BrowserActivity. But after that, Firefox still opened each doing click on link of notification message. So the problem now is, how change the default browser on Sugar. Hum, sounds like the system's default mime definitions might be pointed to Firefox in /usr/share/applications/defaults.list. What does xdg-mime query default text/html return? The XO here returns 'firefox.desktop' even without having the Firefox rpm installed. Not sure
Re: [Sugar-devel] Widget to show a notification message with a link
2) Only happens on links inside notification messages, no other way to test open a link comes on my mind, at this moment. I'll try on Sugar running on XO/Fedora Perhaps the following command is a way to test the default URL handler. xdg-open http://sugarlabs.org/ Maybe it will shed some light into how to achieve what you want. Glad to see work on Sugar outside Fedora. Regards, -- Sebastian Silva icarito #sugar #somosazucar (freenode IRC) Somos Azúcar - Fuente Libre - Sugar Labs Las maestras y los maestros democráticos intervenimos en el mundo a través del cultivo de la curiosidad - P.Freire ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Widget to show a notification message with a link
Unfortunately, this settings on activity.info doesn't work. Now i'm wonder, where should be the best place to configure these mime entries, in which point of Sugar session starting procedure ? Inside sugar-session script, it would be a right place ? Because this mime types settings is valid only on Sugar desktop, when the PC switch to Gnome, the mime types should be changed to Firefox. Thanks in advance. Gustavo. On Sun, Dec 7, 2014 at 12:01 PM, Gustavo Duarte gus.dua...@gmail.com wrote: Good point, i'll try it and let you know. El 07/12/2014 02:38, Jerry Vonau m...@jvonau.ca escribió: Just a thought, wonder if adding x-scheme-handler/http to mime_types= in browse's activity.info file would allow sugar to override what the system is providing? Another place for that definition might be in /usr/share/sugar/data/mime.defaults. Jerry On December 6, 2014 at 8:57 PM Gustavo Duarte gus.dua...@gmail.com wrote: Finally I found the setting needed to open links with Browser Activity by default. xdg-mime default sugar-browser.desktop x-scheme-handler/http and xdg-mime default sugar-browser.desktop x-scheme-handler/https Adding this settings, links on notifications messages should be opened by BrowserActivity. Offcourse a bash script to launch BrowserActivit is needed. Something like: #!/bin/sh while [ -n $2 ] ; do case $1 in -u | --uri) uri=$2 ;; *) echo unknown argument $1 $2 ;; esac shift;shift done sugar-launch org.laptop.WebActivity --uri $uri Thanks a lot for all your tips, were very helpfully. Gustavo. On Sat, Dec 6, 2014 at 3:59 PM, Jerry Vonau m...@jvonau.ca wrote: Hi Gustavo, On December 6, 2014 at 10:42 AM Gustavo Duarte gus.dua...@gmail.com wrote: Add an actions, isn't an option, because the notification-daemon (Ubuntu 12.04 precise) does't support actions. From freedesktop specs https://developer.gnome.org/notification-spec/ Actions The actions send a request message back to the notification client when invoked. This functionality may not be implemented by the notification server, conforming clients should check if it is available before using it (see the GetCapabilities message in Protocol). An implementation is free to ignore any requested by the client. As an example one possible rendering of actions would be as buttons in the notification popup. Actions are sent over as a list of pairs. Each even element in the list (starting at index 0) represents the identifier for the action. Each odd element in the list is the localized string that will be displayed to the user. However hyperlinks is supported, if I add a href=http://sugarlabs.org; SugarLabs , works. Not exactly as I want :( When I do a click on the link, Firefox is opened. I tried change the system default browser setting with: gconftool-2 -s /desktop/gnome/applications/browser/exec --type string '/usr/local/bin/sugar-browser %s' Notice: sugar-browser is a bash script to launch BrowserActivity. But after that, Firefox still opened each doing click on link of notification message. So the problem now is, how change the default browser on Sugar. Hum, sounds like the system's default mime definitions might be pointed to Firefox in /usr/share/applications/defaults.list. What does xdg-mime query default text/html return? The XO here returns 'firefox.desktop' even without having the Firefox rpm installed. Not sure what the correct way of overriding this list would be, create ~/.local/share/applications/mimeapps.list, or maybe using xdg-mime default ...? Both of those ideas would need a .desktop file for browse thou. Hope it helps, Jerry Any idea ? Thanks in advance. Gustavo. On Fri, Dec 5, 2014 at 9:27 PM, Gustavo Duarte gus.dua...@gmail.com wrote: Greats !! Thanks for these tips. El 05/12/2014 17:59, Gonzalo Odiard godi...@sugarlabs.org escribió: +1 On Fri, Dec 5, 2014 at 4:57 PM, Sam P. sam.parkins...@gmail.com wrote: Hi, If my memory is right, the freedesktop notification spec includes actions. You can have multiple of these and they are displayed like buttons [1]. When they are clicked you get a callback event. I would prefer to implement the standard ranter than something proprietary. That is just my opinions. Thanks, Sam [1]: imgur.com/e8r9OZr -- Gonzalo Odiard SugarLabs - Software for children learning ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel ___ Sugar-devel mailing list
Re: [Sugar-devel] Widget to show a notification message with a link
Did you try in /usr/share/sugar/data/mime-defaults by any chance? On Mon, Dec 8, 2014 at 7:27 AM, Gustavo Duarte gus.dua...@gmail.com wrote: Unfortunately, this settings on activity.info doesn't work. Now i'm wonder, where should be the best place to configure these mime entries, in which point of Sugar session starting procedure ? Inside sugar-session script, it would be a right place ? Because this mime types settings is valid only on Sugar desktop, when the PC switch to Gnome, the mime types should be changed to Firefox. Thanks in advance. Gustavo. On Sun, Dec 7, 2014 at 12:01 PM, Gustavo Duarte gus.dua...@gmail.com wrote: Good point, i'll try it and let you know. El 07/12/2014 02:38, Jerry Vonau m...@jvonau.ca escribió: Just a thought, wonder if adding x-scheme-handler/http to mime_types= in browse's activity.info file would allow sugar to override what the system is providing? Another place for that definition might be in /usr/share/sugar/data/mime.defaults. Jerry On December 6, 2014 at 8:57 PM Gustavo Duarte gus.dua...@gmail.com wrote: Finally I found the setting needed to open links with Browser Activity by default. xdg-mime default sugar-browser.desktop x-scheme-handler/http and xdg-mime default sugar-browser.desktop x-scheme-handler/https Adding this settings, links on notifications messages should be opened by BrowserActivity. Offcourse a bash script to launch BrowserActivit is needed. Something like: #!/bin/sh while [ -n $2 ] ; do case $1 in -u | --uri) uri=$2 ;; *) echo unknown argument $1 $2 ;; esac shift;shift done sugar-launch org.laptop.WebActivity --uri $uri Thanks a lot for all your tips, were very helpfully. Gustavo. On Sat, Dec 6, 2014 at 3:59 PM, Jerry Vonau m...@jvonau.ca wrote: Hi Gustavo, On December 6, 2014 at 10:42 AM Gustavo Duarte gus.dua...@gmail.com wrote: Add an actions, isn't an option, because the notification-daemon (Ubuntu 12.04 precise) does't support actions. From freedesktop specs https://developer.gnome.org/notification-spec/ Actions The actions send a request message back to the notification client when invoked. This functionality may not be implemented by the notification server, conforming clients should check if it is available before using it (see the GetCapabilities message in Protocol). An implementation is free to ignore any requested by the client. As an example one possible rendering of actions would be as buttons in the notification popup. Actions are sent over as a list of pairs. Each even element in the list (starting at index 0) represents the identifier for the action. Each odd element in the list is the localized string that will be displayed to the user. However hyperlinks is supported, if I add a href=http://sugarlabs.org; SugarLabs , works. Not exactly as I want :( When I do a click on the link, Firefox is opened. I tried change the system default browser setting with: gconftool-2 -s /desktop/gnome/applications/browser/exec --type string '/usr/local/bin/sugar-browser %s' Notice: sugar-browser is a bash script to launch BrowserActivity. But after that, Firefox still opened each doing click on link of notification message. So the problem now is, how change the default browser on Sugar. Hum, sounds like the system's default mime definitions might be pointed to Firefox in /usr/share/applications/defaults.list. What does xdg-mime query default text/html return? The XO here returns 'firefox.desktop' even without having the Firefox rpm installed. Not sure what the correct way of overriding this list would be, create ~/.local/share/applications/mimeapps.list, or maybe using xdg-mime default ...? Both of those ideas would need a .desktop file for browse thou. Hope it helps, Jerry Any idea ? Thanks in advance. Gustavo. On Fri, Dec 5, 2014 at 9:27 PM, Gustavo Duarte gus.dua...@gmail.com wrote: Greats !! Thanks for these tips. El 05/12/2014 17:59, Gonzalo Odiard godi...@sugarlabs.org escribió: +1 On Fri, Dec 5, 2014 at 4:57 PM, Sam P. sam.parkins...@gmail.com wrote: Hi, If my memory is right, the freedesktop notification spec includes actions. You can have multiple of these and they are displayed like buttons [1]. When they are clicked you get a callback event. I would prefer to implement the standard ranter than something proprietary. That is just my opinions. Thanks, Sam [1]: imgur.com/e8r9OZr -- Gonzalo Odiard SugarLabs - Software for children learning ___ Sugar-devel mailing list
Re: [Sugar-devel] Widget to show a notification message with a link
Ahh no, I didn't know this file, sound a good option, i'll try and let you know the results. Thanks Gustavo. On Mon, Dec 8, 2014 at 11:17 AM, Walter Bender walter.ben...@gmail.com wrote: Did you try in /usr/share/sugar/data/mime-defaults by any chance? On Mon, Dec 8, 2014 at 7:27 AM, Gustavo Duarte gus.dua...@gmail.com wrote: Unfortunately, this settings on activity.info doesn't work. Now i'm wonder, where should be the best place to configure these mime entries, in which point of Sugar session starting procedure ? Inside sugar-session script, it would be a right place ? Because this mime types settings is valid only on Sugar desktop, when the PC switch to Gnome, the mime types should be changed to Firefox. Thanks in advance. Gustavo. On Sun, Dec 7, 2014 at 12:01 PM, Gustavo Duarte gus.dua...@gmail.com wrote: Good point, i'll try it and let you know. El 07/12/2014 02:38, Jerry Vonau m...@jvonau.ca escribió: Just a thought, wonder if adding x-scheme-handler/http to mime_types= in browse's activity.info file would allow sugar to override what the system is providing? Another place for that definition might be in /usr/share/sugar/data/mime.defaults. Jerry On December 6, 2014 at 8:57 PM Gustavo Duarte gus.dua...@gmail.com wrote: Finally I found the setting needed to open links with Browser Activity by default. xdg-mime default sugar-browser.desktop x-scheme-handler/http and xdg-mime default sugar-browser.desktop x-scheme-handler/https Adding this settings, links on notifications messages should be opened by BrowserActivity. Offcourse a bash script to launch BrowserActivit is needed. Something like: #!/bin/sh while [ -n $2 ] ; do case $1 in -u | --uri) uri=$2 ;; *) echo unknown argument $1 $2 ;; esac shift;shift done sugar-launch org.laptop.WebActivity --uri $uri Thanks a lot for all your tips, were very helpfully. Gustavo. On Sat, Dec 6, 2014 at 3:59 PM, Jerry Vonau m...@jvonau.ca wrote: Hi Gustavo, On December 6, 2014 at 10:42 AM Gustavo Duarte gus.dua...@gmail.com wrote: Add an actions, isn't an option, because the notification-daemon (Ubuntu 12.04 precise) does't support actions. From freedesktop specs https://developer.gnome.org/notification-spec/ Actions The actions send a request message back to the notification client when invoked. This functionality may not be implemented by the notification server, conforming clients should check if it is available before using it (see the GetCapabilities message in Protocol). An implementation is free to ignore any requested by the client. As an example one possible rendering of actions would be as buttons in the notification popup. Actions are sent over as a list of pairs. Each even element in the list (starting at index 0) represents the identifier for the action. Each odd element in the list is the localized string that will be displayed to the user. However hyperlinks is supported, if I add a href=http://sugarlabs.org; SugarLabs , works. Not exactly as I want :( When I do a click on the link, Firefox is opened. I tried change the system default browser setting with: gconftool-2 -s /desktop/gnome/applications/browser/exec --type string '/usr/local/bin/sugar-browser %s' Notice: sugar-browser is a bash script to launch BrowserActivity. But after that, Firefox still opened each doing click on link of notification message. So the problem now is, how change the default browser on Sugar. Hum, sounds like the system's default mime definitions might be pointed to Firefox in /usr/share/applications/defaults.list. What does xdg-mime query default text/html return? The XO here returns 'firefox.desktop' even without having the Firefox rpm installed. Not sure what the correct way of overriding this list would be, create ~/.local/share/applications/mimeapps.list, or maybe using xdg-mime default ...? Both of those ideas would need a .desktop file for browse thou. Hope it helps, Jerry Any idea ? Thanks in advance. Gustavo. On Fri, Dec 5, 2014 at 9:27 PM, Gustavo Duarte gus.dua...@gmail.com wrote: Greats !! Thanks for these tips. El 05/12/2014 17:59, Gonzalo Odiard godi...@sugarlabs.org escribió: +1 On Fri, Dec 5, 2014 at 4:57 PM, Sam P. sam.parkins...@gmail.com wrote: Hi, If my memory is right, the freedesktop notification spec includes actions. You can have multiple of these and they are displayed like buttons [1]. When they are clicked you get a callback event. I would prefer to implement the standard ranter than something proprietary. That is just my opinions. Thanks, Sam [1]: imgur.com/e8r9OZr
Re: [Sugar-devel] Widget to show a notification message with a link
We have that file in sugar module in the data directory. Gonzalo On Mon, Dec 8, 2014 at 12:48 PM, Gustavo Duarte gus.dua...@gmail.com wrote: Ahh no, I didn't know this file, sound a good option, i'll try and let you know the results. Thanks Gustavo. On Mon, Dec 8, 2014 at 11:17 AM, Walter Bender walter.ben...@gmail.com wrote: Did you try in /usr/share/sugar/data/mime-defaults by any chance? On Mon, Dec 8, 2014 at 7:27 AM, Gustavo Duarte gus.dua...@gmail.com wrote: Unfortunately, this settings on activity.info doesn't work. Now i'm wonder, where should be the best place to configure these mime entries, in which point of Sugar session starting procedure ? Inside sugar-session script, it would be a right place ? Because this mime types settings is valid only on Sugar desktop, when the PC switch to Gnome, the mime types should be changed to Firefox. Thanks in advance. Gustavo. On Sun, Dec 7, 2014 at 12:01 PM, Gustavo Duarte gus.dua...@gmail.com wrote: Good point, i'll try it and let you know. El 07/12/2014 02:38, Jerry Vonau m...@jvonau.ca escribió: Just a thought, wonder if adding x-scheme-handler/http to mime_types= in browse's activity.info file would allow sugar to override what the system is providing? Another place for that definition might be in /usr/share/sugar/data/mime.defaults. Jerry On December 6, 2014 at 8:57 PM Gustavo Duarte gus.dua...@gmail.com wrote: Finally I found the setting needed to open links with Browser Activity by default. xdg-mime default sugar-browser.desktop x-scheme-handler/http and xdg-mime default sugar-browser.desktop x-scheme-handler/https Adding this settings, links on notifications messages should be opened by BrowserActivity. Offcourse a bash script to launch BrowserActivit is needed. Something like: #!/bin/sh while [ -n $2 ] ; do case $1 in -u | --uri) uri=$2 ;; *) echo unknown argument $1 $2 ;; esac shift;shift done sugar-launch org.laptop.WebActivity --uri $uri Thanks a lot for all your tips, were very helpfully. Gustavo. On Sat, Dec 6, 2014 at 3:59 PM, Jerry Vonau m...@jvonau.ca wrote: Hi Gustavo, On December 6, 2014 at 10:42 AM Gustavo Duarte gus.dua...@gmail.com wrote: Add an actions, isn't an option, because the notification-daemon (Ubuntu 12.04 precise) does't support actions. From freedesktop specs https://developer.gnome.org/notification-spec/ Actions The actions send a request message back to the notification client when invoked. This functionality may not be implemented by the notification server, conforming clients should check if it is available before using it (see the GetCapabilities message in Protocol). An implementation is free to ignore any requested by the client. As an example one possible rendering of actions would be as buttons in the notification popup. Actions are sent over as a list of pairs. Each even element in the list (starting at index 0) represents the identifier for the action. Each odd element in the list is the localized string that will be displayed to the user. However hyperlinks is supported, if I add a href=http://sugarlabs.org; SugarLabs , works. Not exactly as I want :( When I do a click on the link, Firefox is opened. I tried change the system default browser setting with: gconftool-2 -s /desktop/gnome/applications/browser/exec --type string '/usr/local/bin/sugar-browser %s' Notice: sugar-browser is a bash script to launch BrowserActivity. But after that, Firefox still opened each doing click on link of notification message. So the problem now is, how change the default browser on Sugar. Hum, sounds like the system's default mime definitions might be pointed to Firefox in /usr/share/applications/defaults.list. What does xdg-mime query default text/html return? The XO here returns 'firefox.desktop' even without having the Firefox rpm installed. Not sure what the correct way of overriding this list would be, create ~/.local/share/applications/mimeapps.list, or maybe using xdg-mime default ...? Both of those ideas would need a .desktop file for browse thou. Hope it helps, Jerry Any idea ? Thanks in advance. Gustavo. On Fri, Dec 5, 2014 at 9:27 PM, Gustavo Duarte gus.dua...@gmail.com wrote: Greats !! Thanks for these tips. El 05/12/2014 17:59, Gonzalo Odiard godi...@sugarlabs.org escribió: +1 On Fri, Dec 5, 2014 at 4:57 PM, Sam P. sam.parkins...@gmail.com wrote: Hi, If my memory is right, the freedesktop notification spec
Re: [Sugar-devel] Widget to show a notification message with a link
Good point, i'll try it and let you know. El 07/12/2014 02:38, Jerry Vonau m...@jvonau.ca escribió: Just a thought, wonder if adding x-scheme-handler/http to mime_types= in browse's activity.info file would allow sugar to override what the system is providing? Another place for that definition might be in /usr/share/sugar/data/mime.defaults. Jerry On December 6, 2014 at 8:57 PM Gustavo Duarte gus.dua...@gmail.com wrote: Finally I found the setting needed to open links with Browser Activity by default. xdg-mime default sugar-browser.desktop x-scheme-handler/http and xdg-mime default sugar-browser.desktop x-scheme-handler/https Adding this settings, links on notifications messages should be opened by BrowserActivity. Offcourse a bash script to launch BrowserActivit is needed. Something like: #!/bin/sh while [ -n $2 ] ; do case $1 in -u | --uri) uri=$2 ;; *) echo unknown argument $1 $2 ;; esac shift;shift done sugar-launch org.laptop.WebActivity --uri $uri Thanks a lot for all your tips, were very helpfully. Gustavo. On Sat, Dec 6, 2014 at 3:59 PM, Jerry Vonau m...@jvonau.ca wrote: Hi Gustavo, On December 6, 2014 at 10:42 AM Gustavo Duarte gus.dua...@gmail.com wrote: Add an actions, isn't an option, because the notification-daemon (Ubuntu 12.04 precise) does't support actions. From freedesktop specs https://developer.gnome.org/notification-spec/ Actions The actions send a request message back to the notification client when invoked. This functionality may not be implemented by the notification server, conforming clients should check if it is available before using it (see the GetCapabilities message in Protocol). An implementation is free to ignore any requested by the client. As an example one possible rendering of actions would be as buttons in the notification popup. Actions are sent over as a list of pairs. Each even element in the list (starting at index 0) represents the identifier for the action. Each odd element in the list is the localized string that will be displayed to the user. However hyperlinks is supported, if I add a href=http://sugarlabs.org; SugarLabs , works. Not exactly as I want :( When I do a click on the link, Firefox is opened. I tried change the system default browser setting with: gconftool-2 -s /desktop/gnome/applications/browser/exec --type string '/usr/local/bin/sugar-browser %s' Notice: sugar-browser is a bash script to launch BrowserActivity. But after that, Firefox still opened each doing click on link of notification message. So the problem now is, how change the default browser on Sugar. Hum, sounds like the system's default mime definitions might be pointed to Firefox in /usr/share/applications/defaults.list. What does xdg-mime query default text/html return? The XO here returns 'firefox.desktop' even without having the Firefox rpm installed. Not sure what the correct way of overriding this list would be, create ~/.local/share/applications/mimeapps.list, or maybe using xdg-mime default ...? Both of those ideas would need a .desktop file for browse thou. Hope it helps, Jerry Any idea ? Thanks in advance. Gustavo. On Fri, Dec 5, 2014 at 9:27 PM, Gustavo Duarte gus.dua...@gmail.com wrote: Greats !! Thanks for these tips. El 05/12/2014 17:59, Gonzalo Odiard godi...@sugarlabs.org escribió: +1 On Fri, Dec 5, 2014 at 4:57 PM, Sam P. sam.parkins...@gmail.com wrote: Hi, If my memory is right, the freedesktop notification spec includes actions. You can have multiple of these and they are displayed like buttons [1]. When they are clicked you get a callback event. I would prefer to implement the standard ranter than something proprietary. That is just my opinions. Thanks, Sam [1]: imgur.com/e8r9OZr -- Gonzalo Odiard SugarLabs - Software for children learning ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Widget to show a notification message with a link
Add an actions, isn't an option, because the notification-daemon (Ubuntu 12.04 precise) does't support actions. From freedesktop specs https://developer.gnome.org/notification-spec/ Actions The actions send a request message back to the notification client when invoked. This functionality may not be implemented by the notification server, conforming clients should check if it is available before using it (see the GetCapabilities message in Protocol). An implementation is free to ignore any requested by the client. As an example one possible rendering of actions would be as buttons in the notification popup. Actions are sent over as a list of pairs. Each even element in the list (starting at index 0) represents the identifier for the action. Each odd element in the list is the localized string that will be displayed to the user. However hyperlinks is supported, if I add a href=http://sugarlabs.org; SugarLabs /a, works. Not exactly as I want :( When I do a click on the link, Firefox is opened. I tried change the system default browser setting with: gconftool-2 -s /desktop/gnome/applications/browser/exec --type string '/usr/local/bin/sugar-browser %s' Notice: sugar-browser is a bash script to launch BrowserActivity. But after that, Firefox still opened each doing click on link of notification message. So the problem now is, how change the default browser on Sugar. Any idea ? Thanks in advance. Gustavo. On Fri, Dec 5, 2014 at 9:27 PM, Gustavo Duarte gus.dua...@gmail.com wrote: Greats !! Thanks for these tips. El 05/12/2014 17:59, Gonzalo Odiard godi...@sugarlabs.org escribió: +1 On Fri, Dec 5, 2014 at 4:57 PM, Sam P. sam.parkins...@gmail.com wrote: Hi, If my memory is right, the freedesktop notification spec includes actions. You can have multiple of these and they are displayed like buttons [1]. When they are clicked you get a callback event. I would prefer to implement the standard ranter than something proprietary. That is just my opinions. Thanks, Sam [1]: imgur.com/e8r9OZr -- Gonzalo Odiard SugarLabs - Software for children learning ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Widget to show a notification message with a link
Hi Gustavo, On December 6, 2014 at 10:42 AM Gustavo Duarte gus.dua...@gmail.com wrote: Add an actions, isn't an option, because the notification-daemon (Ubuntu 12.04 precise) does't support actions. From freedesktop specs https://developer.gnome.org/notification-spec/ Actions The actions send a request message back to the notification client when invoked. This functionality may not be implemented by the notification server, conforming clients should check if it is available before using it (see the GetCapabilities message in Protocol). An implementation is free to ignore any requested by the client. As an example one possible rendering of actions would be as buttons in the notification popup. Actions are sent over as a list of pairs. Each even element in the list (starting at index 0) represents the identifier for the action. Each odd element in the list is the localized string that will be displayed to the user. However hyperlinks is supported, if I add a href=http://sugarlabs.org; SugarLabs , works. Not exactly as I want :( When I do a click on the link, Firefox is opened. I tried change the system default browser setting with: gconftool-2 -s /desktop/gnome/applications/browser/exec --type string '/usr/local/bin/sugar-browser %s' Notice: sugar-browser is a bash script to launch BrowserActivity. But after that, Firefox still opened each doing click on link of notification message. So the problem now is, how change the default browser on Sugar. Hum, sounds like the system's default mime definitions might be pointed to Firefox in /usr/share/applications/defaults.list. What does xdg-mime query default text/html return? The XO here returns 'firefox.desktop' even without having the Firefox rpm installed. Not sure what the correct way of overriding this list would be, create ~/.local/share/applications/mimeapps.list, or maybe using xdg-mime default ...? Both of those ideas would need a .desktop file for browse thou. Hope it helps, Jerry Any idea ? Thanks in advance. Gustavo. On Fri, Dec 5, 2014 at 9:27 PM, Gustavo Duarte gus.dua...@gmail.com wrote: Greats !! Thanks for these tips. El 05/12/2014 17:59, Gonzalo Odiard godi...@sugarlabs.org escribió: +1 On Fri, Dec 5, 2014 at 4:57 PM, Sam P. sam.parkins...@gmail.com wrote: Hi, If my memory is right, the freedesktop notification spec includes actions. You can have multiple of these and they are displayed like buttons [1]. When they are clicked you get a callback event. I would prefer to implement the standard ranter than something proprietary. That is just my opinions. Thanks, Sam [1]: imgur.com/e8r9OZr -- Gonzalo Odiard SugarLabs - Software for children learning ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Widget to show a notification message with a link
Finally I found the setting needed to open links with Browser Activity by default. xdg-mime default sugar-browser.desktop x-scheme-handler/http and xdg-mime default sugar-browser.desktop x-scheme-handler/https Adding this settings, links on notifications messages should be opened by BrowserActivity. Offcourse a bash script to launch BrowserActivit is needed. Something like: #!/bin/sh while [ -n $2 ] ; do case $1 in -u | --uri) uri=$2 ;; *) echo unknown argument $1 $2 ;; esac shift;shift done sugar-launch org.laptop.WebActivity --uri $uri Thanks a lot for all your tips, were very helpfully. Gustavo. On Sat, Dec 6, 2014 at 3:59 PM, Jerry Vonau m...@jvonau.ca wrote: Hi Gustavo, On December 6, 2014 at 10:42 AM Gustavo Duarte gus.dua...@gmail.com wrote: Add an actions, isn't an option, because the notification-daemon (Ubuntu 12.04 precise) does't support actions. From freedesktop specs https://developer.gnome.org/notification-spec/ Actions The actions send a request message back to the notification client when invoked. This functionality may not be implemented by the notification server, conforming clients should check if it is available before using it (see the GetCapabilities message in Protocol). An implementation is free to ignore any requested by the client. As an example one possible rendering of actions would be as buttons in the notification popup. Actions are sent over as a list of pairs. Each even element in the list (starting at index 0) represents the identifier for the action. Each odd element in the list is the localized string that will be displayed to the user. However hyperlinks is supported, if I add a href=http://sugarlabs.org; SugarLabs , works. Not exactly as I want :( When I do a click on the link, Firefox is opened. I tried change the system default browser setting with: gconftool-2 -s /desktop/gnome/applications/browser/exec --type string '/usr/local/bin/sugar-browser %s' Notice: sugar-browser is a bash script to launch BrowserActivity. But after that, Firefox still opened each doing click on link of notification message. So the problem now is, how change the default browser on Sugar. Hum, sounds like the system's default mime definitions might be pointed to Firefox in /usr/share/applications/defaults.list. What does xdg-mime query default text/html return? The XO here returns 'firefox.desktop' even without having the Firefox rpm installed. Not sure what the correct way of overriding this list would be, create ~/.local/share/applications/mimeapps.list, or maybe using xdg-mime default ...? Both of those ideas would need a .desktop file for browse thou. Hope it helps, Jerry Any idea ? Thanks in advance. Gustavo. On Fri, Dec 5, 2014 at 9:27 PM, Gustavo Duarte gus.dua...@gmail.com wrote: Greats !! Thanks for these tips. El 05/12/2014 17:59, Gonzalo Odiard godi...@sugarlabs.org escribió: +1 On Fri, Dec 5, 2014 at 4:57 PM, Sam P. sam.parkins...@gmail.com wrote: Hi, If my memory is right, the freedesktop notification spec includes actions. You can have multiple of these and they are displayed like buttons [1]. When they are clicked you get a callback event. I would prefer to implement the standard ranter than something proprietary. That is just my opinions. Thanks, Sam [1]: imgur.com/e8r9OZr -- Gonzalo Odiard SugarLabs - Software for children learning ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Widget to show a notification message with a link
Just a thought, wonder if adding x-scheme-handler/http to mime_types= in browse's activity.info file would allow sugar to override what the system is providing? Another place for that definition might be in /usr/share/sugar/data/mime.defaults. Jerry On December 6, 2014 at 8:57 PM Gustavo Duarte gus.dua...@gmail.com wrote: Finally I found the setting needed to open links with Browser Activity by default. xdg-mime default sugar-browser.desktop x-scheme-handler/http and xdg-mime default sugar-browser.desktop x-scheme-handler/https Adding this settings, links on notifications messages should be opened by BrowserActivity. Offcourse a bash script to launch BrowserActivit is needed. Something like: #!/bin/sh while [ -n $2 ] ; do case $1 in -u | --uri) uri=$2 ;; *) echo unknown argument $1 $2 ;; esac shift;shift done sugar-launch org.laptop.WebActivity --uri $uri Thanks a lot for all your tips, were very helpfully. Gustavo. On Sat, Dec 6, 2014 at 3:59 PM, Jerry Vonau m...@jvonau.ca wrote: Hi Gustavo, On December 6, 2014 at 10:42 AM Gustavo Duarte gus.dua...@gmail.com wrote: Add an actions, isn't an option, because the notification-daemon (Ubuntu 12.04 precise) does't support actions. From freedesktop specs https://developer.gnome.org/notification-spec/ Actions The actions send a request message back to the notification client when invoked. This functionality may not be implemented by the notification server, conforming clients should check if it is available before using it (see the GetCapabilities message in Protocol). An implementation is free to ignore any requested by the client. As an example one possible rendering of actions would be as buttons in the notification popup. Actions are sent over as a list of pairs. Each even element in the list (starting at index 0) represents the identifier for the action. Each odd element in the list is the localized string that will be displayed to the user. However hyperlinks is supported, if I add a href=http://sugarlabs.org; SugarLabs , works. Not exactly as I want :( When I do a click on the link, Firefox is opened. I tried change the system default browser setting with: gconftool-2 -s /desktop/gnome/applications/browser/exec --type string '/usr/local/bin/sugar-browser %s' Notice: sugar-browser is a bash script to launch BrowserActivity. But after that, Firefox still opened each doing click on link of notification message. So the problem now is, how change the default browser on Sugar. Hum, sounds like the system's default mime definitions might be pointed to Firefox in /usr/share/applications/defaults.list. What does xdg-mime query default text/html return? The XO here returns 'firefox.desktop' even without having the Firefox rpm installed. Not sure what the correct way of overriding this list would be, create ~/.local/share/applications/mimeapps.list, or maybe using xdg-mime default ...? Both of those ideas would need a .desktop file for browse thou. Hope it helps, Jerry Any idea ? Thanks in advance. Gustavo. On Fri, Dec 5, 2014 at 9:27 PM, Gustavo Duarte gus.dua...@gmail.com wrote: Greats !! Thanks for these tips. El 05/12/2014 17:59, Gonzalo Odiard godi...@sugarlabs.org escribió: +1 On Fri, Dec 5, 2014 at 4:57 PM, Sam P. sam.parkins...@gmail.com wrote: Hi, If my memory is right, the freedesktop notification spec includes actions. You can have multiple of these and they are displayed like buttons [1]. When they are clicked you get a callback event. I would prefer to implement the standard ranter than something proprietary. That is just my opinions. Thanks, Sam [1]: imgur.com/e8r9OZr -- Gonzalo Odiard SugarLabs - Software for children learning ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Widget to show a notification message with a link
I think the firs option is the best. That addition was discussed a few times but never implemented in Sugar. Please share your code then can be added in the next version of Sugar. Gonzalo On Fri, Dec 5, 2014 at 11:54 AM, Gustavo Duarte gus.dua...@gmail.com wrote: Hi Guys, I need build an app, which shows a message to kids with some text and one link which could be opened by Browser activity, like a notification. I know that already exist a way, to show notifications which will be placed on the top bar, by dbus, org.freedesktop.Notifications, however it doesn't work for because, when I did a click on the link the Browser activity isn't opened. DBUS_NAME=org.freedesktop.Notifications OBJ_PATH=/org/freedesktop/Notifications icon = None IFACE_NAME=org.freedesktop.Notifications bus = dbus.SessionBus() notify_obj = bus.get_object(DBUS_NAME,OBJ_PATH) notifications=dbus.Interface(notify_obj,IFACE_NAME) notifications.Notify(,0,icon,'Title',www.google.com,[], hints ,-1) I think, may be, I have tow options, 1) Add a kind of event, on the notification widget, to recognise the click and open the Browser activity. 2) Make another type of widget, like a Dialog, where ca be easier add an event click to open the Browser. What is your opinion ? Are there other obvious options, that I'm can't seeing ? Thanks in advance. Gustavo. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Gonzalo Odiard SugarLabs - Software for children learning ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Widget to show a notification message with a link
Hi Gonzalo, Do you remember, if is there a thread where it addition was discussed ? Or do you suggest me a start point to achieve that ? Thanks Gustavo. On Fri, Dec 5, 2014 at 1:27 PM, Gonzalo Odiard godi...@sugarlabs.org wrote: I think the firs option is the best. That addition was discussed a few times but never implemented in Sugar. Please share your code then can be added in the next version of Sugar. Gonzalo On Fri, Dec 5, 2014 at 11:54 AM, Gustavo Duarte gus.dua...@gmail.com wrote: Hi Guys, I need build an app, which shows a message to kids with some text and one link which could be opened by Browser activity, like a notification. I know that already exist a way, to show notifications which will be placed on the top bar, by dbus, org.freedesktop.Notifications, however it doesn't work for because, when I did a click on the link the Browser activity isn't opened. DBUS_NAME=org.freedesktop.Notifications OBJ_PATH=/org/freedesktop/Notifications icon = None IFACE_NAME=org.freedesktop.Notifications bus = dbus.SessionBus() notify_obj = bus.get_object(DBUS_NAME,OBJ_PATH) notifications=dbus.Interface(notify_obj,IFACE_NAME) notifications.Notify(,0,icon,'Title',www.google.com,[], hints ,-1) I think, may be, I have tow options, 1) Add a kind of event, on the notification widget, to recognise the click and open the Browser activity. 2) Make another type of widget, like a Dialog, where ca be easier add an event click to open the Browser. What is your opinion ? Are there other obvious options, that I'm can't seeing ? Thanks in advance. Gustavo. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Gonzalo Odiard SugarLabs - Software for children learning ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Widget to show a notification message with a link
On Fri, Dec 5, 2014 at 1:35 PM, Gustavo Duarte gus.dua...@gmail.com wrote: Hi Gonzalo, Do you remember, if is there a thread where it addition was discussed ? I didn't found it. Or do you suggest me a start point to achieve that ? You can look at: jarabe/model/notifications.py jarabe/frame/notification.py Gonzalo Thanks Gustavo. On Fri, Dec 5, 2014 at 1:27 PM, Gonzalo Odiard godi...@sugarlabs.org wrote: I think the firs option is the best. That addition was discussed a few times but never implemented in Sugar. Please share your code then can be added in the next version of Sugar. Gonzalo On Fri, Dec 5, 2014 at 11:54 AM, Gustavo Duarte gus.dua...@gmail.com wrote: Hi Guys, I need build an app, which shows a message to kids with some text and one link which could be opened by Browser activity, like a notification. I know that already exist a way, to show notifications which will be placed on the top bar, by dbus, org.freedesktop.Notifications, however it doesn't work for because, when I did a click on the link the Browser activity isn't opened. DBUS_NAME=org.freedesktop.Notifications OBJ_PATH=/org/freedesktop/Notifications icon = None IFACE_NAME=org.freedesktop.Notifications bus = dbus.SessionBus() notify_obj = bus.get_object(DBUS_NAME,OBJ_PATH) notifications=dbus.Interface(notify_obj,IFACE_NAME) notifications.Notify(,0,icon,'Title',www.google.com,[], hints ,-1) I think, may be, I have tow options, 1) Add a kind of event, on the notification widget, to recognise the click and open the Browser activity. 2) Make another type of widget, like a Dialog, where ca be easier add an event click to open the Browser. What is your opinion ? Are there other obvious options, that I'm can't seeing ? Thanks in advance. Gustavo. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Gonzalo Odiard SugarLabs - Software for children learning ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Gonzalo Odiard SugarLabs - Software for children learning ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Widget to show a notification message with a link
Hi, If my memory is right, the freedesktop notification spec includes actions. You can have multiple of these and they are displayed like buttons [1]. When they are clicked you get a callback event. I would prefer to implement the standard ranter than something proprietary. That is just my opinions. Thanks, Sam [1]: imgur.com/e8r9OZr ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Widget to show a notification message with a link
+1 On Fri, Dec 5, 2014 at 4:57 PM, Sam P. sam.parkins...@gmail.com wrote: Hi, If my memory is right, the freedesktop notification spec includes actions. You can have multiple of these and they are displayed like buttons [1]. When they are clicked you get a callback event. I would prefer to implement the standard ranter than something proprietary. That is just my opinions. Thanks, Sam [1]: imgur.com/e8r9OZr -- Gonzalo Odiard SugarLabs - Software for children learning ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Widget to show a notification message with a link
Greats !! Thanks for these tips. El 05/12/2014 17:59, Gonzalo Odiard godi...@sugarlabs.org escribió: +1 On Fri, Dec 5, 2014 at 4:57 PM, Sam P. sam.parkins...@gmail.com wrote: Hi, If my memory is right, the freedesktop notification spec includes actions. You can have multiple of these and they are displayed like buttons [1]. When they are clicked you get a callback event. I would prefer to implement the standard ranter than something proprietary. That is just my opinions. Thanks, Sam [1]: imgur.com/e8r9OZr -- Gonzalo Odiard SugarLabs - Software for children learning ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel