Re: [evolution-patches] patch for bug 50646




Not Zed wrote:
Although this code isn't my responsibility, i'd say 'this looks bad'.

If you just hide the dialogue, then you're just leaking dialogues,
effectively.
Thank you, Michael.
They will be destroyed when the whole searching complete, and no leaking will happened.
You probably want to just re-use the existing one?  Or at the very
least, destroy it (but that sounds bad to me too).
Anyway, hiding the current dialog and create a new dialog each time is not a proper way,
and that must waste us more or less extra memory.

But I have thought that trying to re-use the existing dialog will invoke too much changes to
the current codes, so I use a simplest way.
Do you think it's worthy to do that?

Cheers,
 Michael

On Tue, 2003-11-11 at 18:53, Charles Zhang wrote:

  
Hi, everyone.

This time, I make some changes.
This patch is for bug 50646.
It fixing the bug of seeing more than one replace dialog while replacing.

Please seek it.

Best Regards
Charles Zhang

Charles Zhang wrote:

    
Hello, everyone.

Please seek this.
I try to fix the bug 50646 here.
To avoid seeing more than one replace dialog, I hide the current 
replace dialog before pop up the next replace dialog.
I think this is the simplest way of fixing this bug.

Best Regards
Charles Zhang

------------------------------------------------------------------------

Index: components/html-editor/replace.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/replace.c,v
retrieving revision 1.18
diff -u -p -r1.18 replace.c
--- components/html-editor/replace.c	12 May 2003 20:46:48 -0000	1.18
+++ components/html-editor/replace.c	8 Nov 2003 14:42:11 -0000
@@ -49,6 +49,8 @@ struct _GtkHTMLReplaceDialog {
static void
ask_dialog_response (GtkDialog *dialog, gint response_id, GtkHTMLReplaceAskDialog *d)
{
+	gtk_widget_hide (GTK_WIDGET (d->dialog));
+
	switch (response_id) {
	case GTK_RESPONSE_DELETE_EVENT:
	case GTK_RESPONSE_CLOSE:
Index: components/html-editor/ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/ChangeLog,v
retrieving revision 1.410.2.10
diff -u -p -r1.410.2.10 ChangeLog
--- components/html-editor/ChangeLog	14 Oct 2003 13:43:31 -0000	1.410.2.10
+++ components/html-editor/ChangeLog	8 Nov 2003 14:42:20 -0000
@@ -0,0 +0,5 @@
+2003-11-08  Charles Zhang  <charles zhang sun com>
+
+	* replace.c (ask_dialog_response): hide current replace dialog before
+	pop up next replace dialog. [50646]
+
 

      
______________________________________________________________________

Index: components/html-editor/replace.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/replace.c,v
retrieving revision 1.18
diff -u -p -r1.18 replace.c
--- components/html-editor/replace.c	12 May 2003 20:46:48 -0000	1.18
+++ components/html-editor/replace.c	11 Nov 2003 10:44:45 -0000
@@ -49,6 +49,8 @@ struct _GtkHTMLReplaceDialog {
 static void
 ask_dialog_response (GtkDialog *dialog, gint response_id, GtkHTMLReplaceAskDialog *d)
 {
+	gtk_widget_hide (GTK_WIDGET (d->dialog));
+
 	switch (response_id) {
 	case GTK_RESPONSE_DELETE_EVENT:
 	case GTK_RESPONSE_CLOSE:
Index: components/html-editor/ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/ChangeLog,v
retrieving revision 1.410.2.10
diff -u -p -r1.410.2.10 ChangeLog
--- components/html-editor/ChangeLog	14 Oct 2003 13:43:31 -0000	1.410.2.10
+++ components/html-editor/ChangeLog	11 Nov 2003 10:44:47 -0000
@@ -0,0 +0,5 @@
+2003-11-08  Charles Zhang  <charles zhang sun com>
+
+	* replace.c (ask_dialog_response): hide current replace dialog before
+	pop up next replace dialog. [50646]
+
    

  


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