Index: src/tilp.c
===================================================================
--- src/tilp.c	(revision 4380)
+++ src/tilp.c	(working copy)
@@ -51,7 +51,7 @@
 #define strcasecmp _stricmp
 #endif /* __WIN32__ */
 
-GladeXML *xml = NULL;
+GtkBuilder *builder = NULL;
 GtkWidget *main_wnd  = NULL;
 GtkWidget *clist_wnd = NULL;
 GtkWidget *ctree_wnd = NULL;
@@ -66,12 +66,12 @@
 
 	if(view)
 	{
-		data = glade_xml_get_widget(xml, "vbox2");
+		data = GTK_WIDGET (gtk_builder_get_object (builder, "vbox2"));
 		gtk_widget_show_all(data);
 	}
 	else
 	{
-		data = glade_xml_get_widget(xml, "vbox2");
+		data = GTK_WIDGET (gtk_builder_get_object (builder, "vbox2"));
 		gtk_widget_hide(data);
 
 		//gtk_window_resize(dbox, options.xsize, options.ysize);
@@ -82,52 +82,55 @@
 {
 	GtkWidget *dbox;
 	GtkWidget *paned;
+	GError* error = NULL;
 
-	xml = glade_xml_new(tilp_paths_build_glade("tilp-2.glade"), "tilp_dbox", PACKAGE);
-	if (!xml)
-		g_error("GUI loading failed !\n");
-	glade_xml_signal_autoconnect(xml);
+	builder = gtk_builder_new();
+	if (!gtk_builder_add_from_file (builder, tilp_paths_build_builder("tilp-2.ui"), &error))
+	{
+		g_warning ("Couldn't load builder file: %s\n", error->message);
+		g_error_free (error);
+	}
+	gtk_builder_connect_signals(builder, NULL);
 
-	dbox = glade_xml_get_widget(xml, "tilp_dbox");
+	dbox = GTK_WIDGET (gtk_builder_get_object (builder, "tilp_dbox"));
 	if(options.full_gui)
 		gtk_window_resize(GTK_WINDOW(dbox), options.wnd_x_size1, options.wnd_y_size1);
 	else
 		gtk_window_resize(GTK_WINDOW(dbox), options.wnd_x_size2, options.wnd_y_size2);
 
-	ctree_wnd = glade_xml_get_widget(xml, "treeview1");
-	clist_wnd = glade_xml_get_widget(xml, "treeview2");
+	ctree_wnd = GTK_WIDGET (gtk_builder_get_object (builder, "treeview1"));
+	clist_wnd = GTK_WIDGET (gtk_builder_get_object (builder, "treeview2"));
 
-	label_wnd.label11 = glade_xml_get_widget(xml, "label11");
-	label_wnd.label12 = glade_xml_get_widget(xml, "label12");
-	label_wnd.label13 = glade_xml_get_widget(xml, "label13");
-	label_wnd.label14 = glade_xml_get_widget(xml, "label14");
-	label_wnd.label21 = glade_xml_get_widget(xml, "label21");
+	label_wnd.label11 = GTK_WIDGET (gtk_builder_get_object (builder, "label11"));
+	label_wnd.label12 = GTK_WIDGET (gtk_builder_get_object (builder, "label12"));
+	label_wnd.label13 = GTK_WIDGET (gtk_builder_get_object (builder, "label13"));
+	label_wnd.label14 = GTK_WIDGET (gtk_builder_get_object (builder, "label14"));
+	label_wnd.label21 = GTK_WIDGET (gtk_builder_get_object (builder, "label21"));
 
-	toolbar_wnd.toolbar = glade_xml_get_widget(xml, "toolbar2");
-	toolbar_wnd.button10 = glade_xml_get_widget(xml, "button1");
-	toolbar_wnd.button11 = glade_xml_get_widget(xml, "button2");
-	toolbar_wnd.button12 = glade_xml_get_widget(xml, "button3");
-	toolbar_wnd.button13 = glade_xml_get_widget(xml, "button4");
-	toolbar_wnd.button14 = glade_xml_get_widget(xml, "button5");
-	toolbar_wnd.button15 = glade_xml_get_widget(xml, "button6");
-	toolbar_wnd.button20 = glade_xml_get_widget(xml, "button10");
-	toolbar_wnd.button21 = glade_xml_get_widget(xml, "button11");
-	toolbar_wnd.button22 = glade_xml_get_widget(xml, "button12");
+	toolbar_wnd.toolbar = GTK_WIDGET (gtk_builder_get_object (builder, "toolbar2"));
+	toolbar_wnd.button10 = GTK_WIDGET (gtk_builder_get_object (builder, "button1"));
+	toolbar_wnd.button11 = GTK_WIDGET (gtk_builder_get_object (builder, "button2"));
+	toolbar_wnd.button12 = GTK_WIDGET (gtk_builder_get_object (builder, "button3"));
+	toolbar_wnd.button13 = GTK_WIDGET (gtk_builder_get_object (builder, "button4"));
+	toolbar_wnd.button14 = GTK_WIDGET (gtk_builder_get_object (builder, "button5"));
+	toolbar_wnd.button15 = GTK_WIDGET (gtk_builder_get_object (builder, "button6"));
+	toolbar_wnd.button20 = GTK_WIDGET (gtk_builder_get_object (builder, "button10"));
+	toolbar_wnd.button21 = GTK_WIDGET (gtk_builder_get_object (builder, "button11"));
+	toolbar_wnd.button22 = GTK_WIDGET (gtk_builder_get_object (builder, "button12"));
 
-	menubar_wnd.menubar = glade_xml_get_widget(xml, "menubar1");
-	menubar_wnd.viewlocal = glade_xml_get_widget(xml, "menuitem13");
-	menubar_wnd.showall = glade_xml_get_widget(xml, "show_all_files1");
-	menubar_wnd.restore = glade_xml_get_widget(xml, "imagemenuitem4");
-	menubar_wnd.backup = glade_xml_get_widget(xml, "imagemenuitem3");
-	menubar_wnd.idlist = glade_xml_get_widget(xml, "menuitem10");
-	menubar_wnd.setclock = glade_xml_get_widget(xml, "menuitem9");
-	menubar_wnd.dumprom = glade_xml_get_widget(xml, "menuitem8");
+	menubar_wnd.menubar = GTK_WIDGET (gtk_builder_get_object (builder, "menubar1"));
+	menubar_wnd.viewlocal = GTK_WIDGET (gtk_builder_get_object (builder, "menuitem13"));
+	menubar_wnd.showall = GTK_WIDGET (gtk_builder_get_object (builder, "show_all_files1"));
+	menubar_wnd.restore = GTK_WIDGET (gtk_builder_get_object (builder, "imagemenuitem4"));
+	menubar_wnd.backup = GTK_WIDGET (gtk_builder_get_object (builder, "imagemenuitem3"));
+	menubar_wnd.idlist = GTK_WIDGET (gtk_builder_get_object (builder, "menuitem10"));
+	menubar_wnd.setclock = GTK_WIDGET (gtk_builder_get_object (builder, "menuitem9"));
+	menubar_wnd.dumprom = GTK_WIDGET (gtk_builder_get_object (builder, "menuitem8"));
 
-	paned = glade_xml_get_widget(xml, "hpaned1");
+	paned = GTK_WIDGET (gtk_builder_get_object (builder, "hpaned1"));
 	gtk_paned_set_position(GTK_PANED(paned), options.pane_x_size);
 
 	show_right_view(options.full_gui);
-	help_menu = glade_xml_get_widget(xml, "help_menu1");
 
 	clist_init();
 	ctree_init();
@@ -136,32 +139,18 @@
 	return dbox;
 }
 
-GtkWidget *display_help_menu(void)
+G_MODULE_EXPORT void on_hpaned1_size_request(GtkPaned* paned, gpointer user_data)
 {
-	GladeXML *xml2;
-	GtkWidget *menu;
-
-	xml2 = glade_xml_new(tilp_paths_build_glade("tilp-2.glade"), "help_menu1", PACKAGE);
-	if (!xml2)
-		g_error("GUI loading failed !\n");
-	glade_xml_signal_autoconnect(xml2);
-
-	menu = glade_xml_get_widget(xml2, "help_menu1");
-	return menu;
-}
-
-GLADE_CB void on_hpaned1_size_request(GtkPaned* paned, gpointer user_data)
-{
 	options.pane_x_size = gtk_paned_get_position(paned);
 }
 
-GLADE_CB void on_tilp_dbox_destroy(GtkObject* object, gpointer user_data)
+G_MODULE_EXPORT void on_tilp_dbox_destroy(GtkObject* object, gpointer user_data)
 {
 	tilp_config_write();
 	gtk_main_quit();
 }
 
-GLADE_CB gboolean on_tilp_dbox_delete_event(GtkWidget* widget, GdkEvent* event, gpointer user_data)
+G_MODULE_EXPORT gboolean on_tilp_dbox_delete_event(GtkWidget* widget, GdkEvent* event, gpointer user_data)
 {
 	if(options.full_gui)
 		gtk_window_get_size(GTK_WINDOW(widget), &options.wnd_x_size1, &options.wnd_y_size1);
@@ -175,7 +164,7 @@
 
 extern int go_to_bookmark(const char *link);
 
-GLADE_CB void on_manual1_activate(GtkMenuItem* menuitem, gpointer user_data)
+G_MODULE_EXPORT void on_manual1_activate(GtkMenuItem* menuitem, gpointer user_data)
 {
 	gchar *path = g_strconcat(inst_paths.help_dir, _("Manual_en.html"), NULL);
 
@@ -184,47 +173,47 @@
 	g_free(path);
 }
 
-GLADE_CB void on_manpage1_activate(GtkMenuItem* menuitem, gpointer user_data)
+G_MODULE_EXPORT void on_manpage1_activate(GtkMenuItem* menuitem, gpointer user_data)
 {
 	display_manpage_dbox();
 }
 
-GLADE_CB void on_ti_s_web_site1_activate(GtkMenuItem* menuitem, gpointer user_data)
+G_MODULE_EXPORT void on_ti_s_web_site1_activate(GtkMenuItem* menuitem, gpointer user_data)
 {
 	go_to_bookmark("http://education.ti.com");
 }
 
-GLADE_CB void on_calculator_software1_activate(GtkMenuItem* menuitem, gpointer user_data)
+G_MODULE_EXPORT void on_calculator_software1_activate(GtkMenuItem* menuitem, gpointer user_data)
 {
 	go_to_bookmark("http://epsstore.ti.com");
 }
 
-GLADE_CB void on_ticalcorg1_activate(GtkMenuItem* menuitem, gpointer user_data)
+G_MODULE_EXPORT void on_ticalcorg1_activate(GtkMenuItem* menuitem, gpointer user_data)
 {
 	go_to_bookmark("http://www.ticalc.org");
 }
 
-GLADE_CB void on_tinewsnet1_activate(GtkMenuItem* menuitem, gpointer user_data)
+G_MODULE_EXPORT void on_tinewsnet1_activate(GtkMenuItem* menuitem, gpointer user_data)
 {
 	go_to_bookmark("http://www.tigen.org");
 }
 
-GLADE_CB void on_ti_frorg1_activate(GtkMenuItem* menuitem, gpointer user_data)
+G_MODULE_EXPORT void on_ti_frorg1_activate(GtkMenuItem* menuitem, gpointer user_data)
 {
 	go_to_bookmark("http://www.ti-fr.com");
 } 
 
-GLADE_CB void on_the_lpg1_activate(GtkMenuItem* menuitem, gpointer user_data)
+G_MODULE_EXPORT void on_the_lpg1_activate(GtkMenuItem* menuitem, gpointer user_data)
 {
 	go_to_bookmark("http://lpg.ticalc.org");
 } 
 
-GLADE_CB void on_tilp_s_web_site1_activate(GtkMenuItem* menuitem, gpointer user_data)
+G_MODULE_EXPORT void on_tilp_s_web_site1_activate(GtkMenuItem* menuitem, gpointer user_data)
 {
 	go_to_bookmark("http://tilp.info");
 } 
 
-GLADE_CB void on_bug_report1_activate(GtkMenuItem* menuitem, gpointer user_data)
+G_MODULE_EXPORT void on_bug_report1_activate(GtkMenuItem* menuitem, gpointer user_data)
 {
 	GtkWidget *dialog;
 	const gchar *message = _("There are several ways to get in touch if you encounter a problem with TiLP or if you have questions, suggestions, bug reports, etc:\n- if you have general questions or problems, please consider the users' mailing list first (mailto:tilp-users@list.sf.net).\n- if you want to discuss about TiLP, you can use the TiLP forum (http://sourceforge.net/forum/?group_id=18378).\n- for bug reports, use the 'Bug Tracking System' (http://sourceforge.net/tracker/?group_id=18378).\n\nBefore e-mailing the TiLP team, make sure you have read the FAQ....");
@@ -236,19 +225,19 @@
 	gtk_widget_destroy(dialog);
 }
 
-GLADE_CB void on_changelog1_activate(GtkMenuItem* menuitem, gpointer user_data)
+G_MODULE_EXPORT void on_changelog1_activate(GtkMenuItem* menuitem, gpointer user_data)
 {
 	display_release_dbox();
 }
 
-GLADE_CB void on_about1_activate(GtkMenuItem* menuitem, gpointer user_data)
+G_MODULE_EXPORT void on_about1_activate(GtkMenuItem* menuitem, gpointer user_data)
 {
 	display_about_dbox();
 }
 
 /* Toolbar buttons callbacks */
 
-GLADE_CB void on_rom_dump1_activate(GtkMenuItem* menuitem, gpointer user_data)
+G_MODULE_EXPORT void on_rom_dump1_activate(GtkMenuItem* menuitem, gpointer user_data)
 {
 	char* src_filename;
 	const char *dst_filename;
@@ -287,13 +276,13 @@
 }
 
 // Ready
-GLADE_CB void on_tilp_button1_clicked(GtkButton* button, gpointer user_data)
+G_MODULE_EXPORT void on_tilp_button1_clicked(GtkButton* button, gpointer user_data)
 {
 	tilp_calc_isready();
 }
 
 // Dirlist
-GLADE_CB void on_tilp_button2_clicked(GtkButton* button, gpointer user_data)
+G_MODULE_EXPORT void on_tilp_button2_clicked(GtkButton* button, gpointer user_data)
 {
 	if (tilp_calc_dirlist() != 0)
 		return;
@@ -303,7 +292,7 @@
 }
 
 // Backup
-GLADE_CB void on_tilp_button3b_clicked(GtkButton* button, gpointer user_data)
+G_MODULE_EXPORT void on_tilp_button3b_clicked(GtkButton* button, gpointer user_data)
 {
 	char* src_filename;
 	const char *dst_filename;
@@ -343,9 +332,9 @@
 	labels_refresh();
 }
 
-GLADE_CB void on_tilp_button7_clicked(GtkButton* button, gpointer user_data);
+G_MODULE_EXPORT void on_tilp_button7_clicked(GtkButton* button, gpointer user_data);
 
-GLADE_CB void on_tilp_button3_clicked(GtkButton* button, gpointer user_data)
+G_MODULE_EXPORT void on_tilp_button3_clicked(GtkButton* button, gpointer user_data)
 {
 	if(options.backup_as_tigroup && tifiles_is_flash(options.calc_model))
 		on_tilp_button7_clicked(button, user_data);
@@ -354,7 +343,7 @@
 }
 
 // Restore
-GLADE_CB void on_tilp_button4_clicked(GtkButton* button, gpointer user_data)
+G_MODULE_EXPORT void on_tilp_button4_clicked(GtkButton* button, gpointer user_data)
 {
 	const char *filename;
 	char *ext;
@@ -538,13 +527,13 @@
 }
 
 // Receive
-GLADE_CB void on_tilp_button5_clicked(GtkButton* button, gpointer user_data)
+G_MODULE_EXPORT void on_tilp_button5_clicked(GtkButton* button, gpointer user_data)
 {
 	on_tilp_recv();
 }
 
 // Send
-GLADE_CB void on_tilp_button6_clicked(GtkButton* button, gpointer user_data)
+G_MODULE_EXPORT void on_tilp_button6_clicked(GtkButton* button, gpointer user_data)
 {
 	gchar** filenames;
 	gchar** ptr;
@@ -567,7 +556,7 @@
 }
 
 // Recv TiGroup
-GLADE_CB void on_tilp_button7_clicked(GtkButton* button, gpointer user_data)
+G_MODULE_EXPORT void on_tilp_button7_clicked(GtkButton* button, gpointer user_data)
 {
 	char* src_filename;
 	const char *dst_filename;
@@ -610,7 +599,7 @@
 }
 
 // Send TiGroup
-GLADE_CB void on_tilp_button8_clicked(GtkButton* button, gpointer user_data)
+G_MODULE_EXPORT void on_tilp_button8_clicked(GtkButton* button, gpointer user_data)
 {
 	const char *filename;
 	int ret;
@@ -646,7 +635,7 @@
 // ---
 
 // make new dir
-GLADE_CB void on_tilp_button10_clicked(GtkButton* button, gpointer user_data)
+G_MODULE_EXPORT void on_tilp_button10_clicked(GtkButton* button, gpointer user_data)
 {
 	gchar *utf8 = NULL;
 	gsize br, bw;
@@ -668,7 +657,7 @@
 
 
 // trash
-GLADE_CB void on_tilp_button11_clicked(GtkButton* button, gpointer user_data)
+G_MODULE_EXPORT void on_tilp_button11_clicked(GtkButton* button, gpointer user_data)
 {
 	tilp_file_selection_delete();
 
@@ -677,7 +666,7 @@
 }
 
 // refresh
-GLADE_CB void on_tilp_button12_clicked(GtkButton* button, gpointer user_data)
+G_MODULE_EXPORT void on_tilp_button12_clicked(GtkButton* button, gpointer user_data)
 {
 	if (!local.copy_cut)
 		tilp_file_selection_destroy();
@@ -686,21 +675,21 @@
 	labels_refresh();
 }
 
-GLADE_CB void on_tilp_button13_clicked(GtkButton* button, gpointer user_data)
+/*G_MODULE_EXPORT void on_tilp_button13_clicked(GtkButton* button, gpointer user_data)
 {
 	GtkWidget *menu = display_help_menu();
 
 	gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, 0, gtk_get_current_event_time ());
-}
+}*/
 
 // take screenshot
-GLADE_CB void on_tilp_menuitem7_clicked(GtkButton* button, gpointer user_data)
+G_MODULE_EXPORT void on_tilp_menuitem7_clicked(GtkButton* button, gpointer user_data)
 {
 	display_screenshot_dbox();
 }
 
 // change folder
-GLADE_CB void on_button14_clicked(GtkButton* button, gpointer user_data)
+G_MODULE_EXPORT void on_button14_clicked(GtkButton* button, gpointer user_data)
 {
 	gchar *folder;
 
@@ -721,19 +710,19 @@
 }
 
 // set clock
-GLADE_CB void on_tilp_menuitem9_clicked(GtkButton* button, gpointer user_data)
+G_MODULE_EXPORT void on_tilp_menuitem9_clicked(GtkButton* button, gpointer user_data)
 {
 	display_clock_dbox();
 }
 
 //get id-list
-GLADE_CB void on_tilp_menuitem10_clicked(GtkButton* button, gpointer user_data)
+G_MODULE_EXPORT void on_tilp_menuitem10_clicked(GtkButton* button, gpointer user_data)
 {
 	tilp_calc_idlist(0);
 }
 
 //get calc info
-GLADE_CB void on_tilp_menuitem12_clicked(GtkButton* button, gpointer user_data)
+G_MODULE_EXPORT void on_tilp_menuitem12_clicked(GtkButton* button, gpointer user_data)
 {
 	CalcInfos infos;
 	tilp_calc_get_infos(&infos);
@@ -741,7 +730,7 @@
 
 
 //update View menu
-GLADE_CB void on_tilp_viewmenu_active(GtkButton* button, gpointer user_data)
+G_MODULE_EXPORT void on_tilp_viewmenu_active(GtkButton* button, gpointer user_data)
 {
 
 }
Index: src/tilp_paths.c
===================================================================
--- src/tilp_paths.c	(revision 4380)
+++ src/tilp_paths.c	(working copy)
@@ -65,6 +65,8 @@
             g_strconcat(inst_paths.base_dir, "", NULL);
 	inst_paths.glade_dir =
 	    g_strconcat(inst_paths.base_dir, "glade/", NULL);
+	inst_paths.builder_dir =
+	    g_strconcat(inst_paths.base_dir, "builder/", NULL);
 	inst_paths.home_dir =
 		g_strdup(g_get_home_dir());
 
@@ -121,6 +123,8 @@
 	    g_strconcat(inst_paths.base_dir, "", NULL);
 	inst_paths.glade_dir =
 	    g_strconcat(inst_paths.base_dir, "glade\\", NULL);
+	inst_paths.builder_dir =
+	    g_strconcat(inst_paths.base_dir, "builder\\", NULL);
 	#ifdef __MINGW32__
 	inst_paths.home_dir = g_get_current_dir();
 	#else
@@ -168,3 +172,13 @@
 
 	return path;
 }
+
+const char *tilp_paths_build_builder(const char *name)
+{
+	static char *path = NULL;
+
+	g_free(path);
+	path = g_strconcat(inst_paths.builder_dir, name, NULL);
+
+	return path;
+}
