GdkPixmap *pixmap; GdkBitmap *mask;
void init_main_window(const gchar * glade_file){	GladeXML *xml;	GtkWidget *widget;	GtkTextBuffer *txtbuf;	char title[256];	GdkPixmap *pixmap;	GdkBitmap *mask;	GtkStyle *style;	xml = glade_xml_new(glade_file, "window1", NULL);	if (!xml)		g_error(_("GUI loading failed !\n"));	glade_xml_signal_autoconnect(xml);	main_wnd = glade_xml_get_widget(xml, "window1");	hpaned = glade_xml_get_widget(xml, "hpaned1");	vpaned = glade_xml_get_widget(xml, "vpaned1");	tree1_w = glade_xml_get_widget(xml, "treeview1");	tree2_w = glade_xml_get_widget(xml, "treeview2");	text_w = glade_xml_get_widget(xml, "textview3");	back_btn = glade_xml_get_widget(xml, "button1");	gtk_widget_set_sensitive(back_btn, FALSE);	widget = glade_xml_get_widget(xml, "show_name1");	gtk_check_menu_item_set_active((GtkCheckMenuItem *) widget,				       show_name);	widget = glade_xml_get_widget(xml, "show_range1");	gtk_check_menu_item_set_active((GtkCheckMenuItem *) widget,				       show_range);	widget = glade_xml_get_widget(xml, "show_data1");	gtk_check_menu_item_set_active((GtkCheckMenuItem *) widget,				       show_value);	style = gtk_widget_get_style(main_wnd);	widget = glade_xml_get_widget(xml, "toolbar1");	pixmap = gdk_pixmap_create_from_xpm_d(main_wnd->window, &mask,					      &style->bg[GTK_STATE_NORMAL],					      (gchar **) xpm_single_view);	gtk_image_set_from_pixmap(GTK_IMAGE				  (((GtkToolbarChild				     *) (g_list_nth(GTK_TOOLBAR(widget)->						    children,						    5)->data))->icon),				  pixmap, mask);	pixmap =	    gdk_pixmap_create_from_xpm_d(main_wnd->window, &mask,					 &style->bg[GTK_STATE_NORMAL],					 (gchar **) xpm_split_view);	gtk_image_set_from_pixmap(GTK_IMAGE				  (((GtkToolbarChild				     *) (g_list_nth(GTK_TOOLBAR(widget)->						    children,						    6)->data))->icon),				  pixmap, mask);	pixmap =	    gdk_pixmap_create_from_xpm_d(main_wnd->window, &mask,					 &style->bg[GTK_STATE_NORMAL],					 (gchar **) xpm_tree_view);	gtk_image_set_from_pixmap(GTK_IMAGE				  (((GtkToolbarChild				     *) (g_list_nth(GTK_TOOLBAR(widget)->						    children,						    7)->data))->icon),				  pixmap, mask);	switch (view_mode) {	case SINGLE_VIEW:		widget = glade_xml_get_widget(xml, "button4");		g_signal_emit_by_name(widget, "clicked");		break;	case SPLIT_VIEW:		widget = glade_xml_get_widget(xml, "button5");		g_signal_emit_by_name(widget, "clicked");		break;	case FULL_VIEW:		widget = glade_xml_get_widget(xml, "button6");		g_signal_emit_by_name(widget, "clicked");		break;	}	txtbuf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_w));	tag1 = gtk_text_buffer_create_tag(txtbuf, "mytag1",					  "foreground", "red",					  "weight", PANGO_WEIGHT_BOLD,					  NULL);	tag2 = gtk_text_buffer_create_tag(txtbuf, "mytag2",					  /*"style", PANGO_STYLE_OBLIQUE, */					  NULL);	sprintf(title, _("Linux Kernel v%s Configuration"),		getenv("KERNELRELEASE"));	gtk_window_set_title(GTK_WINDOW(main_wnd), title);	gtk_widget_show(main_wnd);}