Re: [Nautilus-list] toolbar icons patch



On 2/20/02 3:40 PM, "Jens Finke" <jens triq net> wrote:

> This patch is much more nicer now, since it explicitly defines the
> appropriate gtk stock item for each toolbar button. No renaming needed.

Looks good. Please feel free to commit as-is, but ...

But you could make the code even nicer by using gtk_image_new_from_file
rather than gdk_pixbuf_new_from_file. Then you could get rid of the
g_object_ref/g_object_unref, and make image be a GtkWidget * rather than a
gpointer.

Also, the line:

> +            if (image == NULL) return;

does not match the Nautilus coding style. It needs to use 3 lines and
braces.

If you take my first suggestion, then you can add a line of code that sets
image to NULL before the if statement, and then do the check for NULL and
return after the if statement, and you won't need two different return
statements. 

    -- Darin





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