[PATCH 5/5] Only remember a DC nickname if the user has pressed OK

Dirk Hohndel dirk at hohndel.org
Sun Dec 16 14:32:48 PST 2012


But what if the user doesn't want a nickname?
I don't want the popup all the time.

We should instead add a way to edit nicknames.

/D



On December 16, 2012 12:26:38 PM "Lubomir I. Ivanov" 
<neolit123 at gmail.com> wrote:
> From: "Lubomir I. Ivanov" <neolit123 at gmail.com>
>
> In gtk-gui.c:set_dc_nickname() the call to remember_dc() perhaps should
> be inside the GTK_RESPONSE_ACCEPT branch. This way the user may actually
> skip setting the nickname at this point, but then set it the next time
> when asked.
>
> This will essentially make the dialog persistent until the user picks
> a nickname for this DC.
>
> Signed-off-by: Lubomir I. Ivanov <neolit123 at gmail.com>
> ---
>  gtk-gui.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gtk-gui.c b/gtk-gui.c
> index 4d795be..88e71ba 100644
> --- a/gtk-gui.c
> +++ b/gtk-gui.c
> @@ -2110,8 +2110,8 @@ void set_dc_nickname(struct dive *dive)
>  			if (strcmp(dive->dc.model, gtk_entry_get_text(GTK_ENTRY(entry))))
>  				dive->dc.nickname = 
>  cleanedup_nickname(gtk_entry_get_text(GTK_ENTRY(entry)),
>  									sizeof(nickname));
> +			remember_dc(dive->dc.deviceid, dive->dc.nickname, TRUE);
>  		}
>  		gtk_widget_destroy(dialog);
> -		remember_dc(dive->dc.deviceid, dive->dc.nickname, TRUE);
>  	}
>  }
> --
> 1.7.11.msysgit.0
>
> _______________________________________________
> subsurface mailing list
> subsurface at hohndel.org
> http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface




More information about the subsurface mailing list