(Created page with '== How to integrate you GTK application on MeeGo Netbook == === The Window === ==== Decoration ==== Remove the window decoration: GtkWidget *window = gtk_window_new (); …') |
(→The Close Button) |
||
| Line 28: | Line 28: | ||
==== The Close Button ==== | ==== The Close Button ==== | ||
| - | Use a button in the far right hand corner of the toolbar for closing the window | + | Use a button in the far right hand corner of the toolbar for closing the window. Name this "MeeGoCloseButton": |
GtkWidget *close_button, *image; | GtkWidget *close_button, *image; | ||
Contents |
Remove the window decoration:
GtkWidget *window = gtk_window_new ();
gtk_window_set_decorated (GTK_WINDOW (window), FALSE);
Find the size of the screen and then set your preferred window size to it:
gtk_window_resize (GTK_WINDOW (window),
max_screen_width,
max_screen_height);
gtk_window_maximize (GTK_WINDOW (window));
Use a standard GtkToolbar along the top of the screen. Name this "MeeGoToolbar":
GtkWidget *toolbar = gtk_toolbar_new ();
gtk_widget_set_name (GTK_WIDGET (toolbar), "MeeGoToolbar");
Use a button in the far right hand corner of the toolbar for closing the window. Name this "MeeGoCloseButton":
GtkWidget *close_button, *image;
close_button = gtk_button_new ();
gtk_widget_set_name (close_button, "MeeGoCloseButton");
Use "window-close-hover" as the icon name:
image = gtk_image_new_from_icon_name ("window-close-hover",
GTK_ICON_SIZE_DIALOG);
gtk_container_add (GTK_CONTAINER (close_button), image);
If your application has a settings area, add a GtkButton called "MeeGoSettingsButton":
GtkWidget *close_button, *image;
close_button = gtk_button_new ();
gtk_widget_set_name (close_button, "MeeGoSettingsButton");
Use "preferences-other-hover" as the icon name:
image = gtk_image_new_from_icon_name ("preferences-other-hover",
GTK_ICON_SIZE_DIALOG);
gtk_container_add (GTK_CONTAINER (close_button), image);