Re: [evolution-patches] move e-charset-picker to GtkDialog



A few isues...


+       window = gtk_widget_get_toplevel (menu);
+       if (!GTK_WIDGET_TOPLEVEL (menu))
+               window = gtk_widget_get_ancestor (item,
GTK_TYPE_WINDOW);

shouldn't this be:

+       if (!GTK_WIDGET_TOPLEVEL (window))

otherwise there's no point to the first get_toplevel() call.

+       g_signal_connect (G_OBJECT (entry), "activate",

you don't need the G_OBJECT() macro there, since g_signal_connect takes
a gpointer argument.

+       g_object_ref (dialog);
+       if (gtk_dialog_run (dialog) == GTK_RESPONSE_OK) {

there's no reason to g_object_ref() there as far as I can tell. Also,
you'll end up leaking the dialog if the response is OK and the inner
if-statements also pass.

same g_object_ref/unref combo doesn't need to be there in the next
function either.

Jeff 

On Sat, 2003-05-17 at 20:55, Larry Ewing wrote:
> gnome-dialog was popping the dialog up behind the settings window, it
> seems to work with GtkDialog and we were supposed to move to away from
> gnome-dialog.  I've test the 'other' logic but I haven't tested the
> e_charset_picker_dialog code because it doesn't seem to be used
> anywhere.
> 
> --Larry
-- 
Jeffrey Stedfast
Evolution Hacker - Ximian, Inc.
fejj ximian com  - www.ximian.com




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