-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | NEWS.xml | 1 | ||||
-rw-r--r-- | content/fireflix-panel.xul | 1 | ||||
-rw-r--r-- | content/fireflix.js | 12 | ||||
-rw-r--r-- | content/flickr.js | 4 |
5 files changed, 15 insertions, 4 deletions
@@ -1,7 +1,8 @@ 0.0.5 () - Added toolbar button - Enter or double click on photo in set now opens photo in flickr + - Double click on photoset opens photoset in flickr 0.0.4 (November 13th, 2006) - Added button to remove linebreaks from generated HTML - Added the word 'sidebar' to the extension name so that you don't have to look hard for it - UI polishing, including making it more boring @@ -2,8 +2,9 @@ <news> <version version="0.0.5"> <ni>Added toolbar button</ni> <ni>Enter or double click on photo in set now opens photo in flickr</ni> + <ni>Double click on photoset opens photoset in flickr</ni> </version> <version version="0.0.4" date="November 13th, 2006"> <ni>Added button to remove linebreaks from generated HTML</ni> <ni>Added the word 'sidebar' to the extension name so that you don't have to look hard for it</ni> diff --git a/content/fireflix-panel.xul b/content/fireflix-panel.xul index b2ca7dc..af92d22 100644 --- a/content/fireflix-panel.xul +++ b/content/fireflix-panel.xul @@ -183,8 +183,9 @@ document.getElementById('setphotos').focus()"> <vbox flex="1"> <tree id="setslist" rows="2" onselect="fireflix.photosets.on_select()" flex="1" context="sets_menu" + ondblclick="fireflix.photosets.on_cmd_open_in_flickr(event)" > <treecols> <treecol id="sl_name" label="&panel.sets.name.label;" flex="4" crop="end" align="start" tooltiptext="&panel.sets.name.tip;"/> <splitter class="tree-splitter" /> diff --git a/content/fireflix.js b/content/fireflix.js index 24894df..48053c5 100644 --- a/content/fireflix.js +++ b/content/fireflix.js @@ -163,13 +163,11 @@ var fireflix = { this.set_photo.hidden = true; } }, on_cmd_open: function(ev) { - if(this.selection.currentIndex<0) - return; + if(this.selection.currentIndex<0) return; var p = this.photos[this.selection.currentIndex]; - if(!p.id) - return; + if(!p.id) return; this.fireflix.openTab(this.fireflix.flickr.make_photo_url(p,'p')); } }, @@ -235,8 +233,14 @@ var fireflix = { this.fireflix.photoset.load_photos(s.id); }else{ this.fireflix.cmd_set_props.setAttribute('disabled','true'); } + }, + on_cmd_open_in_flickr: function(ev) { + if(this.selection.currentIndex<0) return; + var p = this.sets[this.selection.currentIndex]; + if(!p.id) return; + this.fireflix.openTab(this.fireflix.flickr.make_photoset_url(p)); } }, refresh_user_tags: function() { diff --git a/content/flickr.js b/content/flickr.js index 75d1a72..b8360c1 100644 --- a/content/flickr.js +++ b/content/flickr.js @@ -270,8 +270,12 @@ Flickr.prototype = { return this.get_photo_page_url(p); else return this.get_image_url(p,sfx); }, + make_photoset_url: function(ps) { + // TODO: allow for using someone else's photoset? + return this.photos_url+this.user.nsid+'/sets/'+ps.id; + }, upload_file: function(f,fa,on_success,on_failure) { try { var fi = Components.classes["@mozilla.org/file/local;1"] |