Re: [evolution-patches] Patch for GtkHTML and Composer, take two



Can everyone try this gtkhtml patch very quickly and make sure it
everything is no more broken than it used to be so that we can roll the
1.4.5 release?

--Larry

On Thu, 2003-09-11 at 19:16, Ettore Perazzoli wrote:
> On Thu, 2003-09-11 at 19:58, Federico Mena Quintero wrote:
> > >       * The items that don't really need a cursor to operate should be
> > >         available and sensitive at all times; e.g. "Find" and "Replace"
> > >         would probably be a bit annoying if they were insensitive when
> > >         the focus is not in the main text.
> > 
> > Ah, but wouldn't you expect them to Find/Replace on the focused entry?
> > :)  I have no idea.
> 
> I've never seen find/replace working for an entry, so I would say no...
> ;-)
> 
> > If merging conflicting items doesn't do the right thing, it should be
> > easy to fix BonoboUI to do it properly.  That's the only Bonobo-side bug
> > now as far as I'm concerned.
> > 
> > I don't mean to sound harsh, but I really don't want to spend any more
> > time on this right now :)  But please feel free to ask me about other
> > focus/activation issues.  It is the merging code that I don't know well.
> 
> Larry volunteered to revert to the old behavior before we release 1.4.5
> tomorrow...  I guess we can look into fixing this properly for 2.0.
> 
> We are a bit too overloaded with other stuff for fixing it in 1.4.x, so
> if anyone else wants to step forward and re-implement the logic of the
> menu merging code the way I outlined, please go ahead.  :)
> 
> -- Ettore
> _______________________________________________
> Evolution-patches mailing list
> Evolution-patches lists ximian com
> http://lists.ximian.com/mailman/listinfo/evolution-patches
? -p0
? .Makefile.am.swp
? GNOME_GtkHTML_Editor-emacs.xml
? test_editor
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/ChangeLog,v
retrieving revision 1.410.2.8
diff -u -p -r1.410.2.8 ChangeLog
--- ChangeLog	10 Sep 2003 22:20:44 -0000	1.410.2.8
+++ ChangeLog	12 Sep 2003 20:01:50 -0000
@@ -37,7 +37,6 @@
 	(set_frame_cb): Don't set up the menubar here, nor the sensitivity
 	of the EditSpellCheck verb.
 
->>>>>>> 1.410.2.7
 2003-09-05  Antonio Xu  <antonio xu sun com>
 
 	* editor-control-factory.c (load_from_file): use
Index: control-data.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/control-data.c,v
retrieving revision 1.21.4.1
diff -u -p -r1.21.4.1 control-data.c
--- control-data.c	9 Sep 2003 19:04:18 -0000	1.21.4.1
+++ control-data.c	12 Sep 2003 20:01:50 -0000
@@ -81,10 +81,5 @@ gtk_html_control_data_destroy (GtkHTMLCo
 	if (cd->languages)
 		CORBA_free (cd->languages);
 
-	if (cd->menubar_style_changed_id) {
-		g_signal_handler_disconnect (cd->html, cd->menubar_style_changed_id);
-		cd->menubar_style_changed_id = 0;
-	}
-
 	g_free (cd);
 }
Index: control-data.h
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/control-data.h,v
retrieving revision 1.25.8.1
diff -u -p -r1.25.8.1 control-data.h
--- control-data.h	9 Sep 2003 19:04:18 -0000	1.25.8.1
+++ control-data.h	12 Sep 2003 20:01:51 -0000
@@ -109,9 +109,6 @@ struct _GtkHTMLControlData {
 
 	GtkWidget *file_dialog;
 	gboolean file_html;
-
-	/* Signal handler IDs that the menubar requires */
-	gulong menubar_style_changed_id;
 };
 
 GtkHTMLControlData * gtk_html_control_data_new       (GtkHTML *html, GtkWidget *vbox);
Index: editor-control-factory.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/editor-control-factory.c,v
retrieving revision 1.132.2.3
diff -u -p -r1.132.2.3 editor-control-factory.c
--- editor-control-factory.c	9 Sep 2003 19:04:18 -0000	1.132.2.3
+++ editor-control-factory.c	12 Sep 2003 20:01:54 -0000
@@ -95,7 +95,7 @@ typedef struct _SetFrameData SetFrameDat
 static GtkHTMLEditorAPI *editor_api;
 
 static void
-activate_cb (BonoboControl      *control,
+activate_ui_cb (BonoboControl      *control,
 	     gboolean            active,
 	     GtkHTMLControlData *cd)
 {
@@ -113,8 +113,7 @@ activate_cb (BonoboControl      *control
 		bonobo_object_release_unref (remote_ui_container, NULL);
 
 		menubar_setup (ui_component, cd);
-	} else
-		menubar_detach (ui_component, cd);
+	}
 }
 
 static void
@@ -133,6 +132,7 @@ set_frame_cb (BonoboControl *control,
 		return;
 
 	CORBA_Object_release (frame, NULL);
+
 	control_data->uic = bonobo_control_get_ui_component (control);
 
 	/* Setup the tool bar.  */
@@ -148,6 +148,9 @@ set_frame_cb (BonoboControl *control,
 
 	gtk_box_pack_start (GTK_BOX (control_data->vbox), scrolled_window, TRUE, TRUE, 0);
 
+	/* hack to setup the bonobo ui if activate isn't working */
+	activate_ui_cb (control, TRUE, control_data);
+
 	gtk_html_set_editor_api (GTK_HTML (control_data->html), editor_api, control_data);
 }
 
@@ -237,7 +240,7 @@ load_from_file (GtkHTML *html,
 	unsigned char buffer[4096];
 	int len;
 	int fd;
-        const char *path;
+        char *path;
 
         if (strncmp (url, "file:", 5) == 0)
 		path = g_filename_from_uri(url, NULL, NULL);
@@ -623,7 +626,7 @@ editor_control_construct (BonoboControl 
 	   embedded in its control frame.  We use the "set_frame" signal to
 	   handle that.  */
 
-	g_signal_connect (control, "activate", G_CALLBACK (activate_cb), cd);
+	//g_signal_connect (control, "activate", G_CALLBACK (activate_ui_cb), cd);
 	g_signal_connect (control, "set_frame", G_CALLBACK (set_frame_cb), cd);
 	g_signal_connect (html_widget, "url_requested", G_CALLBACK (url_requested_cb), cd);
 	g_signal_connect (html_widget, "button_press_event", G_CALLBACK (html_button_pressed), cd);
Index: menubar.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/menubar.c,v
retrieving revision 1.91.6.3
diff -u -p -r1.91.6.3 menubar.c
--- menubar.c	10 Sep 2003 22:20:44 -0000	1.91.6.3
+++ menubar.c	12 Sep 2003 20:01:55 -0000
@@ -710,8 +710,7 @@ menubar_setup (BonoboUIComponent  *uic,
 	g_free (domain);
 
 	menubar_paragraph_style_changed_cb (cd->html, gtk_html_get_paragraph_style (cd->html), cd);
-	cd->menubar_style_changed_id = g_signal_connect (cd->html, "current_paragraph_style_changed",
-							 G_CALLBACK (menubar_paragraph_style_changed_cb), cd);
+
 	if (!cd->has_spell_control_set) {
 		cd->has_spell_control = spell_has_control ();
 		cd->has_spell_control_set = TRUE;
@@ -726,12 +725,3 @@ menubar_setup (BonoboUIComponent  *uic,
 	}
 }
 
-void
-menubar_detach (BonoboUIComponent  *uic,
-		GtkHTMLControlData *cd)
-{
-	g_signal_handler_disconnect (cd->html, cd->menubar_style_changed_id);
-	cd->menubar_style_changed_id = 0;
-
-	bonobo_ui_component_unset_container (uic, NULL);
-}
Index: menubar.h
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/menubar.h,v
retrieving revision 1.6.14.1
diff -u -p -r1.6.14.1 menubar.h
--- menubar.h	9 Sep 2003 19:04:18 -0000	1.6.14.1
+++ menubar.h	12 Sep 2003 20:01:55 -0000
@@ -29,8 +29,6 @@
 
 void  menubar_setup          (BonoboUIComponent  *uic,
 			      GtkHTMLControlData *cd);
-void  menubar_detach         (BonoboUIComponent  *uic,
-			      GtkHTMLControlData *cd);
 void  menubar_update_format  (GtkHTMLControlData *cd);
 void  menubar_set_languages  (GtkHTMLControlData *cd);
 void  insert_table           (GtkHTMLControlData *cd);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]