Re: [Nautilus-list] dialog plan
- From: Darin Adler <darin bentspoon com>
- To: Maciej Stachowiak <mjs noisehavoc org>, Havoc Pennington <hp redhat com>
- Cc: <nautilus-list eazel com>
- Subject: Re: [Nautilus-list] dialog plan
- Date: Thu, 01 Nov 2001 22:47:57 -0800
on 11/1/01 10:20 PM, Maciej Stachowiak at mjs noisehavoc org wrote:
>> g_return_val_if_fail (GTK_IS_WINDOW (window), NULL);
>> g_return_val_if_fail (gtk_window_get_gravity (window) ==
>> GDK_GRAVITY_NORTHWEST);
>
> Your gtk_return_val_if_fail needs a value there, but besides that, it
> seems wrong to fail on some windows because of their gravity
> setting. Perhaps it would be a good idea to check the Nautilus callers
> of gnome_geometry_string and see whether NULL or a NorthWest-assuming
> value would be more useful when then window does not have NorthWest
> gravity.
>
>> gtk_window_get_position (window, &x, &y);
>> gtk_window_get_size (window, &w, &h);
>>
>> str = g_strdup_printf ("%dx%d+%d+%d", w, h, x, y);
>>
>> return str;
In other words, please consider:
>> str = g_strdup_printf ("%dx%d+%d+%d", w, h, x, y);
g_return_val_if_fail (gtk_window_get_gravity (window) ==
GDK_GRAVITY_NORTHWEST, str);
>> return str;
:-)
-- Darin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]