Active Topics

 


Reply
Thread Tools
daperl's Avatar
Posts: 2,427 | Thanked: 2,986 times | Joined on Dec 2007
#1
This is a continuing conversation from here.

Originally Posted by qwerty12 View Post
If I am wrong, there are at least two widgets, with open code, which display the favicon set by MicroB.

At the least, their code could be checked to see if they do anything special or, if not, just display the icon - set by the program - as-is. If it does just display the icon as-is, then it's more in favour of browser compositing the icon.
I agree; this is exactly what I'm looking for, but... where can I find the code?

Oh, just to check that it wasn't done in the engine, I built the extremely old tablet-browser-ui-with-source (*gasp*)
What a bummer. I was sure that the browser would have some handle to a desktop menu item that would allow it to change the icon. Or I thought that it might send a dbus message, but I don't see the traffic using dbus-monitor. I noticed that there were some microb changes that seemed to move the dbus calls to rpc calls, but I haven't had any luck there either. Did you get your browser source from here?

https://garage.maemo.org/plugins/scm.../?root=browser

I dove into the hildon-desktop and some of the hildon-application-manager code and I've found where they do this stuff for themselves. And I've also dumped the strings of browser.launch, but I've obviously yet to hone in on the application-level solution. I'm ready for a code example.

P.S: Nice work on that browser.
A fun exercise made possible by Bundyo and jmalonzo.
__________________
N9: Go white or go home
 

The Following 2 Users Say Thank You to daperl For This Useful Post:
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#2
Originally Posted by daperl View Post
I agree; this is exactly what I'm looking for, but... where can I find the code?
Regarding hildon-desktop? g-inspector tells me that the widget that is able to display that "Z Z" is an HNAppButton; and the corresponding source file - in the hildon-desktop tarball - is src/hn-app-button.c and the function which checks to see if it hibernated, and draws that "Z Z" accordingly, is hn_app_button_compose_app_pixbuf.

Originally Posted by daperl View Post
Did you get your browser source from here?
https://garage.maemo.org/plugins/scm.../?root=browser
Yes, to be more precise, here: https://garage.maemo.org/plugins/scm.../?root=browser

Here's my quick hack of it to get it to build in the Diablo SDK: http://qwerty12.qole.org/tablet-browser-ui.tar.bz2

(I also messed around with gtk_adi_set_child_icon() but failed (I left the code in that tarball, not sure if I was doing it right) to see if it was that which was setting the icon.

GTK ADI is a library that was made by an MicroB developer, still linked to by browser.launch, and exists in the SDK repo; albeit in a source-only form ( http://repository.maemo.org/pool/dia...ibg/libgtkadi/ ) despite the libgtkadi1 deb being found in the Nokia SSU update repository. Not really sure why it was used as I've never seen multiple "documents" in one browser window so it caught my curiosity.
)

Originally Posted by daperl View Post
A fun exercise made possible by Bundyo and jmalonzo.
Ah, cool, thanks.

Personally, I think that the bigger problem is overriding the icon set by hildon-desktop (I don't know if it can be done, I just let hildon-desktop set it through the Icon= parameter in the desktop file). Because, if you can do that, you can get the icon it is currently using and composite your image over it and set the new icon.

Last edited by qwerty12; 2009-08-02 at 17:22.
 

The Following 2 Users Say Thank You to qwerty12 For This Useful Post:
daperl's Avatar
Posts: 2,427 | Thanked: 2,986 times | Joined on Dec 2007
#3
Originally Posted by qwerty12 View Post
Regarding hildon-desktop? g-inspector tells me that the widget that is able to display that "Z Z" is an HNAppButton; and the corresponding source file - in the hildon-desktop tarball - is src/hn-app-button.c and the function which checks to see if it hibernated, and draws that "Z Z" accordingly, is hn_app_button_compose_app_pixbuf.
I agree, this looks like the call I want to make, but look at the parameters:

HNAppButton *button, const GdkPixbuf *src, HDWMEntryInfo *info

I think I need at least one static function to help me get the pointers of arguments 1 and 3. Currently, I'm following this rabit hole:

HDWMApplication *hd_wm_lookup_application_via_exec (const gchar *exec_name)
HDEntryInfo *hd_wm_application_get_info (HDWMApplication *app)

I also think that test/test7.c in hildon-desktop has some good static window manager code.

Yet the ChangeLog says HDEntryInfo has been replaced by HDWMEntryInfo so...

And then, of course, I need Python bindings for all calls and accompanying data structures.

Yes, to be more precise, here: https://garage.maemo.org/plugins/scm.../?root=browser

Here's my quick hack of it to get it to build in the Diablo SDK: http://qwerty12.qole.org/tablet-browser-ui.tar.bz2
Thanks, I'll take a look at this.

(I also messed around with gtk_adi_set_child_icon() but failed (I left the code in that tarball, not sure if I was doing it right) to see if it was that which was setting the icon.

GTK ADI is a library that was made by an MicroB developer, still linked to by browser.launch, and exists in the SDK repo; albeit in a source-only form ( http://repository.maemo.org/pool/dia...ibg/libgtkadi/ ) despite the libgtkadi1 deb being found in the Nokia SSU update repository. Not really sure why it was used as I've never seen multiple "documents" in one browser window so it caught my curiosity.
)
I took a look at the code and the screen shots, but I couldn't see anything having to do with the app switcher. Was I suppose to?

Personally, I think that the bigger problem is overriding the icon set by hildon-desktop (I don't know if it can be done, I just let hildon-desktop set it through the Icon= parameter in the desktop file). Because, if you can do that, you can get the icon it is currently using and composite your image over it and set the new icon.
I'm not exactly sure what you mean here. This is the solution I already use. I want to be able to change the icon while my app is running like microb does. Before microb overlays the favicon, it first overlays a "I'm starting a download" down arrow. <The Zohan>This is what I wish.</The Zohan> The app switcher menu item has a copy of this icon in memory. I want access to that menu item. And I want access to it at the same level as microb. Sorry if you already know this, but I'm not sure if I misunderstood you.

So much time for so little.
__________________
N9: Go white or go home
 

The Following User Says Thank You to daperl For This Useful Post:
javispedro's Avatar
Posts: 2,355 | Thanked: 5,249 times | Joined on Jan 2009 @ Barcelona
#4
Be careful since the ZZZ is drawn on the "slotted" (="over the task navigator itself") application switcher icons, and not on the "drop menu" switcher icons, which is where browser draws the favicon (at least on my tablet).

This is done in hildon-desktop/src/hd-switcher-menu-item.c AFAIK, and the interesting libhildonwm functions seem to be
Code:
 GdkPixbuf *  hd_wm_entry_info_get_icon        (HDWMEntryInfo *info);

void         hd_wm_entry_info_set_icon        (HDWMEntryInfo *info,
                                               GdkPixbuf   *icon);
Unfortunately, browser does not seem to use this nor any of the libhildonwm symbols.

If I did not understand what you were trying to achieve please disregard this

Last edited by javispedro; 2009-08-02 at 21:28.
 

The Following 3 Users Say Thank You to javispedro For This Useful Post:
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#5
Thanks a shitton to the awesome javispedro who told me what I was doing wrong when calling gtk_window_set_icon (the final (and source application icon, come think of it) icon has to be 64x54), I've written an example (run, and wait 5 seconds):

http://slexy.org/view/s2T5RmwaT1


Last edited by qwerty12; 2009-08-04 at 21:16.
 

The Following 5 Users Say Thank You to qwerty12 For This Useful Post:
Bundyo's Avatar
Posts: 4,708 | Thanked: 4,649 times | Joined on Oct 2007 @ Bulgaria
#6
Now I only need to check how can I get favicons from WebKit
__________________
Technically, there are three determinate states the cat could be in: Alive, Dead, and Bloody Furious.
 

The Following User Says Thank You to Bundyo For This Useful Post:
daperl's Avatar
Posts: 2,427 | Thanked: 2,986 times | Joined on Dec 2007
#7
Originally Posted by qwerty12 View Post
Thanks a shitton to the awesome javispedro who told me what I was doing wrong when calling gtk_window_set_icon (the final icon has to be 64x54), I've written an example (run, and wait 5 seconds):
You have got to be sh*tting me. That's just GTK. I'm speechless. You guys are above and beyond. May your thanks runneth over.
__________________
N9: Go white or go home
 

The Following User Says Thank You to daperl For This Useful Post:
daperl's Avatar
Posts: 2,427 | Thanked: 2,986 times | Joined on Dec 2007
#8
qwerty12 ... Jules Winnfield
daperl ... Vincent Vega

Jules: You, flock of seagulls, you know why we're here? Why don't you tell my man Vincent where you got the sh*t hid at?
Marvin: It's over th...
Jules: I don't remember askin' you a Goddamn thing! You were saying?
Roger: It's in the cupboard.
[Vincent starts looking in the upper cupboard]
Roger: No, no, the one by your kn-knees.
Jules: We happy?
[Vincent continues staring at the briefcase's contents]
Jules: Vincent! We happy?
Vincent: Yeah, we happy.

Name:  screenshot17.jpg
Views: 335
Size:  24.7 KB
__________________
N9: Go white or go home
 

The Following User Says Thank You to daperl For This Useful Post:
Reply


 
Forum Jump


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