GNOME Bugzilla – Bug 682496
weird dialog after plugging in iphone
Last modified: 2012-08-23 10:08:33 UTC
Created attachment 222181 [details] screenshot I got this weird dialog after plugging in my iPhone. * I have no idea what those buttons are for * The quotes should be curly double quotes * The icon used there is not anything like an iPhone * It is way too wide
And cancel is a lie. It just reprompts with no way out except to unplug.
Created attachment 222189 [details] [review] afc: null-terminate choices string array Fixes extra buttons appearing in the dialog. The fact that we pass the array length doesn't guarantee that the function we are calling will actually work fine with a non null-terminated array; in fact it ultimately gets passed to the autogenerated GDBus code, which expects it to be null-terminated, causing memory access out of the array bounds, and into the content-types string array.
Created attachment 222190 [details] [review] afc: use the correct choice index for "Cancel" Or pressing the button won't dismiss the dialog.
Created attachment 222191 [details] [review] afc: use curly double quotes for dialog question
Review of attachment 222191 [details] [review]: ::: daemon/gvfsbackendafc.c @@ +585,3 @@ * %s is the device name. 'Try again' is the caption of the button * shown in the dialog which is defined above. */ + message = g_strdup_printf (_("The device “%s” is locked. Enter the passcode on the device and click “Try again”."), display_name); Pretty sure that doesn't compile. Backslashes missing.
Review of attachment 222190 [details] [review]: ::: daemon/gvfsbackendafc.c @@ -593,3 @@ &aborted, &choice); - if (!ret || aborted || (choice == 0)) I'd rather we added an enum and used that instead of magic numbers.
Review of attachment 222189 [details] [review]: Looks good.
Comment on attachment 222189 [details] [review] afc: null-terminate choices string array Attachment 222189 [details] pushed as 99d06e4 - afc: null-terminate choices string array
Comment on attachment 222191 [details] [review] afc: use curly double quotes for dialog question Attachment 222191 [details] pushed as 666764f - afc: use curly double quotes for dialog question
Created attachment 222207 [details] [review] afc: use the correct choice index for "Cancel" Or pressing the button won't dismiss the dialog.
Comment on attachment 222190 [details] [review] afc: use the correct choice index for "Cancel" Added the enum to the new patch, and some comments to keep the array and the enum in sync
Review of attachment 222207 [details] [review]: ::: daemon/gvfsbackendafc.c @@ +384,3 @@ } +/* keep in sync with the choices array below */ s/below/in g_vfs_backend_afc_mount()/
Attachment 222207 [details] pushed as 3fb6e42 - afc: use the correct choice index for "Cancel" Pushed with the suggested change.