Set window title
I set the title based on the current version, but I do this through a function to make it easier to change later.
This commit is contained in:
parent
9c0a00dd48
commit
b802b31d42
|
@ -1,4 +1,5 @@
|
|||
|
||||
#include <version.h>
|
||||
#include <ocarina/gtk.h>
|
||||
#include <ocarina/button.h>
|
||||
#include <ocarina/window.h>
|
||||
|
@ -12,6 +13,7 @@ void ocarina_init(int argc, char **argv)
|
|||
|
||||
gtk_init(&argc, &argv);
|
||||
window_init();
|
||||
window_title("Ocarina " + vers_str());
|
||||
|
||||
hbox = gtk_hbox_new(FALSE, 0);
|
||||
play = make_play_button(GTK_ICON_SIZE_MENU);
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
#include <ocarina/gtk.h>
|
||||
#include <ocarina/ocarina.h>
|
||||
#include <ocarina/window.h>
|
||||
|
@ -15,6 +18,11 @@ void window_resize(int w, int h)
|
|||
gtk_window_resize(GTK_WINDOW(window), w, h);
|
||||
}
|
||||
|
||||
void window_title(string title)
|
||||
{
|
||||
gtk_window_set_title(GTK_WINDOW(window), title.c_str());
|
||||
}
|
||||
|
||||
void window_init()
|
||||
{
|
||||
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||
|
|
|
@ -6,5 +6,6 @@
|
|||
void window_resize(int, int);
|
||||
void window_init();
|
||||
void window_add(GtkWidget *);
|
||||
void window_title(string);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue