Notices


Reply
Thread Tools
Posts: 10 | Thanked: 0 times | Joined on Apr 2010 @ Beijing, China
#1
as i said in topic,i wanna make a tiny stuff needs this !
the status area is in the top right of the screen where shows the battery,times,ect..
here's what i did
let's say,the widget is a gtk_button
i know i need to use hd_status_plugin_item_set_status_area_widget (),
but it just can not make it work!

void new_widget_next_to_clock(HDStatusPluginItem *item)
{
GtkWidget *button = gtk_button_new_with_label("hello");
hd_status_plugin_item_set_status_area_widget(HD_ST ATUS_PLUGIN_ITEM(item), button1)
gtk_widget_show_all(item);
}

but , nothing happens.
anyway, i can use hd_status_plugin_item_set_status_area_icon to add a icon in status area , but i cannot add a widget.

here are something i've read :
http://maemo.org/api_refs/5.0/5.0-fi...luginItem.html the APIs

http://maemo.org/development/sdks/maemo_5_examples/ some exapmles

http://maemo.gitorious.org/hildon/hildon the whole code about hildon.

anyone know how?
thx! any answers would be greatly appreaciate!!
thx again!

Last edited by sunus; 2011-05-19 at 06:15. Reason: added
 
nicolai's Avatar
Posts: 1,637 | Thanked: 4,424 times | Joined on Apr 2009 @ Germany
#2
This only works for the clock statusarea-plugin.
That is why the documentation says:
...Sets a widget which should be displayed in the Status Area. This function should only be used by the Clock plugin.
Take a look at the source code of hidon-status-area, on how it
prevents other plugins from adding its own statusarea widgets.

And take a look at
status-menu.plugins:

X-Status-Area-Permanent-Item=Clock
 

The Following User Says Thank You to nicolai For This Useful Post:
Posts: 10 | Thanked: 0 times | Joined on Apr 2010 @ Beijing, China
#3
Originally Posted by nicolai View Post
This only works for the clock statusarea-plugin.
That is why the documentation says:


Take a look at the source code of hidon-status-area, on how it
prevents other plugins from adding its own statusarea widgets.

And take a look at
status-menu.plugins:

X-Status-Area-Permanent-Item=Clock
yep,
i noticed "This function should only be used by the Clock plugin." already.
and i am looking for the hidon-status-area source code , but i didn't find anything useful.
and i also looking for the codes that implements the clock plugins.
can u provide some links ? thx thx!!
 
Posts: 10 | Thanked: 0 times | Joined on Apr 2010 @ Beijing, China
#4
Now, all i can do is waiting for your answer
i've finished my code on the Widget yesterday.
ALL I NEED TO DO IS how to add it to the status area!
thx pal!
 
Posts: 10 | Thanked: 0 times | Joined on Apr 2010 @ Beijing, China
#5
now i got the
hildon-status-menu-0.3.39+0m5 source..
and i am reading it.
but still need your advices! thank you
 
nicolai's Avatar
Posts: 1,637 | Thanked: 4,424 times | Joined on Apr 2009 @ Germany
#6
Well, the source code for the fremantle hildon-desktop is
open source. You can find it in maemos gitorious repository:
http://maemo.gitorious.org/fremantle...on-status-menu

The builtin clock plugin isn't open.

nicolai
 
Posts: 10 | Thanked: 0 times | Joined on Apr 2010 @ Beijing, China
#7
Originally Posted by nicolai View Post
Well, the source code for the fremantle hildon-desktop is
open source. You can find it in maemos gitorious repository:
http://maemo.gitorious.org/fremantle...on-status-menu

The builtin clock plugin isn't open.

nicolai
i am reading it .
thx
btw : is my demand implement-able if i don't know how they add a clock plugin ? let's say , add a button with label 'hello' right next to the clock.
 
nicolai's Avatar
Posts: 1,637 | Thanked: 4,424 times | Joined on Apr 2009 @ Germany
#8
I don't know if it is possible to add another
widget. Maybe you can only replace the
clock plugin.
 
Posts: 10 | Thanked: 0 times | Joined on Apr 2010 @ Beijing, China
#9
Originally Posted by nicolai View Post
I don't know if it is possible to add another
widget. Maybe you can only replace the
clock plugin.
dman it! i've tried another way
that is:
i convert all the characters to a image ,
and i use
hd_status_plugin_item_set_status_area_icon()
to add them , one by one
but, but! i find a problem!
the image i added is size-fixed to 16x16
but what i want is 16x32!!

i know the icon_theme has something to do with it
but i do know how to set a size for the image to be added in status.
i got a screen for you,to make my point clear.

i want the img number 9 has the size of 16widthx32hight
simple change the size parameter of gtk_icon_theme_load_icon DOESN'T WORK!!

thx for your time!!
ps : if the img doesn't show up,
u can visite this link
http://www.flickr.com/photos/6006428...in/photostream
just in case! thank man!
 
Posts: 10 | Thanked: 0 times | Joined on Apr 2010 @ Beijing, China
#10
as far as i know
the spaces right next to the clock is something like this

img1 img2
img3 img4 img's size = 16x16

so,i figure if i get this img as hight as tow img.i can make somthing like this

im im im im
g1 g2 g3 g4 img's size=16x32

hope u understand this,
because if i use the default size(16x16)
the order of imgs will be messed up!

have a good day and i need to get some sleep now!
hope to get ur answers!
 
Reply


 
Forum Jump


All times are GMT. The time now is 06:48.