From: Luca Padovani Date: Sat, 21 Feb 2004 09:59:26 +0000 (+0000) Subject: * using non-diffing mathml factory X-Git-Tag: v0_0_4~118 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=cbbd558e6b6053cf643973973515c29c8c6bdb6e;p=helm.git * using non-diffing mathml factory * removed methods no longer implemented in gtkmathview from interface --- diff --git a/helm/DEVEL/mathml_editor/test/editor.cc b/helm/DEVEL/mathml_editor/test/editor.cc index cfb0ade29..3efc17cee 100644 --- a/helm/DEVEL/mathml_editor/test/editor.cc +++ b/helm/DEVEL/mathml_editor/test/editor.cc @@ -168,7 +168,7 @@ main(int argc, char* argv[]) DOM::Document texStyleDoc = di.createDocumentFromURI("./xsl/tml-texid.xsl"); DOMX::XSLTStylesheet texStyle(texStyleDoc); - CMathMLFactoryXSLTDiff factory(logger, mmlStyle); + CMathMLFactoryXSLT factory(logger, mmlStyle); TPushParser parser(logger, factory, dictionary); ILPushLexer lexer(logger, parser, dictionary); diff --git a/helm/DEVEL/mathml_editor/test/guiGTK.c b/helm/DEVEL/mathml_editor/test/guiGTK.c index cf59421cf..c3f7cd84f 100644 --- a/helm/DEVEL/mathml_editor/test/guiGTK.c +++ b/helm/DEVEL/mathml_editor/test/guiGTK.c @@ -36,8 +36,6 @@ static GtkWidget* window; static GtkWidget* main_area; static GtkWidget* scrolled_area; -static GtkMenuItem* anti_aliasing_item; -static GtkMenuItem* transparency_item; static gpointer context = NULL; static gchar* doc_name = NULL; @@ -53,8 +51,6 @@ static void file_output_tex(GtkWidget*, gpointer); static void options_set_font_size(GtkWidget*, gpointer); static void options_change_font_size(GtkWidget*, gboolean); static void options_verbosity(GtkWidget*, guint); -static void options_anti_aliasing(GtkWidget*, gpointer); -static void options_transparency(GtkWidget*, gpointer); static void edit_delete_selection(GtkWidget*, gpointer); static void edit_select_parent(GtkWidget*, gpointer); static void edit_reset_selection(GtkWidget*, gpointer); @@ -91,8 +87,6 @@ static GtkItemFactoryEntry menu_items[] = { { "/Options/Verbosity/_Info", NULL, options_verbosity, 2, "/Options/Verbosity/Errors" }, { "/Options/Verbosity/_Debug", NULL, options_verbosity, 3, "/Options/Verbosity/Errors" }, { "/Options/sep1", NULL, NULL, 0, "" }, - { "/Options/_Anti Aliasing", NULL, options_anti_aliasing, 0, "" }, - { "/Options/_Transparency", NULL, options_transparency, 0, "" }, { "/_Help" , NULL, NULL, 0, "" }, { "/Help/About...", NULL, help_about, 0, NULL } @@ -214,7 +208,7 @@ GUI_unload_document() math_view = GTK_MATH_VIEW(main_area); - gtk_math_view_unload(math_view); + gtk_math_view_load_root(math_view, 0); if (doc_name != NULL) g_free(doc_name); doc_name = NULL; @@ -246,12 +240,7 @@ GUI_set_font_manager(FontManagerId id) if (id != gtk_math_view_get_font_manager_type(math_view)) gtk_math_view_set_font_manager_type(math_view, id); - gtk_widget_set_sensitive(anti_aliasing_item, t1); - gtk_widget_set_sensitive(transparency_item, t1); - - if (t1) - { - gtk_math_view_set_anti_aliasing(math_view, GTK_CHECK_MENU_ITEM(anti_aliasing_item)->active); + gtk_widget_set_sensitive(anti_aliasing(math_view, GTK_CHECK_MENU_ITEM(anti_aliasing_item)->active); gtk_math_view_set_transparency(math_view, GTK_CHECK_MENU_ITEM(transparency_item)->active); } @@ -320,20 +309,6 @@ options_font_manager(GtkWidget* widget, FontManagerId id) } #endif -static void -options_anti_aliasing(GtkWidget* widget, gpointer data) -{ - gboolean aa = gtk_math_view_get_anti_aliasing(GTK_MATH_VIEW(main_area)); - gtk_math_view_set_anti_aliasing(GTK_MATH_VIEW(main_area), !aa); -} - -static void -options_transparency(GtkWidget* widget, gpointer data) -{ - gboolean t = gtk_math_view_get_transparency(GTK_MATH_VIEW(main_area)); - gtk_math_view_set_transparency(GTK_MATH_VIEW(main_area), !t); -} - static void options_verbosity(GtkWidget* widget, guint level) { @@ -654,8 +629,6 @@ create_widget_set(gpointer context) gtk_widget_show(main_vbox); - if (gtk_math_view_get_anti_aliasing(GTK_MATH_VIEW(main_area))) - gtk_menu_item_activate(anti_aliasing_item); } GtkWidget* @@ -675,11 +648,5 @@ get_main_menu() gtk_window_add_accel_group(GTK_WINDOW(window), accel_group); - menu_item = gtk_item_factory_get_widget(item_factory, "/Options/Anti Aliasing"); - anti_aliasing_item = GTK_MENU_ITEM(menu_item); - - menu_item = gtk_item_factory_get_widget(item_factory, "/Options/Transparency"); - transparency_item = GTK_MENU_ITEM(menu_item); - return gtk_item_factory_get_widget(item_factory, "
"); }