ocarina: Set child propertys for GtkNotebook

The set_tab_packing() function is deprecated, so I might as well just
use the real way to do this...

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
Bryan Schumaker 2012-03-15 16:52:52 -04:00
parent 032caad800
commit e1b410845d
2 changed files with 10 additions and 9 deletions

View File

@ -5,6 +5,7 @@
#include <map>
#include <fstream>
#include <stdlib.h>
using namespace std;
static DataState state = CLEAN;
@ -24,19 +25,20 @@ static void save(ofstream &stream)
static void load(ifstream &stream)
{
string key;
int value;
string key, value;
int val;
println("Loading preferences!");
while (stream.good()) {
stream >> key;
getline(stream, key);
if (!stream.good())
break;
stream >> value;
getline(stream, value);
if (!stream.good())
break;
println(key + " = %d", value);
preferences[key] = value;
val = atoi(value.c_str());
println(key + " = %d", val);
preferences[key] = val;
}
}

View File

@ -9,9 +9,8 @@ static void add_page(string text, GtkWidget *page)
GtkWidget *label = gtk_label_new(text.c_str());
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), page, label);
gtk_notebook_set_tab_label_packing(GTK_NOTEBOOK(notebook),
page, TRUE, TRUE, GTK_PACK_START);
gtk_container_child_set(GTK_CONTAINER(notebook), page, "tab-expand", TRUE, NULL);
gtk_container_child_set(GTK_CONTAINER(notebook), page, "tab-fill", TRUE, NULL);
gtk_widget_show(label);
}