]> matita.cs.unibo.it Git - helm.git/commitdiff
* some code cleanup
authorLuca Padovani <luca.padovani@unito.it>
Sat, 13 Sep 2003 15:20:22 +0000 (15:20 +0000)
committerLuca Padovani <luca.padovani@unito.it>
Sat, 13 Sep 2003 15:20:22 +0000 (15:20 +0000)
* added LICENCE to all source files

18 files changed:
helm/gtkmathview-bonobo/LICENSE [new file with mode: 0644]
helm/gtkmathview-bonobo/src/Makefile.am
helm/gtkmathview-bonobo/src/aux.cc
helm/gtkmathview-bonobo/src/aux.h
helm/gtkmathview-bonobo/src/control-data.c
helm/gtkmathview-bonobo/src/control-data.h
helm/gtkmathview-bonobo/src/control-factory.c
helm/gtkmathview-bonobo/src/control-factory.h
helm/gtkmathview-bonobo/src/handlers.c
helm/gtkmathview-bonobo/src/handlers.h
helm/gtkmathview-bonobo/src/persist-file.c
helm/gtkmathview-bonobo/src/persist-file.h
helm/gtkmathview-bonobo/src/persist-stream.c
helm/gtkmathview-bonobo/src/persist-stream.h
helm/gtkmathview-bonobo/src/view.c
helm/gtkmathview-bonobo/src/view.h
helm/gtkmathview-bonobo/test/main.c
helm/gtkmathview-bonobo/test/test.mml

diff --git a/helm/gtkmathview-bonobo/LICENSE b/helm/gtkmathview-bonobo/LICENSE
new file mode 100644 (file)
index 0000000..d9bf0fa
--- /dev/null
@@ -0,0 +1,23 @@
+/* This file is part of GtkMathView-Bonobo, a Bonobo wrapper for GtkMathView.
+ * Copyright (C) 2003 Luca Padovani <lpadovan@cs.unibo.it>
+ *                    Pouria Masoudi <pmasoudi@cs.unibo.it>
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * For more information, please visit the project's home page
+ * http://helm.cs.unibo.it/gtkmathview-bonobo
+ * or send an email to <lpadovan@cs.unibo.it>
+ */
+
index e856b6f53d3bb1dd6a3afaaa371771562f169014..35c011e757ef59f9e73896adc8cfffabcb8b1234 100644 (file)
@@ -3,8 +3,6 @@ location = $(libdir)/libgtkmathview-bonobo.so
 serverdir = $(libdir)/bonobo/servers
 server_in_files = GNOME_GtkMathView.server.in.in
 
-CLEANFILES = $(server_in_files:.server.in.in=.server)
-
 IDL = $(top_srcdir)/idl/GtkMathView.idl
 
 IDL_GENERATED_C = \
@@ -17,6 +15,10 @@ IDL_GENERATED_H = \
 
 IDL_GENERATED = $(IDL_GENERATED_C) $(IDL_GENERATED_H)
 
+CLEANFILES = \
+  $(server_in_files:.server.in.in=.server) \
+  $(IDL_GENERATED)
+
 lib_LTLIBRARIES = libgtkmathview-bonobo.la
 
 libgtkmathview_bonobo_la_LIBADD = \
index 6ab6f63d4856308b93f7b550bdcdd478df8ee030..b6d22c0992feaa1d8fd99c1e8b8b22a282d408b4 100644 (file)
@@ -1,24 +1,25 @@
-// Copyright (C) 2000-2002, Luca Padovani <luca.padovani@cs.unibo.it>.
-//
-// This file is part of GtkMathView, a Gtk widget for MathML.
-// 
-// GtkMathView is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// GtkMathView is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with GtkMathView; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-// 
-// For details, see the GtkMathView World-Wide-Web page,
-// http://www.cs.unibo.it/helm/mml-widget, or send a mail to
-// <luca.padovani@cs.unibo.it>
+/* This file is part of GtkMathView-Bonobo, a Bonobo wrapper for GtkMathView.
+ * Copyright (C) 2003 Luca Padovani <lpadovan@cs.unibo.it>
+ *                    Pouria Masoudi <pmasoudi@cs.unibo.it>
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * For more information, please visit the project's home page
+ * http://helm.cs.unibo.it/gtkmathview-bonobo
+ * or send an email to <lpadovan@cs.unibo.it>
+ */
 
 #include <config.h>
 
@@ -212,7 +213,7 @@ find_common_ancestor(GdomeElement* first, GdomeElement* last)
 }
 
 extern "C" GdomeElement*
-find_self_or_ancestor(GdomeElement* elem, const char* uri, const char* name)
+find_self_or_ancestor(GdomeElement* elem, const gchar* uri, const gchar* name)
 {
   DOM::Element el(elem);
 
@@ -291,7 +292,7 @@ find_hyperlink(GdomeElement* elem)
 
 extern "C" GdomeElement*
 find_element_by_id(GdomeElement* root, GdomeDOMString* ns_uri, GdomeDOMString* name,
-                  const char* id)
+                  const gchar* id)
 {
   DOM::Element el = findElementById(DOM::Element(root),
                                    DOM::GdomeString(ns_uri), DOM::GdomeString(name),
index 50abcd40963ac73339e5d7c1094f8fe17d7757e3..e7cedd2cd68ee80f1a10195c03af0568d0eed65e 100644 (file)
@@ -1,3 +1,25 @@
+/* This file is part of GtkMathView-Bonobo, a Bonobo wrapper for GtkMathView.
+ * Copyright (C) 2003 Luca Padovani <lpadovan@cs.unibo.it>
+ *                    Pouria Masoudi <pmasoudi@cs.unibo.it>
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * For more information, please visit the project's home page
+ * http://helm.cs.unibo.it/gtkmathview-bonobo
+ * or send an email to <lpadovan@cs.unibo.it>
+ */
 
 #ifndef __aux_h__
 #define __aux_h__
@@ -9,10 +31,12 @@ extern "C" {
 #endif
 
   void action_toggle(GdomeElement*);
+  GdomeElement* find_common_ancestor(GdomeElement*, GdomeElement*);
+  GdomeElement* find_self_or_ancestor(GdomeElement*, const gchar*, const gchar*);
   GdomeElement* find_element_with_id(GdomeElement*, GdomeDOMString*, GdomeDOMString*);
   GdomeDOMString* find_hyperlink(GdomeElement*);
   GdomeElement* find_element_by_id(GdomeElement*, GdomeDOMString*, GdomeDOMString*,
-                                  const char*);
+                                  const gchar*);
 
 #ifdef __cplusplus
 }
index b96e993383a3b20d2207b3716d6529dfe70d24ee..8668a3867b87f79aca1bf72557d94aa71c59457c 100644 (file)
@@ -1,3 +1,29 @@
+/* This file is part of GtkMathView-Bonobo, a Bonobo wrapper for GtkMathView.
+ * Copyright (C) 2003 Luca Padovani <lpadovan@cs.unibo.it>
+ *                    Pouria Masoudi <pmasoudi@cs.unibo.it>
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * For more information, please visit the project's home page
+ * http://helm.cs.unibo.it/gtkmathview-bonobo
+ * or send an email to <lpadovan@cs.unibo.it>
+ */
+
+#include <config.h>
+
+#include <gdome.h>
 
 #include "control-data.h"
 
@@ -8,8 +34,8 @@ gtk_math_view_control_data_new(GtkMathView *math_view)
   cd->math_view = math_view;
   cd->first_selected = NULL;
   cd->root_selected = NULL;
-  cd->id_ns_uri = NULL;
-  cd->id_name = NULL;
+  cd->id_ns_uri = gdome_str_mkref("http://www.cs.unibo.it/helm");
+  cd->id_name = gdome_str_mkref("xref");
   return cd;
 }
 
@@ -44,21 +70,32 @@ gtk_math_view_control_data_destroy(GtkMathViewControlData* cd)
   g_free(cd);
 }
 
+gchar*
+gtk_math_view_control_data_get_id_ns_uri(GtkMathViewControlData* cd)
+{
+  g_return_val_if_fail(cd != NULL, NULL);
+  return (cd->id_ns_uri != NULL) ? g_strdup(cd->id_ns_uri->str) : NULL;
+}
+                                        
 void
-gtk_math_view_control_data_set_id_attribute(GtkMathViewControlData* cd,
-                                           const char* ns_uri, const char* name)
+gtk_math_view_control_data_set_id_ns_uri(GtkMathViewControlData* cd, const gchar* ns_uri)
 {
   g_return_if_fail(cd != NULL);
-  if (cd->id_ns_uri != NULL)
-    {
-      gdome_str_unref(cd->id_ns_uri);
-      cd->id_ns_uri = NULL;
-    }
-  if (cd->id_name != NULL)
-    {
-      gdome_str_unref(cd->id_name);
-      cd->id_name = NULL;
-    }
-  if (ns_uri) cd->id_ns_uri = gdome_str_mkref(ns_uri);
-  if (name) cd->id_name = gdome_str_mkref(name);
+  if (cd->id_ns_uri != NULL) gdome_str_unref(cd->id_ns_uri);
+  cd->id_ns_uri = (ns_uri != NULL) ? gdome_str_mkref_dup(ns_uri) : NULL;
+}
+
+gchar*
+gtk_math_view_control_data_get_id_name(GtkMathViewControlData* cd)
+{
+  g_return_val_if_fail(cd != NULL, NULL);
+  return (cd->id_name != NULL) ? g_strdup(cd->id_name->str) : NULL;
+}
+                                        
+void
+gtk_math_view_control_data_set_id_name(GtkMathViewControlData* cd, const gchar* name)
+{
+  g_return_if_fail(cd != NULL);
+  if (cd->id_name != NULL) gdome_str_unref(cd->id_name);
+  cd->id_name = (name != NULL) ? gdome_str_mkref_dup(name) : NULL;
 }
index 089ed688f046d02fdb4216d553da73c574cedaa8..8f81c12a8c5b22e5922178bdfef9cfc5317554c4 100644 (file)
@@ -1,3 +1,25 @@
+/* This file is part of GtkMathView-Bonobo, a Bonobo wrapper for GtkMathView.
+ * Copyright (C) 2003 Luca Padovani <lpadovan@cs.unibo.it>
+ *                    Pouria Masoudi <pmasoudi@cs.unibo.it>
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * For more information, please visit the project's home page
+ * http://helm.cs.unibo.it/gtkmathview-bonobo
+ * or send an email to <lpadovan@cs.unibo.it>
+ */
 
 #ifndef __control_data_h__
 #define __control_data_h__
@@ -16,7 +38,9 @@ typedef struct _GtkMathViewControlData
 
 GtkMathViewControlData* gtk_math_view_control_data_new(GtkMathView*);
 void gtk_math_view_control_data_destroy(GtkMathViewControlData*);
-void gtk_math_view_control_data_set_id_attribute(GtkMathViewControlData*,
-                                                const char*, const char*);
+gchar* gtk_math_view_control_data_get_id_ns_uri(GtkMathViewControlData*);
+void gtk_math_view_control_data_set_id_ns_uri(GtkMathViewControlData*, const gchar*);
+gchar* gtk_math_view_control_data_get_id_name(GtkMathViewControlData*);
+void gtk_math_view_control_data_set_id_name(GtkMathViewControlData*, const gchar*);
 
 #endif // __control_data_h__
index c5fe901501cea4b6250a43ad55c98dabbfdc2a76..847d9f4f6106358b2fa0848aba85fa3cef10f208 100644 (file)
@@ -1,10 +1,37 @@
+/* This file is part of GtkMathView-Bonobo, a Bonobo wrapper for GtkMathView.
+ * Copyright (C) 2003 Luca Padovani <lpadovan@cs.unibo.it>
+ *                    Pouria Masoudi <pmasoudi@cs.unibo.it>
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * For more information, please visit the project's home page
+ * http://helm.cs.unibo.it/gtkmathview-bonobo
+ * or send an email to <lpadovan@cs.unibo.it>
+ */
+
+#include <config.h>
 
 #include <bonobo.h>
 #include <bonobo/bonobo-shlib-factory.h>
 #include <gtkmathview.h>
+
 #include "control-factory.h"
-#include "handlers.h"
 #include "control-data.h"
+#include "persist-file.h"
+#include "persist-stream.h"
+#include "handlers.h"
 #include "view.h"
 
 enum
@@ -14,10 +41,9 @@ enum
     MATH_VIEW_TOP_X,
     MATH_VIEW_TOP_Y,
     MATH_VIEW_FONT_SIZE,
-    MATH_VIEW_ANTI_ALIASING,
-    MATH_VIEW_TRANSPARENCY,
     MATH_VIEW_VERBOSITY,
-    MATH_VIEW_FONT_MANAGER
+    MATH_VIEW_ID_NS_URI,
+    MATH_VIEW_ID_NAME
   } math_args;
 
 static void
@@ -27,80 +53,54 @@ get_prop(BonoboPropertyBag* bag,
         CORBA_Environment *ev,
         gpointer user_data)
 {
-  GtkMathView *math_view;
-
-  g_return_if_fail(GTK_IS_MATH_VIEW(user_data));
-
-  math_view = GTK_MATH_VIEW(user_data);
+  GtkMathViewControlData* control_data = user_data;
+  g_assert(control_data != NULL);
 
   switch (arg_id)
     {
     case MATH_VIEW_WIDTH:
-      {
-       gint i = gtk_math_view_get_width(math_view);
-       g_assert(arg->_type == BONOBO_ARG_INT);
-       BONOBO_ARG_SET_INT(arg,i);
-      }
+      BONOBO_ARG_SET_INT(arg, gtk_math_view_get_width(control_data->math_view));
       break;
     case MATH_VIEW_HEIGHT:
-      {
-       guint i = gtk_math_view_get_height(math_view);
-       g_assert(arg->_type == BONOBO_ARG_INT);
-       BONOBO_ARG_SET_INT(arg,i);      
-      }
+      BONOBO_ARG_SET_INT(arg, gtk_math_view_get_height(control_data->math_view));
       break;
     case MATH_VIEW_TOP_X:
       {
-       guint new_top_y,new_top_x;
-       g_assert(arg->_type == BONOBO_ARG_INT);
-       gtk_math_view_get_top(math_view,&new_top_x, &new_top_y);
-       BONOBO_ARG_SET_INT(arg,new_top_x);
+       guint top_x;
+       gtk_math_view_get_top(control_data->math_view, &top_x, NULL);
+       BONOBO_ARG_SET_INT(arg, top_x);
       }
       break;
     case MATH_VIEW_TOP_Y:
       {
-       guint new_top_y,new_top_x;
-       g_assert(arg->_type == BONOBO_ARG_INT);
-       gtk_math_view_get_top(math_view,&new_top_x,&new_top_y);
-       BONOBO_ARG_SET_INT(arg,new_top_y);
+       guint top_y;
+       gtk_math_view_get_top(control_data->math_view, NULL, &top_y);
+       BONOBO_ARG_SET_INT(arg, top_y);
       }                
       break;
     case MATH_VIEW_FONT_SIZE:
-      {
-       guint i = gtk_math_view_get_font_size(math_view);
-       g_assert(arg->_type == BONOBO_ARG_INT);
-       BONOBO_ARG_SET_INT(arg,i);
-      }
-      break;
-    case MATH_VIEW_ANTI_ALIASING:
-      {
-       gboolean i = gtk_math_view_get_anti_aliasing(math_view);
-       g_assert(arg->_type == BONOBO_ARG_BOOLEAN);
-       BONOBO_ARG_SET_BOOLEAN(arg,i);
-      }
-      break;
-    case MATH_VIEW_TRANSPARENCY:
-      {
-       gboolean i = gtk_math_view_get_transparency(math_view);
-       g_assert(arg->_type == BONOBO_ARG_BOOLEAN);
-       BONOBO_ARG_SET_BOOLEAN(arg,i);
-      }
+      BONOBO_ARG_SET_INT(arg, gtk_math_view_get_font_size(control_data->math_view));
       break;
     case MATH_VIEW_VERBOSITY:
+      BONOBO_ARG_SET_INT(arg, gtk_math_view_get_log_verbosity(control_data->math_view));
+      break;
+    case MATH_VIEW_ID_NS_URI:
       {
-       gint i = gtk_math_view_get_log_verbosity(math_view);
-       g_assert(arg->_type == BONOBO_ARG_INT);
-       BONOBO_ARG_SET_INT(arg,i);
+       gchar* id_ns_uri = gtk_math_view_control_data_get_id_ns_uri(control_data);
+       BONOBO_ARG_SET_STRING(arg, id_ns_uri);
+       g_free(id_ns_uri);
       }
       break;
-    case MATH_VIEW_FONT_MANAGER:
+    case MATH_VIEW_ID_NAME:
       {
-       gint i = (gint) gtk_math_view_get_font_manager_type(math_view);
-       BONOBO_ARG_SET_INT(arg,i);
+       gchar* id_name = gtk_math_view_control_data_get_id_name(control_data);
+       BONOBO_ARG_SET_STRING(arg, id_name);
+       g_free(id_name);
       }
       break;
     default:
-      g_assert(FALSE);
+      bonobo_exception_set (ev, ex_Bonobo_PropertyBag_NotFound);
+      break;
     }
 }
 
@@ -111,63 +111,36 @@ set_prop(BonoboPropertyBag* bag,
         CORBA_Environment* ev,
         gpointer user_data)
 {
-  GtkMathView *math_view;
-
-  g_return_if_fail(GTK_IS_MATH_VIEW(user_data));
-
-  math_view = GTK_MATH_VIEW(user_data);
+  GtkMathViewControlData *control_data = user_data;
+  g_assert(control_data != NULL);
 
   switch (arg_id)
     {
     case MATH_VIEW_TOP_X:
       {
        guint old_top_y;
-       g_assert(arg->_type == BONOBO_ARG_INT);
-       gtk_math_view_get_top(math_view, NULL, &old_top_y);
-       gtk_math_view_set_top(math_view, BONOBO_ARG_GET_INT(arg), old_top_y);
+       gtk_math_view_get_top(control_data->math_view, NULL, &old_top_y);
+       gtk_math_view_set_top(control_data->math_view, BONOBO_ARG_GET_INT(arg), old_top_y);
       }
       break;
     case MATH_VIEW_TOP_Y:
       {
        guint old_top_x;
-       g_assert(arg->_type == BONOBO_ARG_INT);
-       gtk_math_view_get_top(math_view, &old_top_x, NULL);
-       gtk_math_view_set_top(math_view, BONOBO_ARG_GET_INT(arg), old_top_x);
+       gtk_math_view_get_top(control_data->math_view, &old_top_x, NULL);
+       gtk_math_view_set_top(control_data->math_view, BONOBO_ARG_GET_INT(arg), old_top_x);
       }
       break;
     case MATH_VIEW_FONT_SIZE:
-      {
-       guint i = gtk_math_view_get_font_size(math_view);
-       g_assert(arg->_type == BONOBO_ARG_INT);
-       BONOBO_ARG_SET_INT(arg,i);
-      }
-      break;
-    case MATH_VIEW_ANTI_ALIASING:
-      {
-       gboolean i = gtk_math_view_get_anti_aliasing(math_view);
-       g_assert(arg->_type == BONOBO_ARG_BOOLEAN);
-       BONOBO_ARG_SET_BOOLEAN(arg,i);
-      }
-      break;
-    case MATH_VIEW_TRANSPARENCY:
-      {
-       gboolean i = gtk_math_view_get_transparency(math_view);
-       g_assert(arg->_type == BONOBO_ARG_BOOLEAN);
-       BONOBO_ARG_SET_BOOLEAN(arg,i);
-      }
+      gtk_math_view_set_font_size(control_data->math_view, BONOBO_ARG_GET_INT(arg));
       break;
     case MATH_VIEW_VERBOSITY:
-      {
-       gint i = gtk_math_view_get_log_verbosity(math_view);
-       g_assert(arg->_type == BONOBO_ARG_INT);
-       BONOBO_ARG_SET_INT(arg,i);
-      }
+      gtk_math_view_set_log_verbosity(control_data->math_view, BONOBO_ARG_GET_INT(arg));
       break;
-    case MATH_VIEW_FONT_MANAGER:
-      {
-       gint i = (gint) gtk_math_view_get_font_manager_type(math_view);
-       BONOBO_ARG_SET_INT(arg,i);
-      }
+    case MATH_VIEW_ID_NS_URI:
+      gtk_math_view_control_data_set_id_ns_uri(control_data, BONOBO_ARG_GET_STRING(arg));
+      break;
+    case MATH_VIEW_ID_NAME:
+      gtk_math_view_control_data_set_id_name(control_data, BONOBO_ARG_GET_STRING(arg));
       break;
     default:
       bonobo_exception_set (ev, ex_Bonobo_PropertyBag_NotFound);
@@ -212,36 +185,41 @@ gtk_math_view_control_init(BonoboControl *control, GtkWidget *scrolled_window)
   persist_stream = gtk_math_view_persist_stream_new(GTK_MATH_VIEW(math_view));
   bonobo_object_add_interface(BONOBO_OBJECT(control), persist_stream);
 
-  prop_bag = bonobo_property_bag_new(get_prop, set_prop, math_view);
+  prop_bag = bonobo_property_bag_new(get_prop, set_prop, control_data);
   bonobo_control_set_properties(control, BONOBO_OBJREF(prop_bag), NULL);
        
-  bonobo_property_bag_add(prop_bag,"width",
+  bonobo_property_bag_add(prop_bag, "width",
                          MATH_VIEW_WIDTH, BONOBO_ARG_INT,
-                         NULL,"width",0);
-  bonobo_property_bag_add(prop_bag,"height",
+                         NULL,
+                         "Width of the view", 0);
+  bonobo_property_bag_add(prop_bag, "height",
                          MATH_VIEW_HEIGHT, BONOBO_ARG_INT,
-                         NULL,"height",0);
-  bonobo_property_bag_add(prop_bag,"top_x",
+                         NULL,
+                         "Height of the view", 0);
+  bonobo_property_bag_add(prop_bag, "top-x",
                          MATH_VIEW_TOP_X, BONOBO_ARG_INT,
-                         NULL,"top_x",0);
-  bonobo_property_bag_add(prop_bag,"top_y",
+                         NULL,
+                         "X coordinate of the top-left corner", 0);
+  bonobo_property_bag_add(prop_bag, "top-y",
                          MATH_VIEW_TOP_Y, BONOBO_ARG_INT,
-                         NULL,"top_y",0);
-  bonobo_property_bag_add(prop_bag,"font_size",
+                         NULL, 
+                         "Y coordinate of the top-left corner", 0);
+  bonobo_property_bag_add(prop_bag, "font-size",
                          MATH_VIEW_FONT_SIZE, BONOBO_ARG_INT,
-                         NULL,"font_size",0);
-  bonobo_property_bag_add(prop_bag,"anti_aliasing",
-                         MATH_VIEW_ANTI_ALIASING, BONOBO_ARG_BOOLEAN,
-                         NULL,"anti_aliasing",0);
-  bonobo_property_bag_add(prop_bag,"transparency",
-                         MATH_VIEW_TRANSPARENCY, BONOBO_ARG_BOOLEAN,
-                         NULL,"transparency",0);
+                         NULL,
+                         "Default font size", 0);
   bonobo_property_bag_add(prop_bag,"verbosity",
                          MATH_VIEW_VERBOSITY, BONOBO_ARG_INT,
-                         NULL,"verbosity",0);
-  bonobo_property_bag_add(prop_bag,"font_manager",
-                         MATH_VIEW_FONT_MANAGER, BONOBO_ARG_INT,
-                         NULL,"font_manager",0);
+                         NULL,
+                         "Verbosity level", 0);
+  bonobo_property_bag_add(prop_bag, "id-ns-uri",
+                         MATH_VIEW_ID_NS_URI, BONOBO_ARG_STRING,
+                         NULL,
+                         "Namespace URI of ID attribute", 0);
+  bonobo_property_bag_add(prop_bag, "id-name",
+                         MATH_VIEW_ID_NAME, BONOBO_ARG_STRING,
+                         NULL,
+                         "Name of ID attribute", 0);
 
   bonobo_object_unref(BONOBO_OBJECT(prop_bag));
   
index e91e8a7a5c18e1076a7805bf6f4e6b833b3e01c5..0d2e5a24dd70f5c2cb6d55672040c1db7ff52d57 100644 (file)
@@ -1,21 +1,24 @@
-/*
- * gtk_math_view_bonobo.c
- * This file is part of gedit
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
+/* This file is part of GtkMathView-Bonobo, a Bonobo wrapper for GtkMathView.
+ * Copyright (C) 2003 Luca Padovani <lpadovan@cs.unibo.it>
+ *                    Pouria Masoudi <pmasoudi@cs.unibo.it>
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, 
- * Boston, MA 02111-1307, USA.
+ * For more information, please visit the project's home page
+ * http://helm.cs.unibo.it/gtkmathview-bonobo
+ * or send an email to <lpadovan@cs.unibo.it>
  */
 
 #ifndef __control_factory_h__
index e7e100aa22125e2d6a59ddb6183ba5b851360164..85479ed1b61a129b5a4466fae9f7bdb2d2c0880d 100644 (file)
@@ -1,4 +1,29 @@
+/* This file is part of GtkMathView-Bonobo, a Bonobo wrapper for GtkMathView.
+ * Copyright (C) 2003 Luca Padovani <lpadovan@cs.unibo.it>
+ *                    Pouria Masoudi <pmasoudi@cs.unibo.it>
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * For more information, please visit the project's home page
+ * http://helm.cs.unibo.it/gtkmathview-bonobo
+ * or send an email to <lpadovan@cs.unibo.it>
+ */
 
+#include <config.h>
+
+#include "aux.h"
 #include "handlers.h"
 
 static void
index 81b1eb70bd68239adc24da95b6d0e60a786be914..529a13d7b7d9b9b4aacba227c9a458d55fd31033 100644 (file)
@@ -1,3 +1,25 @@
+/* This file is part of GtkMathView-Bonobo, a Bonobo wrapper for GtkMathView.
+ * Copyright (C) 2003 Luca Padovani <lpadovan@cs.unibo.it>
+ *                    Pouria Masoudi <pmasoudi@cs.unibo.it>
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * For more information, please visit the project's home page
+ * http://helm.cs.unibo.it/gtkmathview-bonobo
+ * or send an email to <lpadovan@cs.unibo.it>
+ */
 
 #ifndef __handlers_h__
 #define __handlers_h__
index 9f2da1bee4599b5cba70698df7b81913c73b8c45..1d3fd36c672b9b34fed7cf0482bfac4d09a4581d 100644 (file)
@@ -1,27 +1,54 @@
+/* This file is part of GtkMathView-Bonobo, a Bonobo wrapper for GtkMathView.
+ * Copyright (C) 2003 Luca Padovani <lpadovan@cs.unibo.it>
+ *                    Pouria Masoudi <pmasoudi@cs.unibo.it>
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * For more information, please visit the project's home page
+ * http://helm.cs.unibo.it/gtkmathview-bonobo
+ * or send an email to <lpadovan@cs.unibo.it>
+ */
+
+#include <config.h>
+
 #include <bonobo.h>
 #include <gtkmathview.h>
 #include <glib.h>
+
 #include "persist-file.h"
 #include "control-factory.h"
 
 static BonoboObjectClass *gtk_math_view_persist_file_parent_class;
 
 static void load_implementation(PortableServer_Servant servant,const gchar *path,
-               CORBA_Environment *ev); 
+                               CORBA_Environment *ev); 
 
 static void save_implementation(PortableServer_Servant servant,const gchar *path,
-               CORBA_Environment *ev);
+                               CORBA_Environment *ev);
 
 static void finalize(GObject *object)
 {
-       GtkMathViewPersistFile *file = GTK_MATH_VIEW_PERSIST_FILE(object);
+  GtkMathViewPersistFile *file = GTK_MATH_VIEW_PERSIST_FILE(object);
 
-       if(file->math_view){
-               g_object_unref(file->math_view);
-               file->math_view = NULL;
-       }
+  if (file->math_view)
+    {
+      g_object_unref(file->math_view);
+      file->math_view = NULL;
+    }
 
-       G_OBJECT_CLASS(gtk_math_view_persist_file_parent_class)->finalize (object);
+  G_OBJECT_CLASS(gtk_math_view_persist_file_parent_class)->finalize (object);
 }
 
 static Bonobo_Persist_ContentTypeList *
@@ -30,53 +57,49 @@ get_content_types(BonoboPersist *persist,CORBA_Environment *ev)
   return bonobo_persist_generate_content_types(3, "application/mathml+xml", "text/mathml", "text/plain");
 }
 
-
 static void 
 gtk_math_view_persist_file_class_init(GtkMathViewPersistFileClass *klass)
 {
-       GObjectClass *object_class = G_OBJECT_CLASS(klass);
-       BonoboPersistClass *persist_class = BONOBO_PERSIST_CLASS(klass);
-       POA_Bonobo_PersistFile__epv *epv = &klass->epv;
+  GObjectClass *object_class = G_OBJECT_CLASS(klass);
+  BonoboPersistClass *persist_class = BONOBO_PERSIST_CLASS(klass);
+  POA_Bonobo_PersistFile__epv *epv = &klass->epv;
 
-#ifdef DEBUG
-       printf("persist file class init\n");
-#endif
-       gtk_math_view_persist_file_parent_class = g_type_class_peek_parent(klass);
+  gtk_math_view_persist_file_parent_class = g_type_class_peek_parent(klass);
 
-       epv->load = load_implementation;
-       epv->save = save_implementation;
+  epv->load = load_implementation;
+  epv->save = save_implementation;
 
-       object_class->finalize = finalize;
-       persist_class->get_content_types = get_content_types;
+  object_class->finalize = finalize;
+  persist_class->get_content_types = get_content_types;
 }
 
 GType 
 gtk_math_view_persist_file_get_type(void)
 {
-       static GType type = 0;
-#ifdef DEBUG
-       printf("persist file get type\n");
-#endif
-       if(!type){
-               GTypeInfo info = {
-                       sizeof(GtkMathViewPersistFileClass),
-                       (GBaseInitFunc) NULL,
-                       (GBaseFinalizeFunc) NULL,
-                       (GClassInitFunc) gtk_math_view_persist_file_class_init,
-                       NULL,  /* class finalize */
-                       NULL,  /* class_data */
-                       sizeof(GtkMathViewPersistFile),
-                       0,   /* n_preallocs */
-                       (GInstanceInitFunc) NULL
-               };
-
-               type = bonobo_type_unique(
-                               BONOBO_TYPE_PERSIST,
+  static GType type = 0;
+
+  if (!type)
+    {
+      GTypeInfo info =
+       {
+         sizeof(GtkMathViewPersistFileClass),
+         (GBaseInitFunc) NULL,
+         (GBaseFinalizeFunc) NULL,
+         (GClassInitFunc) gtk_math_view_persist_file_class_init,
+         NULL,  /* class finalize */
+         NULL,  /* class_data */
+         sizeof(GtkMathViewPersistFile),
+         0,   /* n_preallocs */
+         (GInstanceInitFunc) NULL
+       };
+
+      type = bonobo_type_unique(BONOBO_TYPE_PERSIST,
                                POA_Bonobo_PersistFile__init,POA_Bonobo_PersistFile__fini,
                                G_STRUCT_OFFSET(GtkMathViewPersistFileClass, epv),
                                &info,"GtkMathViewPresistFile");
-       }
-       return type;
+    }
+
+  return type;
 }
 
 BonoboObject *
@@ -84,17 +107,12 @@ gtk_math_view_persist_file_new(GtkMathView *math_view)
 {
   BonoboObject *file;
 
-  printf("persist file new\n");
   file = g_object_new(gtk_math_view_persist_file_get_type(),NULL);
   bonobo_persist_construct(BONOBO_PERSIST(file),CONTROL_FACTORY_ID);
 
   g_object_ref(math_view);
   GTK_MATH_VIEW_PERSIST_FILE(file)->math_view = math_view;
 
-#ifdef DEBUG
-  printf("gtk_math_view_persist_file_new passed\n");
-#endif
-
   return file;
 }
 
@@ -105,16 +123,11 @@ load_implementation(PortableServer_Servant servant,const gchar *path,CORBA_Envir
   GtkMathViewPersistFile* file = GTK_MATH_VIEW_PERSIST_FILE(bonobo_object_from_servant(servant));
   //fd = open(path, O_RDONLY);
 
-  printf("passing from here LOAD\n");
-
   result = gtk_math_view_load_uri(file->math_view,path);
   if(!result)
-    {
-      printf("exception here!\n");
-      CORBA_exception_set(ev,CORBA_USER_EXCEPTION,ex_Bonobo_Persist_WrongDataType,NULL);
-    }
+    CORBA_exception_set(ev,CORBA_USER_EXCEPTION,ex_Bonobo_Persist_WrongDataType,NULL);
+
   bonobo_object_unref(BONOBO_OBJECT(file));
-  return ;
 }
 
 static void
@@ -122,8 +135,7 @@ save_implementation(PortableServer_Servant servant,
                     const gchar *path,
                     CORBA_Environment *ev)
 {
-       bonobo_exception_set(ev,"save_exception");
-       bonobo_exception_add_handler_str("save_exception",
-                                         "Save option is not valid");
-       return;
+  bonobo_exception_set(ev,"save_exception");
+  bonobo_exception_add_handler_str("save_exception",
+                                  "Save option is not valid");
 }
index 0ed7bcbf96534835743d18ab24bcc65efba42b56..6f70e76effd70ca6ff09ee913e9418224ae4d9a2 100644 (file)
@@ -1,3 +1,26 @@
+/* This file is part of GtkMathView-Bonobo, a Bonobo wrapper for GtkMathView.
+ * Copyright (C) 2003 Luca Padovani <lpadovan@cs.unibo.it>
+ *                    Pouria Masoudi <pmasoudi@cs.unibo.it>
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * For more information, please visit the project's home page
+ * http://helm.cs.unibo.it/gtkmathview-bonobo
+ * or send an email to <lpadovan@cs.unibo.it>
+ */
+
 #ifndef __GTK_MATH_VIEW_PERSIST_FILE_H__
 #define __GTK_MATH_VIEW_PERSIST_FILE_H__
 
@@ -10,29 +33,28 @@ struct _GtkMathViewPersistFile;
 typedef struct _GtkMathViewPersistFile GtkMathViewPersistFile;
 typedef struct _GtkMathViewPersistFilePrivate GtkMathViewPersistFilePrivate;
 
-#define GTK_MATH_VIEW_TYPE_PERSIST_FILE                (gtk_math_view_persist_file_get_type())
-
-#define GTK_MATH_VIEW_PERSIST_FILE(object)             (G_TYPE_CHECK_INSTANCE_CAST((object), GTK_MATH_VIEW_TYPE_PERSIST_FILE, \
+#define GTK_MATH_VIEW_TYPE_PERSIST_FILE (gtk_math_view_persist_file_get_type())
+#define GTK_MATH_VIEW_PERSIST_FILE(object) (G_TYPE_CHECK_INSTANCE_CAST((object), GTK_MATH_VIEW_TYPE_PERSIST_FILE, \
                        GtkMathViewPersistFile))
-
-#define GTK_MATH_VIEW_IS_PERSIST_FILE(object)  (G_TYPE_CHECK_INSTANCE_TYPE((object),\
-                                               GTK_MATH_VIEW_TYPE_PERSIST_FILE))
-#define GTK_MATH_VIEW_IS_PERSIST_FILE_CLASS(klass)     (G_TYPE_CHECK_CLASS_TYPE ((klass),\
+#define GTK_MATH_VIEW_IS_PERSIST_FILE(object) (G_TYPE_CHECK_INSTANCE_TYPE((object),\
+                                              GTK_MATH_VIEW_TYPE_PERSIST_FILE))
+#define GTK_MATH_VIEW_IS_PERSIST_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),\
                                                GTK_MATH_VIEW_TYPE_PERSIST_FILE))
 
-struct _GtkMathViewPersistFile{
-       BonoboPersist parent;
-       GtkMathView     *math_view;
+struct _GtkMathViewPersistFile
+{
+  BonoboPersist parent;
+  GtkMathView  *math_view;
 };
 
-typedef struct {
-       BonoboPersistClass      parent_class;
-
-       POA_Bonobo_PersistFile__epv epv;
-}GtkMathViewPersistFileClass;
+typedef struct
+{
+  BonoboPersistClass   parent_class;
+  POA_Bonobo_PersistFile__epv epv;
+} GtkMathViewPersistFileClass;
 
-GType          gtk_math_view_persist_file_get_type(void);
-BonoboObject   *gtk_math_view_persist_file_new(GtkMathView *math_view);
+GType gtk_math_view_persist_file_get_type(void);
+BonoboObject *gtk_math_view_persist_file_new(GtkMathView *);
 
 G_END_DECLS
 
index f971b721be07fea138935fd1c1bc450133903b84..bef7d90cb6218bea4f7f953a955a2114137be7e2 100644 (file)
@@ -1,10 +1,35 @@
+/* This file is part of GtkMathView-Bonobo, a Bonobo wrapper for GtkMathView.
+ * Copyright (C) 2003 Luca Padovani <lpadovan@cs.unibo.it>
+ *                    Pouria Masoudi <pmasoudi@cs.unibo.it>
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * For more information, please visit the project's home page
+ * http://helm.cs.unibo.it/gtkmathview-bonobo
+ * or send an email to <lpadovan@cs.unibo.it>
+ */
+
+#include <config.h>
+
 #include <bonobo.h>
 #include <gtkmathview.h>
-#include <glib.h>
+
 #include "persist-stream.h"
 #include "control-factory.h"
 
-#define DEBUG
+#define DEBUG0
 
 static BonoboObjectClass *gtk_math_view_persist_stream_parent_class;
 
@@ -20,14 +45,15 @@ static void save_implementation(PortableServer_Servant servant,
 
 static void finalize(GObject *object)
 {
-    GtkMathViewPersistStream *stream = GTK_MATH_VIEW_PERSIST_STREAM(object);
+  GtkMathViewPersistStream *stream = GTK_MATH_VIEW_PERSIST_STREAM(object);
 
-    if(stream->math_view){
-        g_object_unref(stream->math_view);
-        stream->math_view = NULL;
+  if (stream->math_view != NULL) 
+    {
+      g_object_unref(stream->math_view);
+      stream->math_view = NULL;
     }
 
-    G_OBJECT_CLASS(gtk_math_view_persist_stream_parent_class)->finalize(object);
+  G_OBJECT_CLASS(gtk_math_view_persist_stream_parent_class)->finalize(object);
 }
 
 static Bonobo_Persist_ContentTypeList *
@@ -39,87 +65,92 @@ get_content_types(BonoboPersist *persist,CORBA_Environment *ev)
 static void 
 gtk_math_view_persist_stream_class_init(GtkMathViewPersistStreamClass *klass)
 {
-    GObjectClass *object_class = G_OBJECT_CLASS(klass);
-    BonoboPersistClass *persist_class = BONOBO_PERSIST_CLASS(klass);
-    POA_Bonobo_PersistStream__epv *epv = &klass->epv;
+  GObjectClass *object_class = G_OBJECT_CLASS(klass);
+  BonoboPersistClass *persist_class = BONOBO_PERSIST_CLASS(klass);
+  POA_Bonobo_PersistStream__epv *epv = &klass->epv;
 
 #ifdef DEBUG
-    printf("persist stream class init\n");
+  printf("persist stream class init\n");
 #endif
-    gtk_math_view_persist_stream_parent_class = g_type_class_peek_parent(klass);
+  gtk_math_view_persist_stream_parent_class = g_type_class_peek_parent(klass);
 
-    epv->load = load_implementation;
-    epv->save = save_implementation;
+  epv->load = load_implementation;
+  epv->save = save_implementation;
 
-    object_class->finalize = finalize;
-    persist_class->get_content_types = get_content_types;
+  object_class->finalize = finalize;
+  persist_class->get_content_types = get_content_types;
 }
 
 GType
 gtk_math_view_persist_stream_get_type(void)
 {
-    static GType type = 0;
+  static GType type = 0;
 #ifdef DEBUG
-    printf("persist stream get type\n");
+  printf("persist stream get type\n");
 #endif
-    if(!type){
-        GTypeInfo info={
-            sizeof(GtkMathViewPersistStreamClass),
-            (GBaseInitFunc) NULL,
-            (GBaseFinalizeFunc) NULL,
-            (GClassInitFunc) gtk_math_view_persist_stream_class_init,
-            NULL,   /*class finalize */
-            NULL,   /*class data */
-            sizeof(GtkMathViewPersistStream),
-            0,  /* n_preallocs */
-            (GInstanceInitFunc) NULL
-        };
-
-        type = bonobo_type_unique(
-                                  BONOBO_TYPE_PERSIST,
-                                  POA_Bonobo_PersistStream__init,POA_Bonobo_PersistStream__fini,
-                                  G_STRUCT_OFFSET(GtkMathViewPersistStreamClass,epv),
-                                  &info,"GtkMathViewPersistStream");
+  if (!type)
+    {
+      GTypeInfo info = 
+       {
+         sizeof(GtkMathViewPersistStreamClass),
+         (GBaseInitFunc) NULL,
+         (GBaseFinalizeFunc) NULL,
+         (GClassInitFunc) gtk_math_view_persist_stream_class_init,
+         NULL,   /*class finalize */
+         NULL,   /*class data */
+         sizeof(GtkMathViewPersistStream),
+         0,  /* n_preallocs */
+         (GInstanceInitFunc) NULL
+       };
+
+      type = bonobo_type_unique(BONOBO_TYPE_PERSIST,
+                               POA_Bonobo_PersistStream__init,POA_Bonobo_PersistStream__fini,
+                               G_STRUCT_OFFSET(GtkMathViewPersistStreamClass,epv),
+                               &info,"GtkMathViewPersistStream");
     }
-    return type;
+
+  return type;
 }
 
 BonoboObject *
 gtk_math_view_persist_stream_new(GtkMathView *math_view)
 {
-    BonoboObject *stream;
+  BonoboObject *stream;
 
 #ifdef DEBUG
-    printf("persist stream new\n");
+  printf("persist stream new\n");
 #endif
-    stream = g_object_new(gtk_math_view_persist_stream_get_type(),NULL);
-    bonobo_persist_construct(BONOBO_PERSIST(stream),CONTROL_FACTORY_ID);
+  stream = g_object_new(gtk_math_view_persist_stream_get_type(),NULL);
+  bonobo_persist_construct(BONOBO_PERSIST(stream),CONTROL_FACTORY_ID);
 
-    g_object_ref(math_view);
-    GTK_MATH_VIEW_PERSIST_STREAM(stream)->math_view = math_view;
+  g_object_ref(math_view);
+  GTK_MATH_VIEW_PERSIST_STREAM(stream)->math_view = math_view;
 
-    return stream;
+  return stream;
 }
 
 static FILE*
 create_tmp_file(GtkMathViewPersistStream *persist)
 {
-    FILE *tmpfile;
-    int fd;
+  FILE *tmpfile;
+  int fd;
     
-    persist->tmp_path_name = g_strconcat(g_get_tmp_dir(), "/gmvXXXXXX", NULL);
-    if((fd = mkstemp(persist->tmp_path_name)) < 0) {
-        g_free(persist->tmp_path_name),
-        persist->tmp_path_name = NULL;
-        return NULL;
+  persist->tmp_path_name = g_strconcat(g_get_tmp_dir(), "/gmvXXXXXX", NULL);
+  if ((fd = mkstemp(persist->tmp_path_name)) < 0)
+    {
+      g_free(persist->tmp_path_name),
+       persist->tmp_path_name = NULL;
+      return NULL;
     }
-    printf("salvo nel file %s\n", persist->tmp_path_name);
-    tmpfile = fdopen(fd, "w");
-    if(!tmpfile) {
-        close(fd);
-        return NULL;
+
+  tmpfile = fdopen(fd, "w");
+  if(!tmpfile)
+    {
+      close(fd);
+      return NULL;
     }
-    return tmpfile;
+
+  return tmpfile;
 }
 
 
@@ -129,57 +160,55 @@ load_implementation(PortableServer_Servant servant,
                     const CORBA_char *type,
                     CORBA_Environment *ev)
 {
-    GtkMathViewPersistStream *persist = GTK_MATH_VIEW_PERSIST_STREAM (bonobo_object_from_servant (servant));
-    Bonobo_Stream_iobuf *buffer;
-    GtkMathViewPersistStream *handle;
-    CORBA_long len_read;
-    gboolean result;
-    FILE *tmpfile;
+  GtkMathViewPersistStream *persist = GTK_MATH_VIEW_PERSIST_STREAM (bonobo_object_from_servant (servant));
+  Bonobo_Stream_iobuf *buffer;
+  GtkMathViewPersistStream *handle;
+  CORBA_long len_read;
+  gboolean result;
+  FILE *tmpfile;
 
 #ifdef DEBUG
-    printf("persist stream loading\n");
+  printf("persist stream loading\n");
 #endif
     
-    printf("type = %s\n", type);
-
-    if (strcmp (type, "application/mathml+xml") != 0) {
-        CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
-                     ex_Bonobo_Persist_WrongDataType, NULL);
-        return;
+  if (strcmp (type, "application/mathml+xml") != 0)
+    {
+      CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
+                          ex_Bonobo_Persist_WrongDataType, NULL);
+      return;
     }
     
-    tmpfile = create_tmp_file(persist);
-    do {
-        Bonobo_Stream_read (stream, 4096, &buffer, ev);
-        if (ev->_major != CORBA_NO_EXCEPTION) {
-            printf("*** eccezione 1 %s\n",ev->_major);
-            goto clean;
-        }
+  tmpfile = create_tmp_file(persist);
+  do
+    {
+      Bonobo_Stream_read (stream, 4096, &buffer, ev);
+      if (ev->_major != CORBA_NO_EXCEPTION)
+       goto clean;
         
-        len_read = buffer->_length;
-           printf("letti %d bytes\n", len_read);
-
-        if (buffer->_buffer && len_read)
-            if(fwrite(buffer->_buffer, 1, len_read, tmpfile) != len_read) {
-                CORBA_free (buffer);
-                   printf("*** eccezione 2\n");
-                goto clean;
-            }
+      len_read = buffer->_length;
+
+      if (buffer->_buffer && len_read)
+       if (fwrite(buffer->_buffer, 1, len_read, tmpfile) != len_read)
+         {
+           CORBA_free (buffer);
+           goto clean;
+         }
         
-        CORBA_free (buffer);
+      CORBA_free (buffer);
     } while (len_read > 0);
 
-    fclose(tmpfile);
-    result = gtk_math_view_load_uri(persist->math_view,persist->tmp_path_name);
-    if(!result)
+  fclose(tmpfile);
+
+  result = gtk_math_view_load_uri(persist->math_view,persist->tmp_path_name);
+  if(!result)
     {
-        CORBA_exception_set(ev,CORBA_USER_EXCEPTION,ex_Bonobo_Persist_WrongDataType,NULL);
+      CORBA_exception_set(ev,CORBA_USER_EXCEPTION,ex_Bonobo_Persist_WrongDataType,NULL);
     }
-    return ;
+  return ;
 
-clean:
-    fclose (tmpfile);
-    return;
+ clean:
+  fclose (tmpfile);
+  return;
 }
 
 static void
index e90012623deb184184f6e5f9847643885da0b617..8481214368afdabdadb6207cd934e81d7c036236 100644 (file)
@@ -1,3 +1,26 @@
+/* This file is part of GtkMathView-Bonobo, a Bonobo wrapper for GtkMathView.
+ * Copyright (C) 2003 Luca Padovani <lpadovan@cs.unibo.it>
+ *                    Pouria Masoudi <pmasoudi@cs.unibo.it>
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * For more information, please visit the project's home page
+ * http://helm.cs.unibo.it/gtkmathview-bonobo
+ * or send an email to <lpadovan@cs.unibo.it>
+ */
+
 #ifndef __GTK_MATH_VIEW_PERSIST_STREAM_H__
 #define __GTK_MATH_VIEW_PERSIST_STREAM_H__
 
@@ -10,28 +33,26 @@ struct _GtkMathViewPersistStream;
 typedef struct _GtkMathViewPersistStream GtkMathViewPersistStream;
 typedef struct _GtkMathViewPersistStreamPrivate GtkMathViewPersistStreamPrivate;
 
-#define GTK_MATH_VIEW_TYPE_PERSIST_STREAM     (gtk_math_view_persist_stream_get_type())
-
-#define GTK_MATH_VIEW_PERSIST_STREAM(object)    (G_TYPE_CHECK_INSTANCE_CAST((object), GTK_MATH_VIEW_TYPE_PERSIST_STREAM,GtkMathViewPersistStream))
-
+#define GTK_MATH_VIEW_TYPE_PERSIST_STREAM (gtk_math_view_persist_stream_get_type())
+#define GTK_MATH_VIEW_PERSIST_STREAM(object) (G_TYPE_CHECK_INSTANCE_CAST((object), GTK_MATH_VIEW_TYPE_PERSIST_STREAM,GtkMathViewPersistStream))
 #define GTK_MATH_VIEW_IS_PERSIST_STREAM(object) (G_TYPE_CHECK_INSTANCE_TYPE((object),  GTK_MATH_VIEW_TYPE_PERSIST_STREAM))
-
 #define GTK_MATH_VIEW_IS_PERSIST_STREAM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GTK_MATH_VIEW_TYPE_PERSIST_STREAM))
 
-struct _GtkMathViewPersistStream{
-    BonoboPersist parent;
-    GtkMathView *math_view;
-    const gchar* tmp_path_name;
+struct _GtkMathViewPersistStream
+{
+  BonoboPersist parent;
+  GtkMathView *math_view;
+  gchar* tmp_path_name;
 };
 
-typedef struct{
-    BonoboPersistClass parent_class;
-
-    POA_Bonobo_PersistStream__epv epv;
-}GtkMathViewPersistStreamClass;
+typedef struct
+{
+  BonoboPersistClass parent_class;
+  POA_Bonobo_PersistStream__epv epv;
+} GtkMathViewPersistStreamClass;
 
 GType   gtk_math_view_persist_stream_get_type(void);
-//BonoboObject       *gtk_math_view_persist_stream_new(GtkMathView *math_view);
+BonoboObject *gtk_math_view_persist_stream_new(GtkMathView *);
 
 G_END_DECLS
 
index b0385a6fe6bc8552481184f313b07a3a7381b262..068558d25077b59e957a5158beec93cd78a900ef 100644 (file)
@@ -1,3 +1,25 @@
+/* This file is part of GtkMathView-Bonobo, a Bonobo wrapper for GtkMathView.
+ * Copyright (C) 2003 Luca Padovani <lpadovan@cs.unibo.it>
+ *                    Pouria Masoudi <pmasoudi@cs.unibo.it>
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * For more information, please visit the project's home page
+ * http://helm.cs.unibo.it/gtkmathview-bonobo
+ * or send an email to <lpadovan@cs.unibo.it>
+ */
 
 #include <config.h>
 
@@ -325,8 +347,6 @@ view_init(View* view)
   /* do some initialization */
 }
 
-BONOBO_TYPE_FUNC_FULL (View, GNOME_GtkMathView_View, BONOBO_TYPE_OBJECT, view)
-
 View*
 view_new(GtkMathViewControlData* control_data)
 {
@@ -336,3 +356,6 @@ view_new(GtkMathViewControlData* control_data)
   view->control_data = control_data;
   return view;
 }                     
+
+BONOBO_TYPE_FUNC_FULL (View, GNOME_GtkMathView_View, BONOBO_TYPE_OBJECT, view)
+
index a652726add055f81ad6cdb692048ac301405bf28..86394bec5b689d7eae0cfc80e00a01d8cfe2ed21 100644 (file)
@@ -1,3 +1,25 @@
+/* This file is part of GtkMathView-Bonobo, a Bonobo wrapper for GtkMathView.
+ * Copyright (C) 2003 Luca Padovani <lpadovan@cs.unibo.it>
+ *                    Pouria Masoudi <pmasoudi@cs.unibo.it>
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * For more information, please visit the project's home page
+ * http://helm.cs.unibo.it/gtkmathview-bonobo
+ * or send an email to <lpadovan@cs.unibo.it>
+ */
 
 #ifndef __view_h__
 #define __view_h__
index 0986fdd71545c7832a2438dc9c7ddd2e581c291e..e737329ec7ac1b93417d589ed2f777053ef6bbcc 100644 (file)
@@ -231,8 +231,8 @@ get_top(GtkWidget *widget,
     control_frame = bonobo_widget_get_control_frame(BONOBO_WIDGET(control));
     prop_bag = bonobo_control_frame_get_control_property_bag(control_frame,NULL);
 
-    top_x = bonobo_pbclient_get_long(prop_bag,"top_x",NULL);
-    top_y = bonobo_pbclient_get_long(prop_bag,"top_y",NULL);
+    top_x = bonobo_pbclient_get_long(prop_bag,"top-x",NULL);
+    top_y = bonobo_pbclient_get_long(prop_bag,"top-y",NULL);
 
     printf("Top X: %d ,Top Y: %d\n",top_x,top_y);
 
@@ -252,59 +252,13 @@ get_font_size(GtkWidget *widget,
     control_frame = bonobo_widget_get_control_frame(BONOBO_WIDGET(control));
     prop_bag = bonobo_control_frame_get_control_property_bag(control_frame,NULL);
 
-    font_size = bonobo_pbclient_get_long(prop_bag,"font_size",NULL);
+    font_size = bonobo_pbclient_get_long(prop_bag,"font-size",NULL);
 
     printf("FontSize : %d\n",font_size);
 
     bonobo_object_release_unref(prop_bag,NULL);
 }
 
-static void 
-get_antialiasing(GtkWidget *widget,
-                 gpointer data)
-{
-    gboolean antialiasing;
-    BonoboWidget* control;
-    BonoboControlFrame* control_frame;
-    Bonobo_PropertyBag prop_bag;
-
-    control = BONOBO_WIDGET(bonobo_window_get_contents(BONOBO_WINDOW(data)));
-    control_frame = bonobo_widget_get_control_frame(BONOBO_WIDGET(control));
-    prop_bag = bonobo_control_frame_get_control_property_bag(control_frame,NULL);
-
-    antialiasing = bonobo_pbclient_get_boolean(prop_bag,"anti_aliasing",NULL);
-
-    if(antialiasing == TRUE)
-        printf("Antialiasing is set\n");
-    else if(antialiasing == FALSE)
-        printf("Antialiasing is not set\n");
-    
-    bonobo_object_release_unref(prop_bag,NULL);
-}
-
-static void 
-get_transparency(GtkWidget *widget,
-                 gpointer data)
-{
-    gboolean transparency;
-    BonoboWidget* control;
-    BonoboControlFrame* control_frame;
-    Bonobo_PropertyBag prop_bag;
-
-    control = BONOBO_WIDGET(bonobo_window_get_contents(BONOBO_WINDOW(data)));
-    control_frame = bonobo_widget_get_control_frame(BONOBO_WIDGET(control));
-    prop_bag = bonobo_control_frame_get_control_property_bag(control_frame,NULL);
-
-    transparency = bonobo_pbclient_get_boolean(prop_bag,"transparency",NULL);
-
-    if(transparency == TRUE)
-        printf("Transparency is set\n");
-    else if(transparency == FALSE)
-        printf("Transparency is not set\n");
-
-    bonobo_object_release_unref(prop_bag,NULL);
-}
-
 static void 
 get_verbosity(GtkWidget *widget,
               gpointer data)
@@ -325,26 +279,6 @@ get_verbosity(GtkWidget *widget,
     bonobo_object_release_unref(prop_bag,NULL);
 }
 
-static void
-get_font_manager(GtkWidget *widget,
-                 gpointer data)
-{
-    gint font_manager;
-    BonoboWidget* control;
-    BonoboControlFrame* control_frame;
-    Bonobo_PropertyBag prop_bag;
-
-    control = BONOBO_WIDGET(bonobo_window_get_contents(BONOBO_WINDOW(data)));
-    control_frame = bonobo_widget_get_control_frame(BONOBO_WIDGET(control));
-    prop_bag = bonobo_control_frame_get_control_property_bag(control_frame,NULL);
-
-    font_manager = bonobo_pbclient_get_long(prop_bag,"font_manager",NULL);
-
-    printf("Font_manager: %d\n",font_manager);
-
-    bonobo_object_release_unref(prop_bag,NULL);
-}
-
 static BonoboUIVerb verbs [] = {
   BONOBO_UI_UNSAFE_VERB ("OpenFile", open_through_persist_file_cb),
   BONOBO_UI_UNSAFE_VERB ("OpenStream", open_through_persist_stream_cb),
@@ -352,10 +286,7 @@ static BonoboUIVerb verbs [] = {
   BONOBO_UI_UNSAFE_VERB ("Size", get_size),
   BONOBO_UI_UNSAFE_VERB ("Top", get_top),
   BONOBO_UI_UNSAFE_VERB ("Font Size", get_font_size),
-  BONOBO_UI_UNSAFE_VERB ("AntiAliasing", get_antialiasing),
-  BONOBO_UI_UNSAFE_VERB ("Transparency", get_transparency),
   BONOBO_UI_UNSAFE_VERB ("Verbosity", get_verbosity),
-  BONOBO_UI_UNSAFE_VERB ("Font Manager", get_font_manager),
   BONOBO_UI_UNSAFE_VERB ("FileExit", exit_cb),
   BONOBO_UI_VERB_END
 };
@@ -372,19 +303,9 @@ static char ui [] =
 "              <submenu name=\"File\" _label=\"_File\">"
 "                      <menuitem name=\"OpenFile\" verb=\"\" _label=\"Open (PersistFile)\" _tip=\"Open using the PersistFile interface\""
 "                      pixtype=\"stock\" pixname=\"Open\"/>"
-"                      <menuitem name=\"SaveFile\" verb=\"\" _label=\"Save (PersistFile)\" _tip=\"Save using the PersistFile interface\""
-"                      pixtype=\"stock\" pixname=\"Save\"/>"
-"                      <separator/>"
 "                      <menuitem name=\"OpenStream\" verb=\"\" _label=\"_Open Stream (PersistStream)\" _tip=\"Open using the PersistStream interface\""
 "                      pixtype=\"stock\" pixname=\"Open Stream\"/>"
-"                      <menuitem name=\"SaveStream\" verb=\"\" _label=\"_Save (PersistStream)\" _tip=\"Save using the PersistStream interface\""
-"                      pixtype=\"stock\" pixname=\"Save\"/>"
-"                      <menuitem name=\"SavePlainStream\" verb=\"\" _label=\"Save _plain(PersistStream)\" _tip=\"Save using the PersistStream interface\""
-"                      pixtype=\"stock\" pixname=\"Save\"/>"
 "                      <separator/>"
-"                       <menuitem name=\"ViewHTMLSource\" verb=\"\" _label=\"View HTML Source\" _tip=\"View the html source of the current document\"/>"
-"                       <menuitem name=\"ViewHTMLSourceHTML\" verb=\"\" _label=\"View HTML Output\" _tip=\"View the html source of the current document as html\"/>"
-"                       <menuitem name=\"ViewPlainSource\" verb=\"\" _label=\"View PLAIN Source\" _tip=\"View the plain text source of the current document\"/>"
 "                       <menuitem name=\"TestView\" verb=\"\" _label=\"Test View\" _tip=\"Test the View interface\"/>"
 "                      <separator/>"
 "                      <menuitem name=\"FileExit\" verb=\"\" _label=\"E_xit\"/>"
@@ -400,20 +321,8 @@ static char ui [] =
 "                      <menuitem name=\"Font Size\" verb=\"\" _label=\"Font Size(PropertyBag)\" _tip=\"Get FontSize\""
 "                      pixtype=\"stock\" pixname=\"Get FontSize\"/>"
 
-"                      <menuitem name=\"AntiAliasing\" verb=\"\" _label=\"AntiAliasing(PropertyBag)\" _tip=\"Get AntiAliasing\""
-"                      pixtype=\"stock\" pixname=\"Get AntiAliasing\"/>"
-
-"                      <menuitem name=\"Transparency\" verb=\"\" _label=\"Transparency(PropertyBag)\" _tip=\"Get Transparency\""
-"                      pixtype=\"stock\" pixname=\"Get Transparency\"/>"
-
 "                      <menuitem name=\"Verbosity\" verb=\"\" _label=\"Verbosity(PropertyBag)\" _tip=\"Get Verbosity\""
 "                      pixtype=\"stock\" pixname=\"Get Verbosity\"/>"
-
-"                      <menuitem name=\"Font Manager\" verb=\"\" _label=\"Font Manager(PropertyBag)\" _tip=\"Get FontManager\""
-"                      pixtype=\"stock\" pixname=\"Get FontManager\"/>"
-
-"                       <separator/>"
-"                       <placeholder name=\"FormatParagraph\"/>"
 "               </submenu>"
 "      </menu>"
 "      <dockitem name=\"Toolbar\" behavior=\"exclusive\">"
@@ -531,16 +440,12 @@ install_property_bag_listener (BonoboWidget *control, BonoboWindow *bonobo_win)
     bonobo_event_source_client_add_listener(prop_bag, (BonoboListenerCallbackFn)height_changed,
                                             "Bonobo/Property:change:height",NULL,bonobo_win);
     bonobo_event_source_client_add_listener(prop_bag, (BonoboListenerCallbackFn)top_x_changed,
-                                            "Bonobo/Property:change:top_x",NULL,bonobo_win);
+                                            "Bonobo/Property:change:top-x",NULL,bonobo_win);
     bonobo_event_source_client_add_listener(prop_bag, (BonoboListenerCallbackFn)top_y_changed,
-                                            "Bonobo/Property:change:top_y",NULL,bonobo_win);
+                                            "Bonobo/Property:change:top-y",NULL,bonobo_win);
     bonobo_event_source_client_add_listener(prop_bag, (BonoboListenerCallbackFn)font_size_changed,
-                                            "Bonobo/Property:change:font_size",NULL,bonobo_win);
+                                            "Bonobo/Property:change:font-size",NULL,bonobo_win);
     bonobo_event_source_client_add_listener(prop_bag, (BonoboListenerCallbackFn)anti_aliasing_changed,
-                                            "Bonobo/Property:change:anti_aliasing",NULL,bonobo_win);
-    bonobo_event_source_client_add_listener(prop_bag, (BonoboListenerCallbackFn)transparency_changed,
-                                            "Bonobo/Property:change:transparency",NULL,bonobo_win);
-    bonobo_event_source_client_add_listener(prop_bag, (BonoboListenerCallbackFn)verbosity_changed,
                                             "Bonobo/Property:change:verbosity",NULL,bonobo_win);
     bonobo_event_source_client_add_listener(prop_bag, (BonoboListenerCallbackFn)font_manager_changed,
                                             "Bonobo/Property:change:font_manager",NULL,bonobo_win);
index 152fe75799cb9e45ba1f2d6adfcab1b907afe84e..e75e4883878cce4ef85bbcbfcd17cda8d7a7ebdb 100644 (file)
@@ -25,7 +25,7 @@
          <mi>x</mi>
        </mrow>
        <mo>+</mo>
-       <mi>q</mi>
+       <mi href="questo era q">q</mi>
       </mrow>
     </mfrac>
    </mrow>