Fixed and committed to SVN.

Best,
Scuri


2018-01-18 0:27 GMT-02:00 Ranier VF <ranier_...@hotmail.com>:

> Hi,
> Redundant test if.
>
> --- a\src\gtk\iupgtk_toggle.c   Fri Jun 16 14:35:02 2017
> +++ b\src\gtk\iupgtk_toggle.c   Thu Jan 18 00:25:04 2018
> @@ -469,18 +469,17 @@
>    if (!ih->parent)
>      return IUP_ERROR;
>
> -  if (radio)
> -    ih->data->is_radio = 1;
> -
>    value = iupAttribGet(ih, "IMAGE");
>    if (value)
>      ih->data->type = IUP_TOGGLE_IMAGE;
>    else
>      ih->data->type = IUP_TOGGLE_TEXT;
>
> -  if (ih->data->is_radio)
> +  if (radio)
>    {
>      GtkRadioButton* last_tg = (GtkRadioButton*)iupAttribGet(radio,
> "_IUPGTK_LASTRADIOBUTTON");
> +
> +    ih->data->is_radio = 1;
>      if (last_tg)
>        ih->handle = gtk_radio_button_new_from_widget(last_tg);
>      else
>
> Best.
> Ranier
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Iup-users mailing list
> Iup-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/iup-users
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to