Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    NEED HELp ! creat a GtkWidget right next to the CLOCK in STATUS AREA

    Reply
    sunus | # 1 | 2011-05-19, 06:10 | Report

    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!

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by sunus; 2011-05-19 at 06:15. Reason: added

     
    nicolai | # 2 | 2011-05-19, 07:49 | Report

    This only works for the clock statusarea-plugin.
    That is why the documentation says:
    Originally Posted by
    ...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

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to nicolai For This Useful Post:
    sunus

     
    sunus | # 3 | 2011-05-19, 08:19 | Report

    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!!

    Edit | Forward | Quote | Quick Reply | Thanks

     
    sunus | # 4 | 2011-05-19, 08:29 | Report

    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!

    Edit | Forward | Quote | Quick Reply | Thanks

     
    sunus | # 5 | 2011-05-19, 08:37 | Report

    now i got the
    hildon-status-menu-0.3.39+0m5 source..
    and i am reading it.
    but still need your advices! thank you

    Edit | Forward | Quote | Quick Reply | Thanks

     
    nicolai | # 6 | 2011-05-19, 08:39 | Report

    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

    Edit | Forward | Quote | Quick Reply | Thanks

     
    sunus | # 7 | 2011-05-19, 08:53 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    nicolai | # 8 | 2011-05-19, 09:21 | Report

    I don't know if it is possible to add another
    widget. Maybe you can only replace the
    clock plugin.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    sunus | # 9 | 2011-05-19, 18:43 | Report

    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!

    Edit | Forward | Quote | Quick Reply | Thanks

     
    sunus | # 10 | 2011-05-19, 18:48 | Report

    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!

    Edit | Forward | Quote | Quick Reply | Thanks

     
vBulletin® Version 3.8.8
Normal Logout