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;
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);
{ "/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 }
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;
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);
}
}
#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)
{
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*
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>");
}