January 2018
Beginner to intermediate
454 pages
10h 8m
English
Instead of using the usual new() constructor, we decided to use the new_from_stock() one here. This takes a string as an argument. This string is an identifier for the item that represents a built-in menu or toolbar item, such as Open or Save. These items have an icon and a label that is translated according to the user locale. By using stock items, you can quickly create a beautiful application that will look the same as other applications built with GTK+.
Let's show this window containing the toolbar:
window.show_all();
});
This goes right at the end of the startup event handler. Here, we use show_all() instead of only show() because we have more widgets to show. Instead of using show_all(), we could call show() on every single ...
Read now
Unlock full access