Re: [evolution-patches] Shell : patch to have a component without buttons



None of this change is necessary, g_strdup already does this null check.


On Thu, 2005-07-21 at 19:58 +0530, Sarfraaz Ahmed wrote:
> +       if (button_label)
> +               info->button_label = g_strdup (button_label);
> +       if (button_tooltips)
> +               info->button_tooltips = g_strdup (button_tooltips);
> +       if (menu_label)
> +               info->menu_label = g_strdup (menu_label);
> +       if (menu_accelerator)
> +               info->menu_accelerator = g_strdup (menu_accelerator); 


This bit here is the really only important bit, none of the other stuff
is strictly necessary (you could return empty controls, for instance).

+
+               if (!info->button_label || !info->menu_label)
+                       continue;

It saves a lot of changes I think.





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