Version: 0.2.0 (using KDE 4.2.3) OS: Linux Installed from: Unspecified Linux Currently it is possible to set the Public, Family and Friends flags of photos in the Flickr uploader (or just the Public flag for 23) for all the images selected for uploading. However, I usually have different levels of permissions for different photos in the same run (the photo of the nicely coloured bridge arches should be public, but the next photo in line where a friend of mine makes a funny face should only be accessible to my friends, for example). I hereby send in a patch proposal which implements this functionality. It provides three checkboxes (or just one for 23) in the list view of the images: Public, Family and Friends. The Public, Family and Friends checkboxes on the Upload options tab act as "main switches": when they are toggled, the corresponding boxes for each individual picture is toggled to the indicated state. When the individual photo options don't all agree, the corresponding checkboxes on the Upload options tab are set to the intermediate state. When the Public checkbox next to an image is clicked, the Family and Friends checkboxes disappear to make the difference more clear. I actually would have prepared to disable them, but I couldn't figure out how to do that. This patch adds the extra flickrlist.h/.cpp files, which subclasses Kipi's ImagesList and ImagesListViewItem classes: - The derived FlickrListViewItem specifies is an ImagesListViewItem object for showing in the list, with the extra three checkboxes and methods to get and set the public, family and friends states. - The derived FlickrList class holds these items and has methods and signals to get and set the global permission states. Other than that, the patch adds some housekeeping functions to FlickrWindow and FlickrWidget for when the various checkboxes are clicked.
Created attachment 33927 [details] Enable per-photo permissions
Thanks pieter for your patch. Another patch to review before 0.4.0 release... Gilles Caulier
I was also thinking, maybe it's better to not show the text labels only in the header and not in the columns, to reduce the clutter.
I have few suggestions/questions regarding the patch, I also wonder what is the standard procedure for patch acceptance/submission. Is it that once I approve the change patch submitter will submit the same or should I submit this patch ? comments:flickrlist.cpp/.h is a file added by you, so you should add your name in the Copyright(c), since this file is pretty much all new you should not need to write name of the authors of the original files from where this class is derived. Please split the line which are > 80/100 columns to wrap them to 80/100 for better readability + setToolTip (KIPIPlugins::ImagesListView::User1, i18n("Check if photo should be publicly visible or use Upload options tab to specify this for all images")); question: In slotAddImages, if all the image have is_family selected you are setting is_family to false, I am not sure I understand that, could you explain ?
Ok, thanks for the feedback. I can supply a new patch. I screwed up in slotAddImages, the 2 should have been 1 (intermediate) and the settings for is_family and is_friends should have been true. The meaning of this it of code is to provide a sensible default for when the photos in the list don't have uniform access levels. So for example, if one photo has the public box checked and the next one doesn't, there apparently is a default policy for adding new photos. In this case, the plugin should default to the most public setting. This is of course chosen completely arbitrarily, but there should be some standard behaviour. I actually think it's best to change the absolute numbering for the checked states to the Qt::CheckState enums, since that's the convention followed anyway. Could you please explain what you mean (or point me to the FM, I'm new to KDE development) about the 80/100 columns remark? When looking through the existing code, I see quite a lot of places where lines run longer than 80 or 100 chars, so I assumed there's no official coding standard.
Created attachment 34252 [details] Enable per-photo permissions Ok, here's a new patch with the following changes compared to the last one: - Credits are changed for flickrlist.cpp/.h - Lines are wrapped at 80 columns for all changes I made - Absolute state values are changed to Qt::Checked, Qt::Unchecked and Qt::PartiallyChecked - slotAddImages defaults to the most public option if the checkboxes for the photos already in the list are not consitent - Removed the Public, Family and Friends labels in the columns
targeted to 0.5.0 release.
Please let assignement to kde-imaging mailing list, else no developper will see this entry Gilles Caulier
Gilles, thanks for the tip, but regular users like me don't have the permissions to edit these settings. Pieter
Created attachment 35172 [details] Patch to allow for fine grained upload permissions
Here's a somewhat improved version of the patch, which confirms better to the coding standards and replaces some hard-coded numbers with enums.
Created attachment 36800 [details] Allow per photo permissions when uploading to Flickr Update against current SVN.
Vardhman, You still assigned to check patch from Pieter (thanks for update) Do you available to review this new version ? Gilles Caulier
SVN commit 1021426 by cgilles: apply patch from Pieter Edelman to be able to set image visibility properties one by one (public, family, friends) Tested here with my Flickr Account. it work very well. Thanks for this great patch. Good job. BUGS: 193685 M +1 -0 CMakeLists.txt M +120 -2 flickrwidget.cpp M +13 -7 flickrwidget.h M +12 -9 flickrwindow.cpp M +3 -3 flickrwindow.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1021426
Hi Gilles, Thanks for applying this patch, but for some reason I don't see the new flickrlist.h/cpp files applied. I can see that they are present in the patch though. Did I screw up the patch again?
SVN commit 1021668 by cgilles: forget to add new file to svn CCBUGS: 193685 AM flickrlist.cpp [License: GPL (v2+)] AM flickrlist.h [License: GPL (v2+)] WebSVN link: http://websvn.kde.org/?view=rev&revision=1021668
Perfect, thanks!