[evolution-patches] gtkhtml: test editor program fix
- From: Radek Doulík <rodo ximian com>
- To: Patches <evolution-patches ximian com>
- Cc: Larry Ewing <lewing ximian com>
- Subject: [evolution-patches] gtkhtml: test editor program fix
- Date: 14 Apr 2003 15:07:43 +0200
Attached patch fixes few issues with editor testing program, menu items
work again, on exit it doesn't spill warnings anymore.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/ChangeLog,v
retrieving revision 1.394
diff -u -p -r1.394 ChangeLog
--- ChangeLog 9 Apr 2003 20:30:52 -0000 1.394
+++ ChangeLog 14 Apr 2003 13:08:15 -0000
@@ -1,3 +1,14 @@
+2003-04-14 Radek Doulik <rodo ximian com>
+
+ * test-html-editor-control.c (app_delete_cb): call quit
+ (container_create): don't connect to window destroy signal, it's
+ no more needed + was calling unref on uic which we didn't have
+ reference to
+ (container_create): remove control frame activate call - I guess
+ it was committed by mistake, right Larry? after I removed this
+ call things started to work again - menu items work and no warning
+ on exit
+
2003-04-09 Larry Ewing <lewing ximian com>
* editor-control-factory.c (editor_init_painters): use the gdk painter
Index: test-html-editor-control.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/test-html-editor-control.c,v
retrieving revision 1.44
diff -u -p -r1.44 test-html-editor-control.c
--- test-html-editor-control.c 1 Apr 2003 07:48:59 -0000 1.44
+++ test-html-editor-control.c 14 Apr 2003 13:08:15 -0000
@@ -378,6 +378,7 @@ exit_cb (GtkWidget *widget,
gpointer data)
{
gtk_widget_destroy (GTK_WIDGET (data));
+ bonobo_main_quit ();
}
@@ -452,17 +453,15 @@ static char ui [] =
"</Root>";
static void
-app_destroy_cb (GtkWidget *app, BonoboUIContainer *uic)
+app_finalize_cb (GtkWidget *app, BonoboUIContainer *uic)
{
- bonobo_object_unref (BONOBO_OBJECT (uic));
-
- bonobo_main_quit ();
}
static int
app_delete_cb (GtkWidget *widget, GdkEvent *event, gpointer dummy)
{
gtk_widget_destroy (GTK_WIDGET (widget));
+ bonobo_main_quit ();
return FALSE;
}
@@ -476,7 +475,6 @@ container_create (void)
BonoboUIContainer *container;
CORBA_Environment ev;
GNOME_GtkHTML_Editor_Engine engine;
- BonoboControlFrame *cf;
win = bonobo_window_new ("test-editor",
"HTML Editor Control Test");
@@ -486,8 +484,6 @@ container_create (void)
g_signal_connect (window, "delete_event", G_CALLBACK (app_delete_cb), NULL);
- g_signal_connect (window, "destroy", G_CALLBACK (app_destroy_cb), container);
-
gtk_window_set_default_size (window, 600, 440);
gtk_window_set_resizable (window, TRUE);
@@ -503,10 +499,6 @@ container_create (void)
if (control == NULL)
g_error ("Cannot get `%s'.", CONTROL_ID);
- cf = bonobo_widget_get_control_frame (BONOBO_WIDGET (control));
- bonobo_control_frame_control_activate (cf);
- //bonobo_control_frame_set_autoactivate (cf, TRUE);
-
bonobo_widget_set_property (BONOBO_WIDGET (control), "FormatHTML", TC_CORBA_boolean, formatHTML, NULL);
bonobo_ui_component_set_prop (component, "/commands/FormatHTML", "state", formatHTML ? "1" : "0", NULL);
bonobo_ui_component_add_listener (component, "FormatHTML", menu_format_html_cb, control);
@@ -520,8 +512,7 @@ container_create (void)
engine = (GNOME_GtkHTML_Editor_Engine) Bonobo_Unknown_queryInterface
(bonobo_widget_get_objref (BONOBO_WIDGET (control)), "IDL:GNOME/GtkHTML/Editor/Engine:1.0", &ev);
GNOME_GtkHTML_Editor_Engine_runCommand (engine, "grab-focus", &ev);
- Bonobo_Unknown_unref (engine, &ev);
- CORBA_Object_release (engine, &ev);
+ bonobo_object_release_unref (engine, &ev);
CORBA_exception_free (&ev);
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]