Hi,

Here I write something that hope can help if you want to port one glade
base apps to hildon. If you have anything to add or correct,  update it.

<Enable Hildon windows>
It's not unusual to change the toplevel window from GtkWindow to
HildonWindow. do following:
1. Manually modify glade file with window class from "GtkWindow" to
"HildonWindow"
2.In your c file, add "#include <glade/glad-build.h>
3.in your c file, add following
        static GtkWidget* glade_hildon_window_new(GladeXML *xml, GType
type,   GladeWidgetInfo *info)  {
                return hildon_window_new();
        }
and, before your window initialization, do following
        glade_register_widget(HILDON_TYPE_WINDOW,
                              glade_hildon_window_new,
                              glade_standard_build_children,
                              NULL);

4.As usual hildon app, add the window to hildon program env by
hildon_program_add_window()


<Enable Hildon style menu>
1. Remove menubar widget and its property by manually modify glade file.
2. Replace the menubar with like following that's still parent of those
menu items.
    <widget class="GtkMenu" id="main_menu">
          <property name="visible">True</property> 
3. Get the GtkWidget corresponding to main_menu with
glade_xml_get_widget()
4. Set it hildon menu of desired hildon window by    
hildon_window_set_menu(HILDON_WINDOW(window), GTK_MENU(main_menu));
Now you get almost everything done except you will get warnings saying
you add two widgets in one container. Remove that
5.Make main_menu to be same layer with toplevel window orignially being
parent of the menu itself by modify glade file manually.
     

3.Enable HildonCalendar
almost same steps like what we do with HildonWindow. 

Thanks,
Peter           

-- 
Ubuntu-mobile mailing list
Ubuntu-mobile@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-mobile

Reply via email to