]> matita.cs.unibo.it Git - helm.git/commitdiff
* using non-diffing mathml factory
authorLuca Padovani <luca.padovani@unito.it>
Sat, 21 Feb 2004 09:59:26 +0000 (09:59 +0000)
committerLuca Padovani <luca.padovani@unito.it>
Sat, 21 Feb 2004 09:59:26 +0000 (09:59 +0000)
* removed methods no longer implemented in gtkmathview from interface

helm/DEVEL/mathml_editor/test/editor.cc
helm/DEVEL/mathml_editor/test/guiGTK.c

index cfb0ade29df133ece954dca328a30131a247e2e8..3efc17cee2168b72acb5429a1f73c3c9bdb12c78 100644 (file)
@@ -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);
 
index cf59421cffecbdc2f92b6db7d99218e32798490d..c3f7cd84ffecca448c1aad8cf4904140b6acb6cf 100644 (file)
@@ -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,  "<Separator>" },
-  { "/Options/_Anti Aliasing",         NULL, options_anti_aliasing, 0,  "<ToggleItem>" },
-  { "/Options/_Transparency",          NULL, options_transparency,  0,  "<ToggleItem>" },
 
   { "/_Help" ,        NULL,         NULL,          0, "<LastBranch>" },
   { "/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, "<main>");
 }