On 19/04/16 01:50, Jonathan Boeing wrote:
> On Mon, 18 Apr 2016 17:39:23 -0700
> Jonathan Boeing <jonathan.n.boe...@gmail.com> wrote:
>
>> diff --git a/src/ui_bookmark.c b/src/ui_bookmark.c
>> index 842b947..18f7311 100644
>> --- a/src/ui_bookmark.c
>> +++ b/src/ui_bookmark.c
>> @@ -707,13 +707,19 @@ static void bookmark_dnd_get_data(GtkWidget
>> *widget, {
>>      BookMarkData *bm = data;
>>      GList *list = NULL;
>> +    GList *errors = NULL;
>>      GList *work;
>>      gchar **uris;
>>   
>>      if (!bm->editable) return;
>>   
>>      uris = gtk_selection_data_get_uris(selection_data);
>> -    list = uri_filelist_from_uris(uris);
>> +    list = uri_filelist_from_uris(uris, &errors);
>> +    if(errors)
>> +            {
>> +            warning_dialog_dnd_uri_error(errors);
>> +            string_list_free(errors);
>> +            }
>>      g_strfreev(uris);
>>   
>>      work = list;
> Would you rather have bookmark_dnd_get_data() call
> uri_filelist_from_gtk_selection_data()? It looks to me like it could
> have been calling it already, regardless of my patch.
>
>> +void warning_dialog_dnd_uri_error(GList *uri_error_list)
>> +{
>> +    GList *work = uri_error_list;
>> +    guint count = g_list_length(work);
>> +    gchar *msg = g_strdup_printf("Failed to convert %d dropped
>> item(s) to files\n", count);
>> +    if(count < 10)
>> +            {
>> +            while (work)
>> +                    {
>> +                    gchar *prev = msg;
>> +                    msg = g_strdup_printf("%s\n%s", prev, (gchar
>> *)work->data);
>> +                    work = work->next;
>> +                    g_free(prev);
>> +                    }
>> +            }
>> +    warning_dialog(_("Drag and Drop failed"), msg,
>> GTK_STOCK_DIALOG_WARNING, NULL);
>> +    g_free(msg);
>> +}
> I'm not real happy about that strdup loop, but warning_dialog() didn't
> look like a good basis for a dialog with multiple strings (i.e. the list
> of failed conversions). Any suggestions for that, or is it fine as-is?
>
>
Hi Jonathon

I am not competent to decide whether or not this is a perfect solution - 
anyway, I would guess there is a fair bit of Geeqie that is sub-optimal.

It works. That's good enough for me. It's in the repo.


Thanks

Colin Clark



------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Geeqie-devel mailing list
Geeqie-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geeqie-devel

Reply via email to