[gthumb: 18/23] renamed work queues to selections
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb: 18/23] renamed work queues to selections
- Date: Sun, 4 Mar 2012 17:56:45 +0000 (UTC)
commit 82979168ea2610edd1d3ff939983fd6cd5a06e2d
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Mar 4 15:49:36 2012 +0100
renamed work queues to selections
configure.ac | 2 +-
data/icons/hicolor/22x22/actions/selection.png | Bin 0 -> 922 bytes
data/icons/selection.svg | 95 ++++++-
extensions/Makefile.am | 2 +-
extensions/selections/Makefile.am | 31 ++
extensions/{work_queues => selections}/actions.c | 24 +-
extensions/{work_queues => selections}/actions.h | 6 +-
extensions/{work_queues => selections}/callbacks.c | 62 ++--
extensions/{work_queues => selections}/callbacks.h | 8 +-
extensions/selections/gth-file-source-selections.c | 308 ++++++++++++++++++++
extensions/selections/gth-file-source-selections.h | 51 ++++
.../gth-selections-manager.c} | 212 +++++++-------
extensions/selections/gth-selections-manager.h | 74 +++++
extensions/{work_queues => selections}/main.c | 10 +-
.../selections.extension.in.in} | 3 +-
extensions/work_queues/Makefile.am | 31 --
.../work_queues/gth-file-source-work-queues.c | 308 --------------------
.../work_queues/gth-file-source-work-queues.h | 51 ----
extensions/work_queues/gth-queue-manager.h | 74 -----
gthumb/gth-main.c | 2 +-
20 files changed, 713 insertions(+), 641 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 8300dca..46ae57e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -684,6 +684,7 @@ extensions/resize_images/data/ui/Makefile
extensions/search/Makefile
extensions/search/data/Makefile
extensions/search/data/ui/Makefile
+extensions/selections/Makefile
extensions/slideshow/Makefile
extensions/slideshow/data/Makefile
extensions/slideshow/data/ui/Makefile
@@ -695,7 +696,6 @@ extensions/webalbums/data/albumthemes/ClassicClips/Makefile
extensions/webalbums/data/albumthemes/NeatRound/Makefile
extensions/webalbums/data/albumthemes/Wiki/Makefile
extensions/webalbums/data/ui/Makefile
-extensions/work_queues/Makefile
gthumb/Makefile
po/Makefile.in
tests/Makefile
diff --git a/data/icons/hicolor/22x22/actions/selection.png b/data/icons/hicolor/22x22/actions/selection.png
new file mode 100644
index 0000000..5f594d4
Binary files /dev/null and b/data/icons/hicolor/22x22/actions/selection.png differ
diff --git a/data/icons/selection.svg b/data/icons/selection.svg
index 9d5613a..df42d46 100644
--- a/data/icons/selection.svg
+++ b/data/icons/selection.svg
@@ -11,8 +11,8 @@
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="1062.6781"
- height="732.42786"
+ width="1161.2031"
+ height="742.62537"
id="svg4187"
version="1.1"
inkscape:version="0.48.3.1 r9886"
@@ -76,6 +76,15 @@
x2="209.52802"
y2="209.46866"
gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4819"
+ id="linearGradient3024"
+ gradientUnits="userSpaceOnUse"
+ x1="203.09282"
+ y1="575.46863"
+ x2="209.52802"
+ y2="209.46866" />
</defs>
<sodipodi:namedview
id="base"
@@ -85,8 +94,8 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.35355339"
- inkscape:cx="403.61854"
- inkscape:cy="563.64215"
+ inkscape:cx="409.27539"
+ inkscape:cy="573.83965"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
@@ -122,7 +131,7 @@
inkscape:export-xdpi="7"
inkscape:export-ydpi="7">
<rect
- style="opacity:0.28057556000000000;fill:none;stroke:none"
+ style="opacity:0.28057556;fill:none;stroke:none"
id="rect4151"
width="211.04439"
height="211.04439"
@@ -140,7 +149,7 @@
sodipodi:cy="1319.0425"
sodipodi:rx="173.74623"
sodipodi:ry="28.284271"
- d="m -193.9493,1319.0425 a 173.74623,28.284271 0 1 1 -347.49246,0 173.74623,28.284271 0 1 1 347.49246,0 z"
+ d="m -193.9493,1319.0425 c 0,15.621 -77.78883,28.2843 -173.74623,28.2843 -95.95739,0 -173.74623,-12.6633 -173.74623,-28.2843 0,-15.621 77.78884,-28.2843 173.74623,-28.2843 95.9574,0 173.74623,12.6633 173.74623,28.2843 z"
transform="matrix(0.36021254,0,0,0.18433247,887.75707,38.439657)"
inkscape:export-filename="/home/paolo/workspace/gthumb/data/icons/hicolor/16x16/actions/selection3.png"
inkscape:export-xdpi="7.3734169"
@@ -152,7 +161,7 @@
inkscape:connector-curvature="0"
id="path4157"
d="m 759.14807,101.19826 c -0.4024,-0.045 -0.8293,-0.07 -1.2902,-0.074 -3.6871,-0.026 -5.4559,1.4395 -6.445,2.2207 -0.9891,0.7812 -1.4073,1.3241 -1.7491,1.7521 -0.6836,0.8561 -0.9339,1.3356 -1.1955,1.7976 -0.523,0.9238 -0.8822,1.6878 -1.2921,2.5973 -0.8199,1.8192 -1.7407,4.0762 -2.8035,6.771 -2.1255,5.3896 -4.7514,12.4167 -7.3674,19.4635 -2.616,7.0467 -5.2198,14.1072 -7.2213,19.3935 -0.5089,1.3439 -0.8267,2.13038 -1.2455,3.20848 -1.1534,0.048 -1.9981,0.094 -3.4307,0.1422 -5.6492,0.1904 -13.1698,0.3742 -20.6835,0.5787 -7.5137,0.2045 -15.0128,0.4258 -20.7996,0.7003 -2.8935,0.1372 -5.3321,0.2816 -7.3184,0.4712 -0.9932,0.095 -1.8315,0.1859 -2.8747,0.3832 -0.5216,0.099 -1.0582,0.1841 -2.089,0.5552 -0.5153,0.1855 -1.1583,0.4096 -2.2167,1.094 -1.0584,0.6846 -3.0138,1.88 -4.1779,5.3786 -1.1641,3.499 -0.3156,5.6289 0.1218,6.8111 0.4374,1.1822 0.8215,1.7482 1.123,2.2055 0.6031,0.9147 0.9802,1.3045 1.3387,1.6959 0.7172,0.783 1.3363,1.3528 2.0748,2.0238 1.4769,1.3417 3.3396,2.9
179 5.5743,4.7613 4.4693,3.6867 10.3414,8.3591 16.2355,13.0243 5.8941,4.6651 11.8072,9.3181 16.2166,12.855 1.1181,0.8968 1.7664,1.4399 2.6607,2.1699 -0.3107,1.114 -0.53,1.9347 -0.9278,3.3154 -1.5652,5.432 -3.7071,12.6428 -5.8352,19.8526 -2.1282,7.2098 -4.2376,14.4098 -5.7654,19.9988 -0.7638,2.7945 -1.376,5.1544 -1.8096,7.1022 -0.2169,0.974 -0.394,1.805 -0.5289,2.858 -0.068,0.5266 -0.1544,1.0555 -0.12,2.1506 0.017,0.5474 0.036,1.2358 0.3602,2.454 0.3239,1.2182 0.8567,3.4461 3.8248,5.6346 2.9679,2.1885 5.2539,2.0417 6.5132,1.991 1.2594,-0.051 1.9148,-0.2439 2.4429,-0.3892 1.0562,-0.2907 1.5406,-0.5297 2.0237,-0.7497 0.9662,-0.44 1.7021,-0.8519 2.5685,-1.3467 1.7326,-0.9898 3.8117,-2.2733 6.2556,-3.8287 4.888,-3.1108 11.1483,-7.2495 17.4072,-11.4127 6.2589,-4.1633 12.5094,-8.3497 17.2363,-11.4499 1.2007,-0.7874 1.9171,-1.2347 2.8891,-1.8602 0.9627,0.6391 1.6714,1.0989 2.8603,1.9028 4.6824,3.1665 10.8745,7.4368 17.0735,11.688 6.199,4.2511 12.4001,8.4826 17.2432,11.6621 2.4216,1.
5898 4.4801,2.8997 6.1986,3.9138 0.8592,0.5072 1.5868,0.9315 2.5467,1.3851 0.48,0.2268 0.9665,0.4715 2.0185,0.7771 0.5261,0.1527 1.1775,0.3507 2.4361,0.4191 1.2579,0.068 3.544,0.2449 6.5399,-1.8979 0,0 0,0 0.01,-0.011 2.9912,-2.1446 3.5627,-4.3595 3.9033,-5.5718 0.341,-1.2135 0.3603,-1.8991 0.3852,-2.4463 0.05,-1.0943 -0.022,-1.6282 -0.082,-2.1557 -0.1199,-1.0549 -0.2858,-1.8868 -0.4888,-2.8637 -0.406,-1.9537 -0.9854,-4.3238 -1.7096,-7.1289 -1.4485,-5.61 -3.4568,-12.8418 -5.4827,-20.0811 -2.0258,-7.2394 -4.0718,-14.4743 -5.5599,-19.9281 -0.3781,-1.3861 -0.5825,-2.2078 -0.8774,-3.3261 0.9056,-0.7182 1.5597,-1.2544 2.6922,-2.1369 4.4587,-3.4746 10.4332,-8.043 16.3922,-12.6247 5.959,-4.5818 11.9017,-9.1728 16.4224,-12.7963 2.2604,-1.8117 4.1436,-3.3612 5.6392,-4.6821 0.7478,-0.6604 1.372,-1.2251 2.1001,-1.9978 0.364,-0.3863 0.7496,-0.7707 1.3654,-1.6768 0.3079,-0.4531 0.6945,-1.0098 1.1485,-2.1856 0.454,-1.1759 1.3343,-3.2917 0.2195,-6.8066 -1.1148,-3.5153 -3.0528,-4.7384 -4.10
15,-5.4377 -1.0486,-0.6993 -1.6886,-0.9364 -2.2013,-1.1292 -1.0254,-0.3855 -1.5582,-0.4815 -2.0784,-0.5873 -1.0403,-0.212 -1.8766,-0.3096 -2.8684,-0.4184 -1.9837,-0.2174 -4.4254,-0.3967 -7.317,-0.5747 -5.7831,-0.3558 -13.2814,-0.6835 -20.7925,-0.9937 -7.5111,-0.3101 -15.025,-0.6008 -20.6717,-0.8706 -1.432,-0.068 -2.2741,-0.1272 -3.4269,-0.1923 -0.4033,-1.0832 -0.7115,-1.87428 -1.2009,-3.22418 -1.9268,-5.3138 -4.4314,-12.4049 -6.9476,-19.4876 -2.5162,-7.0827 -5.0445,-14.1455 -7.0938,-19.5643 -1.0246,-2.7094 -1.9148,-4.9816 -2.709,-6.8121 -0.397,-0.9153 -0.7409,-1.691 -1.2509,-2.6222 -0.255,-0.4655 -0.5027,-0.9472 -1.1742,-1.8128 -0.3357,-0.4329 -0.7444,-0.9721 -1.7225,-1.7672 -0.8558,-0.6957 -2.2987,-1.9287 -5.1156,-2.2421 z m 23.1108,57.12278 c 0.096,0.019 0.3097,0.1347 0.4494,0.1891 -0.4577,-0.037 -0.8357,-0.069 -1.0375,-0.091 0.1161,-0.018 0.1893,-0.1748 0.5881,-0.098 z m 5.3843,3.8228 c 0.4989,0.6244 0.3649,0.8382 0.4016,0.9866 -0.081,-0.1874 -0.2263,-0.5485 -0.4016,-0.98
66 z m -54.9981,-4.1719 c 0.4026,-0.072 0.4725,0.087 0.5898,0.1046 -0.2045,0.02 -0.5847,0.051 -1.0538,0.081 0.1455,-0.055 0.3646,-0.1683 0.464,-0.1861 z m -5.4402,3.7595 c -0.1782,0.4275 -0.3296,0.7815 -0.4122,0.9652 0.037,-0.1467 -0.084,-0.3574 0.4122,-0.9652 z m 75.4848,47.5517 c 0.067,0.1295 0.2772,0.2507 0.2305,1.026 -0.1072,-0.4506 -0.1889,-0.8268 -0.2305,-1.026 z m -1.7006,6.8337 c -0.4362,0.6611 -0.6811,0.606 -0.8109,0.6833 0.1523,-0.1343 0.4509,-0.3833 0.8109,-0.6833 z m -89.4703,-7.48 c -0.045,0.2013 -0.1414,0.5777 -0.2592,1.0425 -0.04,-0.8018 0.1964,-0.906 0.2592,-1.0425 z m 1.5956,6.86 c 0.3569,0.3061 0.6475,0.5592 0.7988,0.6965 -0.1288,-0.082 -0.3698,-0.024 -0.7988,-0.6965 z m 47.6888,29.4988 c -0.1039,0.1024 -0.1478,0.3403 -0.8946,0.536 0.3915,-0.2387 0.7185,-0.4349 0.8946,-0.536 z m -7.9235,-0.061 c 0.1751,0.1035 0.5046,0.3094 0.9023,0.5597 -0.7628,-0.2095 -0.7916,-0.4587 -0.9023,-0.5597 z"
- style="fill:#555753;fill-opacity:1;stroke:#ffffff;stroke-width:11.00554370999999954;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ style="fill:#555753;fill-opacity:1;stroke:#ffffff;stroke-width:11.00554371;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
</g>
<g
id="g4855"
@@ -172,13 +181,13 @@
inkscape:export-ydpi="7.3734169" />
<path
sodipodi:type="arc"
- style="opacity:0.22021583;fill:#000000;fill-opacity:1;stroke:none;filter:url(#filter4087)"
+ style="opacity:0.22021586;fill:#000000;fill-opacity:1;stroke:none;filter:url(#filter4087)"
id="path4172"
sodipodi:cx="-367.69553"
sodipodi:cy="1319.0425"
sodipodi:rx="173.74623"
sodipodi:ry="28.284271"
- d="m -193.9493,1319.0425 a 173.74623,28.284271 0 1 1 -347.49246,0 173.74623,28.284271 0 1 1 347.49246,0 z"
+ d="m -193.9493,1319.0425 c 0,15.621 -77.78883,28.2843 -173.74623,28.2843 -95.95739,0 -173.74623,-12.6633 -173.74623,-28.2843 0,-15.621 77.78884,-28.2843 173.74623,-28.2843 95.9574,0 173.74623,12.6633 173.74623,28.2843 z"
transform="matrix(0.41604145,0,0,0.31433423,227.96848,206.08199)"
inkscape:export-filename="/home/paolo/workspace/gthumb/data/icons/hicolor/48x48/actions/selection1.png"
inkscape:export-xdpi="7.3734169"
@@ -190,7 +199,7 @@
inkscape:connector-curvature="0"
id="path4176"
d="m 215.03817,142.06206 c -1.0643,-0.1184 -2.1933,-0.1856 -3.4123,-0.1942 -9.7521,-0.069 -14.4302,3.8074 -17.0463,5.8736 -2.6161,2.0661 -3.7221,3.5019 -4.6261,4.634 -1.8079,2.2641 -2.4702,3.5325 -3.1618,4.7543 -1.3833,2.44358 -2.3334,4.46398 -3.4177,6.86968 -2.1684,4.8115 -4.6038,10.7812 -7.4147,17.9084 -5.6217,14.2545 -12.567,32.8404 -19.4858,51.4781 -6.9189,18.6376 -13.8056,37.3117 -19.0995,51.2932 -1.3459,3.5545 -2.1864,5.6347 -3.2941,8.4862 -3.0507,0.1289 -5.2847,0.2483 -9.0737,0.3761 -14.9414,0.5036 -34.832299,0.9899 -54.705099,1.5306 -19.8727,0.5407 -39.7067,1.1261 -55.0122,1.8521 -7.6527996,0.363 -14.1025996,0.7449 -19.3561996,1.2464 -2.6268,0.2507 -4.844,0.4917 -7.6031004,1.0133 -1.3795,0.2609 -2.7989,0.4871 -5.525,1.4686 -1.3631,0.4908 -3.0638,1.0833 -5.863,2.8937 -2.7993,1.8103 -7.9711,4.972 -11.0499,14.2255 -3.0791,9.2541 -0.8348,14.8876 0.3221,18.0143 1.1569,3.1267 2.1728,4.6238 2.9703,5.8334 1.5949,2.4191 2.5923,3.4502 3.5406,4.4855 1.8968,2.0706 3.534
4,3.5781 5.4875,5.3526 3.9063,3.5488 8.8328,7.7175 14.7432004,12.5929 11.8209,9.7508 27.3516996,22.1087 42.9406996,34.4473 15.5891,12.3387 31.2284,24.6454 42.8909,34.0001 2.9571,2.3718 4.6718,3.8084 7.0371,5.7391 -0.8216,2.9463 -1.4018,5.1168 -2.454,8.7686 -4.1395,14.3669 -9.8047,33.4386 -15.4333,52.5075 -5.6286,19.0689 -11.2079,38.112 -15.2486,52.8939 -2.0203,7.3911 -3.6393,13.6329 -4.7863,18.7846 -0.5735,2.5759 -1.042,4.7737 -1.3987,7.559 -0.1783,1.3927 -0.4084,2.7918 -0.3175,5.6879 0.045,1.448 0.096,3.2687 0.9528,6.4907 0.8565,3.2219 2.2659,9.1144 10.116,14.9028 7.8496,5.788 13.8959,5.3997 17.2267,5.2659 3.3307,-0.1338 5.0643,-0.645 6.461,-1.0295 2.7934,-0.7688 4.0748,-1.4011 5.3525,-1.9829 2.5554,-1.1636 4.5018,-2.2528 6.7932,-3.5618 4.5827,-2.6178 10.081499,-6.0126 16.545399,-10.1264 12.9278,-8.2276 29.4856,-19.1739 46.0396,-30.1852 16.554,-11.0112 33.0855,-22.0837 45.5877,-30.2833 3.1757,-2.0827 5.0705,-3.2654 7.6413,-4.9201 2.5462,1.6904 4.4207,2.9064 7.5651,5.0329 12
.3842,8.3751 28.7614,19.6693 45.157,30.913 16.3955,11.2438 32.7966,22.4357 45.606,30.8449 6.4047,4.2047 11.8493,7.6693 16.3944,10.3516 2.2725,1.3411 4.1969,2.4635 6.7357,3.6632 1.2694,0.5998 2.5563,1.2469 5.3388,2.0552 1.3912,0.4042 3.1141,0.9277 6.4429,1.1086 3.327,0.1806 9.3735,0.6474 17.2974,-5.0198 0.01,0 0.012,-0.012 0.02,-0.017 7.9112,-5.6721 9.4226,-11.5306 10.3236,-14.7368 0.9019,-3.2093 0.9529,-5.0228 1.0188,-6.47 0.1318,-2.8942 -0.057,-4.3064 -0.216,-5.7015 -0.3172,-2.7899 -0.7559,-4.9904 -1.2929,-7.5742 -1.0739,-5.1674 -2.6061,-11.4358 -4.5216,-18.8549 -3.831,-14.8379 -9.1428,-33.9649 -14.5009,-53.1119 -5.3581,-19.147 -10.7695,-38.2826 -14.7053,-52.7071 -1.0002,-3.6661 -1.5408,-5.8394 -2.3205,-8.7969 2.395,-1.8997 4.1251,-3.3179 7.1203,-5.652 11.7927,-9.1898 27.5945,-21.2724 43.3552,-33.3907 15.7608,-12.1182 31.4785,-24.2606 43.4351,-33.8442 5.9783,-4.7918 10.9591,-8.8901 14.9148,-12.3836 1.9779,-1.7468 3.6289,-3.2402 5.5546,-5.2839 0.9628,-1.0219 1.9825,-2.0386 3
.6112,-4.4351 0.8143,-1.1982 1.837,-2.6705 3.0377,-5.7805 1.2007,-3.1101 3.529,-8.7062 0.5806,-18.0026 -2.9486,-9.2973 -8.0742,-12.5325 -10.8479,-14.382 -2.7736,-1.8494 -4.4663,-2.4765 -5.8223,-2.9864 -2.712,-1.0197 -4.1212,-1.2735 -5.4969,-1.5537 -2.7515,-0.5604 -4.9635,-0.8186 -7.5867,-1.1062 -5.2465,-0.5753 -11.7044,-1.0494 -19.3523,-1.52 -15.2958,-0.9412 -35.1277,-1.808 -54.9935,-2.6283 -19.8659,-0.8202 -39.739,-1.589 -54.6739,-2.3028 -3.7875,-0.1811 -6.0146,-0.3365 -9.0637,-0.5084 -1.0666,-2.8649 -1.8817,-4.9574 -3.1761,-8.5274 -5.0961,-14.0544 -11.7204,-32.8095 -18.3755,-51.5423 -6.6551,-18.7329 -13.342,-37.413 -18.762,-51.745 -2.7101,-7.166 -5.0646,-13.1757 -7.165,-18.0171 -1.0501,-2.4207 -1.9598,-4.4724 -3.3085,-6.9352 -0.6744,-1.23138 -1.3296,-2.50538 -3.1056,-4.79478 -0.888,-1.1447 -1.9689,-2.5712 -4.5557,-4.674 -2.2634,-1.84 -6.0799,-5.1012 -13.5301,-5.9301 z m 61.1249,151.08218 c 0.2552,0.049 0.8192,0.3563 1.1885,0.4999 -1.2106,-0.098 -2.2102,-0.1836 -2.7439,-0.2
415 0.3071,-0.047 0.5006,-0.4621 1.5554,-0.2584 z m 14.2407,10.1106 c 1.3196,1.6513 0.9652,2.2169 1.0624,2.6092 -0.2145,-0.4953 -0.5988,-1.4502 -1.0624,-2.6092 z m -145.4626,-11.034 c 1.065,-0.1903 1.2497,0.2313 1.56,0.2769 -0.5409,0.051 -1.5465,0.133 -2.7871,0.2155 0.3847,-0.1453 0.9645,-0.4456 1.2271,-0.4924 z m -14.3885,9.9433 c -0.4712,1.1307 -0.8718,2.0671 -1.0903,2.5529 0.097,-0.388 -0.2216,-0.9455 1.0903,-2.5529 z m 199.647,125.7678 c 0.1773,0.3426 0.7333,0.663 0.6098,2.7139 -0.2836,-1.1922 -0.4998,-2.1871 -0.6098,-2.7139 z m -4.4977,18.0742 c -1.1539,1.7484 -1.8013,1.6029 -2.1449,1.8072 0.4028,-0.3552 1.1927,-1.0137 2.1449,-1.8072 z M 89.065071,426.22264 c -0.1189,0.5323 -0.374,1.5279 -0.6854,2.7572 -0.1056,-2.1206 0.5192,-2.3961 0.6854,-2.7572 z m 4.2202,18.1439 c 0.944,0.8092 1.7124,1.4787 2.1127,1.8417 -0.3406,-0.2139 -0.978,-0.065 -2.1127,-1.8417 z m 126.130499,78.0204 c -0.2747,0.2715 -0.391,0.8999 -2.3662,1.4175 1.0353,-0.6314 1.9004,-1.1506 2.3662,-1.4175 z m
-20.9568,-0.1596 c 0.4633,0.274 1.3347,0.8181 2.3867,1.4804 -2.0176,-0.5544 -2.0937,-1.2131 -2.3867,-1.4804 z"
- style="fill:url(#linearGradient4825);fill-opacity:1;stroke:#888a85;stroke-width:10.48512936000000018;stroke-miterlimit:4;stroke-opacity:1" />
+ style="fill:url(#linearGradient4825);fill-opacity:1;stroke:#888a85;stroke-width:10.48512936;stroke-miterlimit:4;stroke-opacity:1" />
<path
inkscape:export-ydpi="7"
inkscape:export-xdpi="7"
@@ -206,14 +215,76 @@
inkscape:export-xdpi="7.3734169"
inkscape:export-filename="/home/paolo/workspace/gthumb/data/icons/hicolor/48x48/actions/selection1.png"
transform="matrix(0.41604145,0,0,0.31433423,483.94113,206.08199)"
- d="m -193.9493,1319.0425 a 173.74623,28.284271 0 1 1 -347.49246,0 173.74623,28.284271 0 1 1 347.49246,0 z"
+ d="m -193.9493,1319.0425 c 0,15.621 -77.78883,28.2843 -173.74623,28.2843 -95.95739,0 -173.74623,-12.6633 -173.74623,-28.2843 0,-15.621 77.78884,-28.2843 173.74623,-28.2843 95.9574,0 173.74623,12.6633 173.74623,28.2843 z"
sodipodi:ry="28.284271"
sodipodi:rx="173.74623"
sodipodi:cy="1319.0425"
sodipodi:cx="-367.69553"
id="path4845"
- style="opacity:0.22021583;fill:#000000;fill-opacity:1;stroke:none;filter:url(#filter4087)"
+ style="opacity:0.22021586;fill:#000000;fill-opacity:1;stroke:none;filter:url(#filter4087)"
sodipodi:type="arc" />
</g>
+ <g
+ inkscape:export-ydpi="7"
+ inkscape:export-xdpi="7"
+ inkscape:export-filename="/home/paolo/workspace/gthumb/data/icons/hicolor/22x22/actions/selection.png"
+ id="g3012"
+ transform="matrix(0.46591026,0,0,0.46591026,658.63952,334.56526)">
+ <rect
+ inkscape:export-ydpi="7.3734169"
+ inkscape:export-xdpi="7.3734169"
+ inkscape:export-filename="/home/paolo/workspace/gthumb/data/icons/hicolor/48x48/actions/selection1.png"
+ ry="0.5569768"
+ y="107.434"
+ x="-101.339"
+ height="614.31165"
+ width="614.31165"
+ id="rect3014"
+ style="opacity:0.28057556;fill:none;stroke:none" />
+ <path
+ inkscape:export-ydpi="7.3734169"
+ inkscape:export-xdpi="7.3734169"
+ inkscape:export-filename="/home/paolo/workspace/gthumb/data/icons/hicolor/48x48/actions/selection1.png"
+ transform="matrix(0.41604145,0,0,0.31433423,227.96848,206.08199)"
+ d="m -193.9493,1319.0425 c 0,15.621 -77.78883,28.2843 -173.74623,28.2843 -95.95739,0 -173.74623,-12.6633 -173.74623,-28.2843 0,-15.621 77.78884,-28.2843 173.74623,-28.2843 95.9574,0 173.74623,12.6633 173.74623,28.2843 z"
+ sodipodi:ry="28.284271"
+ sodipodi:rx="173.74623"
+ sodipodi:cy="1319.0425"
+ sodipodi:cx="-367.69553"
+ id="path3016"
+ style="opacity:0.22021586;fill:#000000;fill-opacity:1;stroke:none;filter:url(#filter4087)"
+ sodipodi:type="arc" />
+ <path
+ style="fill:url(#linearGradient3024);fill-opacity:1;stroke:#888a85;stroke-width:10.48512936;stroke-miterlimit:4;stroke-opacity:1"
+ d="m 215.03817,142.06206 c -1.0643,-0.1184 -2.1933,-0.1856 -3.4123,-0.1942 -9.7521,-0.069 -14.4302,3.8074 -17.0463,5.8736 -2.6161,2.0661 -3.7221,3.5019 -4.6261,4.634 -1.8079,2.2641 -2.4702,3.5325 -3.1618,4.7543 -1.3833,2.44358 -2.3334,4.46398 -3.4177,6.86968 -2.1684,4.8115 -4.6038,10.7812 -7.4147,17.9084 -5.6217,14.2545 -12.567,32.8404 -19.4858,51.4781 -6.9189,18.6376 -13.8056,37.3117 -19.0995,51.2932 -1.3459,3.5545 -2.1864,5.6347 -3.2941,8.4862 -3.0507,0.1289 -5.2847,0.2483 -9.0737,0.3761 -14.9414,0.5036 -34.832299,0.9899 -54.705099,1.5306 -19.8727,0.5407 -39.7067,1.1261 -55.0122,1.8521 -7.6527996,0.363 -14.1025996,0.7449 -19.3561996,1.2464 -2.6268,0.2507 -4.844,0.4917 -7.6031004,1.0133 -1.3795,0.2609 -2.7989,0.4871 -5.525,1.4686 -1.3631,0.4908 -3.0638,1.0833 -5.863,2.8937 -2.7993,1.8103 -7.9711,4.972 -11.0499,14.2255 -3.0791,9.2541 -0.8348,14.8876 0.3221,18.0143 1.1569,3.1267 2.1728,4.6238 2.9703,5.8334 1.5949,2.4191 2.5923,3.4502 3.5406,4.4855 1.8968,2.0706 3.534
4,3.5781 5.4875,5.3526 3.9063,3.5488 8.8328,7.7175 14.7432004,12.5929 11.8209,9.7508 27.3516996,22.1087 42.9406996,34.4473 15.5891,12.3387 31.2284,24.6454 42.8909,34.0001 2.9571,2.3718 4.6718,3.8084 7.0371,5.7391 -0.8216,2.9463 -1.4018,5.1168 -2.454,8.7686 -4.1395,14.3669 -9.8047,33.4386 -15.4333,52.5075 -5.6286,19.0689 -11.2079,38.112 -15.2486,52.8939 -2.0203,7.3911 -3.6393,13.6329 -4.7863,18.7846 -0.5735,2.5759 -1.042,4.7737 -1.3987,7.559 -0.1783,1.3927 -0.4084,2.7918 -0.3175,5.6879 0.045,1.448 0.096,3.2687 0.9528,6.4907 0.8565,3.2219 2.2659,9.1144 10.116,14.9028 7.8496,5.788 13.8959,5.3997 17.2267,5.2659 3.3307,-0.1338 5.0643,-0.645 6.461,-1.0295 2.7934,-0.7688 4.0748,-1.4011 5.3525,-1.9829 2.5554,-1.1636 4.5018,-2.2528 6.7932,-3.5618 4.5827,-2.6178 10.081499,-6.0126 16.545399,-10.1264 12.9278,-8.2276 29.4856,-19.1739 46.0396,-30.1852 16.554,-11.0112 33.0855,-22.0837 45.5877,-30.2833 3.1757,-2.0827 5.0705,-3.2654 7.6413,-4.9201 2.5462,1.6904 4.4207,2.9064 7.5651,5.0329 12
.3842,8.3751 28.7614,19.6693 45.157,30.913 16.3955,11.2438 32.7966,22.4357 45.606,30.8449 6.4047,4.2047 11.8493,7.6693 16.3944,10.3516 2.2725,1.3411 4.1969,2.4635 6.7357,3.6632 1.2694,0.5998 2.5563,1.2469 5.3388,2.0552 1.3912,0.4042 3.1141,0.9277 6.4429,1.1086 3.327,0.1806 9.3735,0.6474 17.2974,-5.0198 0.01,0 0.012,-0.012 0.02,-0.017 7.9112,-5.6721 9.4226,-11.5306 10.3236,-14.7368 0.9019,-3.2093 0.9529,-5.0228 1.0188,-6.47 0.1318,-2.8942 -0.057,-4.3064 -0.216,-5.7015 -0.3172,-2.7899 -0.7559,-4.9904 -1.2929,-7.5742 -1.0739,-5.1674 -2.6061,-11.4358 -4.5216,-18.8549 -3.831,-14.8379 -9.1428,-33.9649 -14.5009,-53.1119 -5.3581,-19.147 -10.7695,-38.2826 -14.7053,-52.7071 -1.0002,-3.6661 -1.5408,-5.8394 -2.3205,-8.7969 2.395,-1.8997 4.1251,-3.3179 7.1203,-5.652 11.7927,-9.1898 27.5945,-21.2724 43.3552,-33.3907 15.7608,-12.1182 31.4785,-24.2606 43.4351,-33.8442 5.9783,-4.7918 10.9591,-8.8901 14.9148,-12.3836 1.9779,-1.7468 3.6289,-3.2402 5.5546,-5.2839 0.9628,-1.0219 1.9825,-2.0386 3
.6112,-4.4351 0.8143,-1.1982 1.837,-2.6705 3.0377,-5.7805 1.2007,-3.1101 3.529,-8.7062 0.5806,-18.0026 -2.9486,-9.2973 -8.0742,-12.5325 -10.8479,-14.382 -2.7736,-1.8494 -4.4663,-2.4765 -5.8223,-2.9864 -2.712,-1.0197 -4.1212,-1.2735 -5.4969,-1.5537 -2.7515,-0.5604 -4.9635,-0.8186 -7.5867,-1.1062 -5.2465,-0.5753 -11.7044,-1.0494 -19.3523,-1.52 -15.2958,-0.9412 -35.1277,-1.808 -54.9935,-2.6283 -19.8659,-0.8202 -39.739,-1.589 -54.6739,-2.3028 -3.7875,-0.1811 -6.0146,-0.3365 -9.0637,-0.5084 -1.0666,-2.8649 -1.8817,-4.9574 -3.1761,-8.5274 -5.0961,-14.0544 -11.7204,-32.8095 -18.3755,-51.5423 -6.6551,-18.7329 -13.342,-37.413 -18.762,-51.745 -2.7101,-7.166 -5.0646,-13.1757 -7.165,-18.0171 -1.0501,-2.4207 -1.9598,-4.4724 -3.3085,-6.9352 -0.6744,-1.23138 -1.3296,-2.50538 -3.1056,-4.79478 -0.888,-1.1447 -1.9689,-2.5712 -4.5557,-4.674 -2.2634,-1.84 -6.0799,-5.1012 -13.5301,-5.9301 z m 61.1249,151.08218 c 0.2552,0.049 0.8192,0.3563 1.1885,0.4999 -1.2106,-0.098 -2.2102,-0.1836 -2.7439,-0.2
415 0.3071,-0.047 0.5006,-0.4621 1.5554,-0.2584 z m 14.2407,10.1106 c 1.3196,1.6513 0.9652,2.2169 1.0624,2.6092 -0.2145,-0.4953 -0.5988,-1.4502 -1.0624,-2.6092 z m -145.4626,-11.034 c 1.065,-0.1903 1.2497,0.2313 1.56,0.2769 -0.5409,0.051 -1.5465,0.133 -2.7871,0.2155 0.3847,-0.1453 0.9645,-0.4456 1.2271,-0.4924 z m -14.3885,9.9433 c -0.4712,1.1307 -0.8718,2.0671 -1.0903,2.5529 0.097,-0.388 -0.2216,-0.9455 1.0903,-2.5529 z m 199.647,125.7678 c 0.1773,0.3426 0.7333,0.663 0.6098,2.7139 -0.2836,-1.1922 -0.4998,-2.1871 -0.6098,-2.7139 z m -4.4977,18.0742 c -1.1539,1.7484 -1.8013,1.6029 -2.1449,1.8072 0.4028,-0.3552 1.1927,-1.0137 2.1449,-1.8072 z M 89.065071,426.22264 c -0.1189,0.5323 -0.374,1.5279 -0.6854,2.7572 -0.1056,-2.1206 0.5192,-2.3961 0.6854,-2.7572 z m 4.2202,18.1439 c 0.944,0.8092 1.7124,1.4787 2.1127,1.8417 -0.3406,-0.2139 -0.978,-0.065 -2.1127,-1.8417 z m 126.130499,78.0204 c -0.2747,0.2715 -0.391,0.8999 -2.3662,1.4175 1.0353,-0.6314 1.9004,-1.1506 2.3662,-1.4175 z m
-20.9568,-0.1596 c 0.4633,0.274 1.3347,0.8181 2.3867,1.4804 -2.0176,-0.5544 -2.0937,-1.2131 -2.3867,-1.4804 z"
+ id="path3018"
+ inkscape:connector-curvature="0"
+ inkscape:export-filename="/home/paolo/workspace/gthumb/data/icons/hicolor/48x48/actions/selection1.png"
+ inkscape:export-xdpi="7"
+ inkscape:export-ydpi="7" />
+ <path
+ style="fill:#555753;fill-opacity:1;stroke:none"
+ inkscape:transform-center-x="-0.945208"
+ inkscape:transform-center-y="-20.046537"
+ d="m 343.84438,586.19683 c -3.4654,2.4807 -130.468,-88.4905 -134.7297,-88.5205 -4.2616,-0.03 -132.532803,89.1435 -135.962903,86.6143 -3.4301,-2.5292 43.842603,-151.4275 42.554203,-155.4898 -1.2884,-4.0624 -125.735403,-98.4993 -124.3900026,-102.5432 1.3455,-4.0438 157.5643026,-5.0969 161.0297026,-7.5775 3.4654,-2.4807 54.824,-150.0195 59.0857,-149.9895 4.2617,0.03 53.5374,148.2775 56.9676,150.8067 3.4301,2.5292 159.6185,5.7822 160.9069,9.8446 1.2884,4.0623 -124.4763,96.7373 -125.8217,100.7811 -1.3455,4.0438 43.8256,153.5931 40.3602,156.0738 z"
+ id="path3020"
+ inkscape:connector-curvature="0"
+ inkscape:export-filename="/home/paolo/workspace/gthumb/data/icons/hicolor/48x48/actions/selection1.png"
+ inkscape:export-xdpi="7"
+ inkscape:export-ydpi="7" />
+ <path
+ sodipodi:type="arc"
+ style="opacity:0.22021586;fill:#000000;fill-opacity:1;stroke:none;filter:url(#filter4087)"
+ id="path3022"
+ sodipodi:cx="-367.69553"
+ sodipodi:cy="1319.0425"
+ sodipodi:rx="173.74623"
+ sodipodi:ry="28.284271"
+ d="m -193.9493,1319.0425 c 0,15.621 -77.78883,28.2843 -173.74623,28.2843 -95.95739,0 -173.74623,-12.6633 -173.74623,-28.2843 0,-15.621 77.78884,-28.2843 173.74623,-28.2843 95.9574,0 173.74623,12.6633 173.74623,28.2843 z"
+ transform="matrix(0.41604145,0,0,0.31433423,483.94113,206.08199)"
+ inkscape:export-filename="/home/paolo/workspace/gthumb/data/icons/hicolor/48x48/actions/selection1.png"
+ inkscape:export-xdpi="7.3734169"
+ inkscape:export-ydpi="7.3734169" />
+ </g>
</g>
</svg>
diff --git a/extensions/Makefile.am b/extensions/Makefile.am
index ae85e78..f3eeec4 100644
--- a/extensions/Makefile.am
+++ b/extensions/Makefile.am
@@ -56,8 +56,8 @@ SUBDIRS = \
rename_series \
resize_images \
search \
+ selections \
slideshow \
- work_queues \
$(EXPORTERS) \
$(IMPORTERS) \
$(OTHER_TOOLS) \
diff --git a/extensions/selections/Makefile.am b/extensions/selections/Makefile.am
new file mode 100644
index 0000000..1d1156e
--- /dev/null
+++ b/extensions/selections/Makefile.am
@@ -0,0 +1,31 @@
+extensiondir = $(pkglibdir)/extensions
+extension_LTLIBRARIES = libselections.la
+
+libselections_la_SOURCES = \
+ actions.c \
+ actions.h \
+ callbacks.c \
+ callbacks.h \
+ gth-file-source-selections.c \
+ gth-file-source-selections.h \
+ gth-selections-manager.c \
+ gth-selections-manager.h \
+ main.c
+
+libselections_la_CFLAGS = $(GTHUMB_CFLAGS) -I$(top_srcdir) -I$(top_builddir)/gthumb
+libselections_la_LDFLAGS = $(EXTENSION_LIBTOOL_FLAGS)
+libselections_la_LIBADD = $(GTHUMB_LIBS)
+libselections_la_DEPENDENCIES = $(top_builddir)/gthumb/gthumb$(EXEEXT)
+
+extensioninidir = $(extensiondir)
+extensionini_in_files = selections.extension.in.in
+extensionini_DATA = $(extensionini_in_files:.extension.in.in=.extension)
+
+ GTHUMB_EXTENSION_IN_RULE@
+ GTHUMB_EXTENSION_RULE@
+
+EXTRA_DIST = $(extensionini_in_files)
+
+DISTCLEANFILES = $(extensionini_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/extensions/work_queues/actions.c b/extensions/selections/actions.c
similarity index 63%
rename from extensions/work_queues/actions.c
rename to extensions/selections/actions.c
index bba144e..d79d73d 100644
--- a/extensions/work_queues/actions.c
+++ b/extensions/selections/actions.c
@@ -25,13 +25,13 @@
static void
-gth_browser_activate_action_show_work_queue (GthBrowser *browser,
- int n_queue)
+gth_browser_activate_action_show_selection (GthBrowser *browser,
+ int n_selection)
{
char *uri;
GFile *location;
- uri = g_strdup_printf ("queue:///%d", n_queue);
+ uri = g_strdup_printf ("selection:///%d", n_selection);
location = g_file_new_for_uri (uri);
gth_browser_load_location (browser, location);
@@ -41,24 +41,24 @@ gth_browser_activate_action_show_work_queue (GthBrowser *browser,
void
-gth_browser_activate_action_go_queue_1 (GtkAction *action,
- GthBrowser *browser)
+gth_browser_activate_action_go_selection_1 (GtkAction *action,
+ GthBrowser *browser)
{
- gth_browser_activate_action_show_work_queue (browser, 1);
+ gth_browser_activate_action_show_selection (browser, 1);
}
void
-gth_browser_activate_action_go_queue_2 (GtkAction *action,
- GthBrowser *browser)
+gth_browser_activate_action_go_selection_2 (GtkAction *action,
+ GthBrowser *browser)
{
- gth_browser_activate_action_show_work_queue (browser, 2);
+ gth_browser_activate_action_show_selection (browser, 2);
}
void
-gth_browser_activate_action_go_queue_3 (GtkAction *action,
- GthBrowser *browser)
+gth_browser_activate_action_go_selection_3 (GtkAction *action,
+ GthBrowser *browser)
{
- gth_browser_activate_action_show_work_queue (browser, 3);
+ gth_browser_activate_action_show_selection (browser, 3);
}
diff --git a/extensions/work_queues/actions.h b/extensions/selections/actions.h
similarity index 84%
rename from extensions/work_queues/actions.h
rename to extensions/selections/actions.h
index 72ca7fb..7de5e18 100644
--- a/extensions/work_queues/actions.h
+++ b/extensions/selections/actions.h
@@ -26,8 +26,8 @@
#define DEFINE_ACTION(x) void x (GtkAction *action, gpointer data);
-DEFINE_ACTION(gth_browser_activate_action_go_queue_1)
-DEFINE_ACTION(gth_browser_activate_action_go_queue_2)
-DEFINE_ACTION(gth_browser_activate_action_go_queue_3)
+DEFINE_ACTION(gth_browser_activate_action_go_selection_1)
+DEFINE_ACTION(gth_browser_activate_action_go_selection_2)
+DEFINE_ACTION(gth_browser_activate_action_go_selection_3)
#endif /* ACTIONS_H */
diff --git a/extensions/work_queues/callbacks.c b/extensions/selections/callbacks.c
similarity index 68%
rename from extensions/work_queues/callbacks.c
rename to extensions/selections/callbacks.c
index 6fb57a3..f69df21 100644
--- a/extensions/work_queues/callbacks.c
+++ b/extensions/selections/callbacks.c
@@ -25,37 +25,37 @@
#include <glib-object.h>
#include <gthumb.h>
#include "actions.h"
-#include "gth-file-source-work-queues.h"
-#include "gth-queue-manager.h"
+#include "gth-file-source-selections.h"
+#include "gth-selections-manager.h"
-#define BROWSER_DATA_KEY "work-queues-browser-data"
+#define BROWSER_DATA_KEY "selections-browser-data"
static const char *fixed_ui_info =
"<ui>"
-" <accelerator action=\"Go_Queue_1\" />"
-" <accelerator action=\"Go_Queue_2\" />"
-" <accelerator action=\"Go_Queue_3\" />"
+" <accelerator action=\"Go_Selection_1\" />"
+" <accelerator action=\"Go_Selection_2\" />"
+" <accelerator action=\"Go_Selection_3\" />"
"</ui>";
-static GtkActionEntry work_queues_action_entries[] = {
- { "Go_Queue_1", NULL,
+static GtkActionEntry selections_action_entries[] = {
+ { "Go_Selection_1", NULL,
NULL, "<control>1",
NULL,
- G_CALLBACK (gth_browser_activate_action_go_queue_1) },
- { "Go_Queue_2", NULL,
+ G_CALLBACK (gth_browser_activate_action_go_selection_1) },
+ { "Go_Selection_2", NULL,
NULL, "<control>2",
NULL,
- G_CALLBACK (gth_browser_activate_action_go_queue_2) },
- { "Go_Queue_3", NULL,
+ G_CALLBACK (gth_browser_activate_action_go_selection_2) },
+ { "Go_Selection_3", NULL,
NULL, "<control>3",
NULL,
- G_CALLBACK (gth_browser_activate_action_go_queue_3) }
+ G_CALLBACK (gth_browser_activate_action_go_selection_3) }
};
-static guint work_queues_action_entries_size = G_N_ELEMENTS (work_queues_action_entries);
+static guint selections_action_entries_size = G_N_ELEMENTS (selections_action_entries);
typedef struct {
@@ -72,7 +72,7 @@ browser_data_free (BrowserData *data)
void
-work_queues__gth_browser_construct_cb (GthBrowser *browser)
+selections__gth_browser_construct_cb (GthBrowser *browser)
{
BrowserData *data;
GError *error = NULL;
@@ -84,11 +84,11 @@ work_queues__gth_browser_construct_cb (GthBrowser *browser)
data->browser = browser;
- data->actions = gtk_action_group_new ("Work Queues Actions");
+ data->actions = gtk_action_group_new ("Selections Actions");
gtk_action_group_set_translation_domain (data->actions, NULL);
gtk_action_group_add_actions (data->actions,
- work_queues_action_entries,
- work_queues_action_entries_size,
+ selections_action_entries,
+ selections_action_entries_size,
browser);
gtk_ui_manager_insert_action_group (gth_browser_get_ui_manager (browser), data->actions, 0);
@@ -100,8 +100,8 @@ work_queues__gth_browser_construct_cb (GthBrowser *browser)
static void
-gth_browser_activate_action_add_to_work_queue (GthBrowser *browser,
- int n_queue)
+gth_browser_activate_action_add_to_selection (GthBrowser *browser,
+ int n_selection)
{
char *uri;
GFile *folder;
@@ -109,12 +109,12 @@ gth_browser_activate_action_add_to_work_queue (GthBrowser *browser,
GList *file_list = NULL;
GList *files;
- uri = g_strdup_printf ("queue:///%d", n_queue);
+ uri = g_strdup_printf ("selection:///%d", n_selection);
folder = g_file_new_for_uri (uri);
items = gth_file_selection_get_selected (GTH_FILE_SELECTION (gth_browser_get_file_list_view (browser)));
file_list = gth_file_list_get_files (GTH_FILE_LIST (gth_browser_get_file_list (browser)), items);
files = gth_file_data_list_to_file_list (file_list);
- gth_queue_manager_add_files (folder, files, -1);
+ gth_selections_manager_add_files (folder, files, -1);
_g_object_list_unref (files);
_g_object_list_unref (file_list);
@@ -125,8 +125,8 @@ gth_browser_activate_action_add_to_work_queue (GthBrowser *browser,
gpointer
-work_queues__gth_browser_file_list_key_press_cb (GthBrowser *browser,
- GdkEventKey *event)
+selections__gth_browser_file_list_key_press_cb (GthBrowser *browser,
+ GdkEventKey *event)
{
gpointer result = NULL;
guint modifiers;
@@ -137,7 +137,7 @@ work_queues__gth_browser_file_list_key_press_cb (GthBrowser *browser,
case GDK_KEY_1:
case GDK_KEY_2:
case GDK_KEY_3:
- gth_browser_activate_action_add_to_work_queue (browser, gdk_keyval_to_lower (event->keyval) - GDK_KEY_1 + 1);
+ gth_browser_activate_action_add_to_selection (browser, gdk_keyval_to_lower (event->keyval) - GDK_KEY_1 + 1);
result = GINT_TO_POINTER (1);
break;
}
@@ -148,23 +148,23 @@ work_queues__gth_browser_file_list_key_press_cb (GthBrowser *browser,
void
-work_queues__gth_browser_update_extra_widget_cb (GthBrowser *browser)
+selections__gth_browser_update_extra_widget_cb (GthBrowser *browser)
{
GthFileData *location_data;
GtkWidget *extra_widget;
- int n_queue;
+ int n_selection;
char *msg;
location_data = gth_browser_get_location_data (browser);
- if (! _g_content_type_is_a (g_file_info_get_content_type (location_data->info), "gthumb/queue"))
+ if (! _g_content_type_is_a (g_file_info_get_content_type (location_data->info), "gthumb/selection"))
return;
- n_queue = g_file_info_get_attribute_int32 (location_data->info, "gthumb::n-queue");
+ n_selection = g_file_info_get_attribute_int32 (location_data->info, "gthumb::n-selection");
extra_widget = gth_browser_get_list_extra_widget (browser);
gth_embedded_dialog_set_gicon (GTH_EMBEDDED_DIALOG (extra_widget), g_file_info_get_icon (location_data->info), GTK_ICON_SIZE_DIALOG);
gth_embedded_dialog_set_primary_text (GTH_EMBEDDED_DIALOG (extra_widget), g_file_info_get_display_name (location_data->info));
- if (n_queue > 0)
- msg = g_strdup_printf (_("Use Alt-%d to add files to this selection, Ctrl-%d to view this selection."), n_queue, n_queue);
+ if (n_selection > 0)
+ msg = g_strdup_printf (_("Use Alt-%d to add files to this selection, Ctrl-%d to view this selection."), n_selection, n_selection);
else
msg = NULL;
gth_embedded_dialog_set_secondary_text (GTH_EMBEDDED_DIALOG (extra_widget), msg);
diff --git a/extensions/work_queues/callbacks.h b/extensions/selections/callbacks.h
similarity index 76%
rename from extensions/work_queues/callbacks.h
rename to extensions/selections/callbacks.h
index e60f773..18139d6 100644
--- a/extensions/work_queues/callbacks.h
+++ b/extensions/selections/callbacks.h
@@ -24,9 +24,9 @@
#include <gthumb.h>
-void work_queues__gth_browser_construct_cb (GthBrowser *browser);
-gpointer work_queues__gth_browser_file_list_key_press_cb (GthBrowser *browser,
- GdkEventKey *event);
-void work_queues__gth_browser_update_extra_widget_cb (GthBrowser *browser);
+void selections__gth_browser_construct_cb (GthBrowser *browser);
+gpointer selections__gth_browser_file_list_key_press_cb (GthBrowser *browser,
+ GdkEventKey *event);
+void selections__gth_browser_update_extra_widget_cb (GthBrowser *browser);
#endif /* CALLBACKS_H */
diff --git a/extensions/selections/gth-file-source-selections.c b/extensions/selections/gth-file-source-selections.c
new file mode 100644
index 0000000..bbd0f7c
--- /dev/null
+++ b/extensions/selections/gth-file-source-selections.c
@@ -0,0 +1,308 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+
+/*
+ * GThumb
+ *
+ * Copyright (C) 2012 Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <config.h>
+#include <string.h>
+#include <glib/gi18n.h>
+#include <glib.h>
+#include <gthumb.h>
+#include "gth-file-source-selections.h"
+#include "gth-selections-manager.h"
+
+
+struct _GthFileSourceSelectionsPrivate {
+ ListReady ready_func;
+ gpointer ready_data;
+};
+
+
+G_DEFINE_TYPE (GthFileSourceSelections, gth_file_source_selections, GTH_TYPE_FILE_SOURCE)
+
+
+static GList *
+get_entry_points (GthFileSource *file_source)
+{
+ GList *list = NULL;
+ GFile *file;
+ GFileInfo *info;
+
+ file = g_file_new_for_uri ("selection:///");
+ info = gth_file_source_get_file_info (file_source, file, GFILE_BASIC_ATTRIBUTES);
+ list = g_list_append (list, gth_file_data_new (file, info));
+
+ g_object_unref (info);
+ g_object_unref (file);
+
+ return list;
+}
+
+
+static GFile *
+gth_file_source_selections_to_gio_file (GthFileSource *file_source,
+ GFile *file)
+{
+ return g_file_dup (file);
+}
+
+
+static void
+update_file_info (GthFileSource *file_source,
+ GFile *file,
+ GFileInfo *info)
+{
+ gth_selections_manager_update_file_info (file, info);
+}
+
+
+static GFileInfo *
+gth_file_source_selections_get_file_info (GthFileSource *file_source,
+ GFile *file,
+ const char *attributes)
+{
+ GFileInfo *file_info;
+
+ file_info = g_file_info_new ();
+ update_file_info (file_source, file, file_info);
+
+ return file_info;
+}
+
+
+static GthFileData *
+gth_file_source_selections_get_file_data (GthFileSource *file_source,
+ GFile *file,
+ GFileInfo *info)
+{
+ GthFileData *file_data = NULL;
+
+ switch (g_file_info_get_file_type (info)) {
+ case G_FILE_TYPE_REGULAR:
+ file_data = gth_file_data_new (file, info);
+ break;
+
+ case G_FILE_TYPE_DIRECTORY:
+ update_file_info (file_source, file, info);
+ file_data = gth_file_data_new (file, info);
+ break;
+
+ default:
+ break;
+ }
+
+ return file_data;
+}
+
+
+static void
+gth_file_source_selections_write_metadata (GthFileSource *file_source,
+ GthFileData *file_data,
+ const char *attributes,
+ ReadyCallback callback,
+ gpointer user_data)
+{
+ object_ready_with_error (file_source, callback, user_data, NULL);
+}
+
+
+static void
+gth_file_source_selections_read_metadata (GthFileSource *file_source,
+ GthFileData *file_data,
+ const char *attributes,
+ ReadyCallback callback,
+ gpointer user_data)
+{
+ update_file_info (file_source, file_data->file, file_data->info);
+ object_ready_with_error (file_source, callback, user_data, NULL);
+}
+
+
+static void
+gth_file_source_selections_rename (GthFileSource *file_source,
+ GFile *file,
+ const char *edit_name,
+ ReadyCallback callback,
+ gpointer user_data)
+{
+ object_ready_with_error (file_source, callback, user_data, NULL);
+}
+
+
+static void
+gth_file_source_selections_for_each_child (GthFileSource *file_source,
+ GFile *parent,
+ gboolean recursive,
+ const char *attributes,
+ StartDirCallback start_dir_func,
+ ForEachChildCallback for_each_file_func,
+ ReadyCallback ready_func,
+ gpointer user_data)
+{
+ if (start_dir_func != NULL) {
+ GFileInfo *info;
+ GError *error = NULL;
+
+ info = gth_file_source_selections_get_file_info (file_source, parent, "");
+
+ switch (start_dir_func (parent, info, &error, user_data)) {
+ case DIR_OP_CONTINUE:
+ break;
+ case DIR_OP_SKIP:
+ object_ready_with_error (file_source, ready_func, user_data, NULL);
+ return;
+ case DIR_OP_STOP:
+ object_ready_with_error (file_source, ready_func, user_data, error);
+ g_object_unref (info);
+ return;
+ }
+
+ g_object_unref (info);
+ }
+
+
+ gth_selections_manager_for_each_child (parent,
+ attributes,
+ gth_file_source_get_cancellable (file_source),
+ for_each_file_func,
+ ready_func,
+ user_data);
+}
+
+
+static void
+gth_file_source_selections_copy (GthFileSource *file_source,
+ GthFileData *destination,
+ GList *file_list, /* GFile * list */
+ gboolean move,
+ int destination_position,
+ ProgressCallback progress_callback,
+ DialogCallback dialog_callback,
+ ReadyCallback ready_callback,
+ gpointer user_data)
+{
+ if (gth_selections_manager_add_files (destination->file,
+ file_list,
+ destination_position))
+ {
+ gth_monitor_folder_changed (gth_main_get_default_monitor (),
+ destination->file,
+ file_list,
+ GTH_MONITOR_EVENT_CREATED);
+ }
+
+ object_ready_with_error (file_source, ready_callback, user_data, NULL);
+}
+
+
+static gboolean
+gth_file_source_selections_can_cut (GthFileSource *file_source,
+ GFile *file)
+{
+ return FALSE;
+}
+
+
+static gboolean
+gth_file_source_selections_is_reorderable (GthFileSource *file_source)
+{
+ return TRUE;
+}
+
+
+static void
+gth_file_source_selections_reorder (GthFileSource *file_source,
+ GthFileData *destination,
+ GList *visible_files, /* GFile list */
+ GList *files_to_move, /* GFile list */
+ int dest_pos,
+ ReadyCallback callback,
+ gpointer data)
+{
+ gth_selections_manager_reorder (destination->file,
+ visible_files,
+ files_to_move,
+ dest_pos);
+ object_ready_with_error (file_source, callback, data, NULL);
+}
+
+
+static void
+gth_file_source_selections_remove (GthFileSource *file_source,
+ GthFileData *location,
+ GList *file_list /* GthFileData list */,
+ gboolean permanently,
+ GtkWindow *parent)
+{
+ GList *files;
+
+ files = gth_file_data_list_to_file_list (file_list);
+ gth_selections_manager_remove_files (location->file, files);
+
+ _g_object_list_unref (files);
+}
+
+
+static void
+gth_file_source_selections_finalize (GObject *object)
+{
+ GthFileSourceSelections *self = GTH_FILE_SOURCE_SELECTIONS (object);
+
+ if (self->priv != NULL) {
+ g_free (self->priv);
+ self->priv = NULL;
+ }
+
+ G_OBJECT_CLASS (gth_file_source_selections_parent_class)->finalize (object);
+}
+
+
+static void
+gth_file_source_selections_class_init (GthFileSourceSelectionsClass *class)
+{
+ GObjectClass *object_class;
+ GthFileSourceClass *file_source_class;
+
+ object_class = (GObjectClass*) class;
+ object_class->finalize = gth_file_source_selections_finalize;
+
+ file_source_class = (GthFileSourceClass*) class;
+ file_source_class->get_entry_points = get_entry_points;
+ file_source_class->to_gio_file = gth_file_source_selections_to_gio_file;
+ file_source_class->get_file_info = gth_file_source_selections_get_file_info;
+ file_source_class->get_file_data = gth_file_source_selections_get_file_data;
+ file_source_class->write_metadata = gth_file_source_selections_write_metadata;
+ file_source_class->read_metadata = gth_file_source_selections_read_metadata;
+ file_source_class->rename = gth_file_source_selections_rename;
+ file_source_class->for_each_child = gth_file_source_selections_for_each_child;
+ file_source_class->copy = gth_file_source_selections_copy;
+ file_source_class->can_cut = gth_file_source_selections_can_cut;
+ file_source_class->is_reorderable = gth_file_source_selections_is_reorderable;
+ file_source_class->reorder = gth_file_source_selections_reorder;
+ file_source_class->remove = gth_file_source_selections_remove;
+}
+
+
+static void
+gth_file_source_selections_init (GthFileSourceSelections *self)
+{
+ gth_file_source_add_scheme (GTH_FILE_SOURCE (self), "selection");
+
+ self->priv = g_new0 (GthFileSourceSelectionsPrivate, 1);
+}
diff --git a/extensions/selections/gth-file-source-selections.h b/extensions/selections/gth-file-source-selections.h
new file mode 100644
index 0000000..bf462a4
--- /dev/null
+++ b/extensions/selections/gth-file-source-selections.h
@@ -0,0 +1,51 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+
+/*
+ * GThumb
+ *
+ * Copyright (C) 2012 Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GTH_FILE_SOURCE_SELECTIONS_H
+#define GTH_FILE_SOURCE_SELECTIONS_H
+
+#include <gthumb.h>
+
+#define GTH_TYPE_FILE_SOURCE_SELECTIONS (gth_file_source_selections_get_type ())
+#define GTH_FILE_SOURCE_SELECTIONS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTH_TYPE_FILE_SOURCE_SELECTIONS, GthFileSourceSelections))
+#define GTH_FILE_SOURCE_SELECTIONS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GTH_TYPE_FILE_SOURCE_SELECTIONS, GthFileSourceSelectionsClass))
+#define GTH_IS_FILE_SOURCE_SELECTIONS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTH_TYPE_FILE_SOURCE_SELECTIONS))
+#define GTH_IS_FILE_SOURCE_SELECTIONS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GTH_TYPE_FILE_SOURCE_SELECTIONS))
+#define GTH_FILE_SOURCE_SELECTIONS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GTH_TYPE_FILE_SOURCE_SELECTIONS, GthFileSourceSelectionsClass))
+
+typedef struct _GthFileSourceSelections GthFileSourceSelections;
+typedef struct _GthFileSourceSelectionsPrivate GthFileSourceSelectionsPrivate;
+typedef struct _GthFileSourceSelectionsClass GthFileSourceSelectionsClass;
+
+struct _GthFileSourceSelections
+{
+ GthFileSource __parent;
+ GthFileSourceSelectionsPrivate *priv;
+};
+
+struct _GthFileSourceSelectionsClass
+{
+ GthFileSourceClass __parent_class;
+};
+
+GType gth_file_source_selections_get_type (void) G_GNUC_CONST;
+
+#endif /* GTH_FILE_SOURCE_SELECTIONS_H */
diff --git a/extensions/work_queues/gth-queue-manager.c b/extensions/selections/gth-selections-manager.c
similarity index 54%
rename from extensions/work_queues/gth-queue-manager.c
rename to extensions/selections/gth-selections-manager.c
index f76cf5b..8b6283a 100644
--- a/extensions/work_queues/gth-queue-manager.c
+++ b/extensions/selections/gth-selections-manager.c
@@ -24,36 +24,36 @@
#include <glib/gi18n.h>
#include <glib.h>
#include <gtk/gtk.h>
-#include "gth-queue-manager.h"
+#include "gth-selections-manager.h"
-#define N_QUEUES 3
+#define N_SELECTIONS 3
-struct _GthQueueManagerPrivate {
- GList *files[N_QUEUES];
+struct _GthSelectionsManagerPrivate {
+ GList *files[N_SELECTIONS];
GMutex *mutex;
};
-G_DEFINE_TYPE (GthQueueManager,
- gth_queue_manager,
+G_DEFINE_TYPE (GthSelectionsManager,
+ gth_selections_manager,
G_TYPE_OBJECT)
-static GthQueueManager *the_manager = NULL;
+static GthSelectionsManager *the_manager = NULL;
static GObject *
-gth_queue_manager_constructor (GType type,
- guint n_construct_params,
- GObjectConstructParam *construct_params)
+gth_selections_manager_constructor (GType type,
+ guint n_construct_params,
+ GObjectConstructParam *construct_params)
{
static GObject *object = NULL;
if (the_manager == NULL) {
- object = G_OBJECT_CLASS (gth_queue_manager_parent_class)->constructor (type, n_construct_params, construct_params);
- the_manager = GTH_QUEUE_MANAGER (object);
+ object = G_OBJECT_CLASS (gth_selections_manager_parent_class)->constructor (type, n_construct_params, construct_params);
+ the_manager = GTH_SELECTIONS_MANAGER (object);
}
else
object = G_OBJECT (the_manager);
@@ -63,57 +63,57 @@ gth_queue_manager_constructor (GType type,
static void
-gth_queue_manager_finalize (GObject *object)
+gth_selections_manager_finalize (GObject *object)
{
- GthQueueManager *self;
- int i;
+ GthSelectionsManager *self;
+ int i;
- self = GTH_QUEUE_MANAGER (object);
+ self = GTH_SELECTIONS_MANAGER (object);
- for (i = 0; i < N_QUEUES; i++)
+ for (i = 0; i < N_SELECTIONS; i++)
_g_object_list_unref (self->priv->files[i]);
g_mutex_free (self->priv->mutex);
- G_OBJECT_CLASS (gth_queue_manager_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gth_selections_manager_parent_class)->finalize (object);
}
static void
-gth_queue_manager_class_init (GthQueueManagerClass *klass)
+gth_selections_manager_class_init (GthSelectionsManagerClass *klass)
{
GObjectClass *object_class;
- g_type_class_add_private (klass, sizeof (GthQueueManagerPrivate));
+ g_type_class_add_private (klass, sizeof (GthSelectionsManagerPrivate));
object_class = (GObjectClass*) klass;
- object_class->constructor = gth_queue_manager_constructor;
- object_class->finalize = gth_queue_manager_finalize;
+ object_class->constructor = gth_selections_manager_constructor;
+ object_class->finalize = gth_selections_manager_finalize;
}
static void
-gth_queue_manager_init (GthQueueManager *self)
+gth_selections_manager_init (GthSelectionsManager *self)
{
int i;
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GTH_TYPE_QUEUE_MANAGER, GthQueueManagerPrivate);
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GTH_TYPE_SELECTIONS_MANAGER, GthSelectionsManagerPrivate);
self->priv->mutex = g_mutex_new ();
- for (i = 0; i < N_QUEUES; i++)
+ for (i = 0; i < N_SELECTIONS; i++)
self->priv->files[i] = NULL;
}
-static GthQueueManager *
-gth_queue_manager_get_default (void)
+static GthSelectionsManager *
+gth_selections_manager_get_default (void)
{
- return (GthQueueManager*) g_object_new (GTH_TYPE_QUEUE_MANAGER, NULL);
+ return (GthSelectionsManager*) g_object_new (GTH_TYPE_SELECTIONS_MANAGER, NULL);
}
-/* -- gth_queue_manager_for_each_child -- */
+/* -- gth_selections_manager_for_each_child -- */
typedef struct {
- GthQueueManager *queue_manager;
+ GthSelectionsManager *selections_manager;
GList *files;
GList *current_file;
char *attributes;
@@ -135,8 +135,8 @@ fec_data_free (ForEachChildData *data)
static void
-queue_manager_fec_done (ForEachChildData *data,
- GError *error)
+selections_manager_fec_done (ForEachChildData *data,
+ GError *error)
{
if (data->ready_callback != NULL)
data->ready_callback (NULL, error, data->user_data);
@@ -163,7 +163,7 @@ fec__file_info_ready_cb (GObject *source_object,
data->current_file = data->current_file->next;
if (data->current_file == NULL) {
- queue_manager_fec_done (data, NULL);
+ selections_manager_fec_done (data, NULL);
return;
}
@@ -179,27 +179,27 @@ fec__file_info_ready_cb (GObject *source_object,
static void
-queue_manager_fec_done_cb (GObject *object,
- GError *error,
- gpointer user_data)
+selections_manager_fec_done_cb (GObject *object,
+ GError *error,
+ gpointer user_data)
{
- queue_manager_fec_done (user_data, NULL);
+ selections_manager_fec_done (user_data, NULL);
}
static int
-_g_file_get_n_queue (GFile *file)
+_g_file_get_n_selection (GFile *file)
{
char *uri;
int n = -1;
uri = g_file_get_uri (file);
- if (! g_str_has_prefix (uri, "queue:///"))
+ if (! g_str_has_prefix (uri, "selection:///"))
n = -1;
- else if (strcmp (uri, "queue:///") == 0)
+ else if (strcmp (uri, "selection:///") == 0)
n = 0;
else
- n = atoi (uri + strlen ("queue:///"));
+ n = atoi (uri + strlen ("selection:///"));
g_free (uri);
@@ -208,27 +208,27 @@ _g_file_get_n_queue (GFile *file)
void
-gth_queue_manager_update_file_info (GFile *file,
- GFileInfo *info)
+gth_selections_manager_update_file_info (GFile *file,
+ GFileInfo *info)
{
- int n_queue;
+ int n_selection;
char *name;
- n_queue = _g_file_get_n_queue (file);
+ n_selection = _g_file_get_n_selection (file);
g_file_info_set_file_type (info, G_FILE_TYPE_DIRECTORY);
- g_file_info_set_content_type (info, "gthumb/queue");
+ g_file_info_set_content_type (info, "gthumb/selection");
- g_file_info_set_sort_order (info, n_queue);
+ g_file_info_set_sort_order (info, n_selection);
g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_READ, TRUE);
g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE, FALSE);
g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME, FALSE);
- g_file_info_set_attribute_int32 (info, "gthumb::n-queue", n_queue);
+ g_file_info_set_attribute_int32 (info, "gthumb::n-selection", n_selection);
/* icon */
- if (n_queue > 0) {
- name = g_strdup_printf ("selection%d", n_queue);
+ if (n_selection > 0) {
+ name = g_strdup_printf ("selection%d", n_selection);
g_file_info_set_icon (info, g_themed_icon_new (name));
g_free (name);
}
@@ -237,11 +237,11 @@ gth_queue_manager_update_file_info (GFile *file,
/* display name */
- if (n_queue > 0) {
+ if (n_selection > 0) {
g_file_info_set_attribute_boolean (info, "gthumb::no-child", TRUE);
- name = g_strdup_printf (_("Selection %d"), n_queue);
+ name = g_strdup_printf (_("Selection %d"), n_selection);
}
- else if (n_queue == 0)
+ else if (n_selection == 0)
name = g_strdup (_("Selections"));
else
name = g_strdup ("???");
@@ -251,20 +251,20 @@ gth_queue_manager_update_file_info (GFile *file,
static void
-_gth_queue_manager_for_each_queue (gpointer user_data)
+_gth_selections_manager_for_each_selection (gpointer user_data)
{
ForEachChildData *data = user_data;
int i;
- for (i = 0; i < N_QUEUES; i++) {
+ for (i = 0; i < N_SELECTIONS; i++) {
char *uri;
GFile *file;
GFileInfo *info;
- uri = g_strdup_printf ("queue:///%d", i + 1);
+ uri = g_strdup_printf ("selection:///%d", i + 1);
file = g_file_new_for_uri (uri);
info = g_file_info_new ();
- gth_queue_manager_update_file_info (file, info);
+ gth_selections_manager_update_file_info (file, info);
data->for_each_file_func (file, info, data->user_data);
g_object_unref (info);
@@ -272,7 +272,7 @@ _gth_queue_manager_for_each_queue (gpointer user_data)
g_free (uri);
}
- object_ready_with_error (data->queue_manager,
+ object_ready_with_error (data->selections_manager,
data->ready_callback,
data->user_data,
NULL);
@@ -281,25 +281,25 @@ _gth_queue_manager_for_each_queue (gpointer user_data)
void
-gth_queue_manager_for_each_child (GFile *folder,
- const char *attributes,
- GCancellable *cancellable,
- ForEachChildCallback for_each_file_func,
- ReadyCallback ready_callback,
- gpointer user_data)
+gth_selections_manager_for_each_child (GFile *folder,
+ const char *attributes,
+ GCancellable *cancellable,
+ ForEachChildCallback for_each_file_func,
+ ReadyCallback ready_callback,
+ gpointer user_data)
{
- GthQueueManager *self;
- int n_queue;
- ForEachChildData *data;
+ GthSelectionsManager *self;
+ int n_selection;
+ ForEachChildData *data;
- self = gth_queue_manager_get_default ();
- n_queue = _g_file_get_n_queue (folder);
+ self = gth_selections_manager_get_default ();
+ n_selection = _g_file_get_n_selection (folder);
g_mutex_lock (self->priv->mutex);
data = g_new0 (ForEachChildData, 1);
- data->queue_manager = self;
- if (n_queue > 0)
- data->files = _g_object_list_ref (self->priv->files[n_queue - 1]);
+ data->selections_manager = self;
+ if (n_selection > 0)
+ data->files = _g_object_list_ref (self->priv->files[n_selection - 1]);
data->current_file = data->files;
data->attributes = g_strdup (attributes);
data->cancellable = _g_object_ref(cancellable);
@@ -308,8 +308,8 @@ gth_queue_manager_for_each_child (GFile *folder,
data->user_data = user_data;
g_mutex_unlock (self->priv->mutex);
- if (n_queue == 0) {
- call_when_idle (_gth_queue_manager_for_each_queue, data);
+ if (n_selection == 0) {
+ call_when_idle (_gth_selections_manager_for_each_selection, data);
}
else if (data->current_file != NULL)
g_file_query_info_async ((GFile *) data->current_file->data,
@@ -320,32 +320,32 @@ gth_queue_manager_for_each_child (GFile *folder,
fec__file_info_ready_cb,
data);
else
- object_ready_with_error (NULL, queue_manager_fec_done_cb, data, NULL);
+ object_ready_with_error (NULL, selections_manager_fec_done_cb, data, NULL);
}
gboolean
-gth_queue_manager_add_files (GFile *folder,
- GList *file_list, /* GFile list */
- int destination_position)
+gth_selections_manager_add_files (GFile *folder,
+ GList *file_list, /* GFile list */
+ int destination_position)
{
- GthQueueManager *self;
- int n_queue;
- GList *new_list;
- GList *link;
+ GthSelectionsManager *self;
+ int n_selection;
+ GList *new_list;
+ GList *link;
- if (! g_file_has_uri_scheme (folder, "queue"))
+ if (! g_file_has_uri_scheme (folder, "selection"))
return FALSE;
- self = gth_queue_manager_get_default ();
- n_queue = _g_file_get_n_queue (folder);
- if (n_queue <= 0)
+ self = gth_selections_manager_get_default ();
+ n_selection = _g_file_get_n_selection (folder);
+ if (n_selection <= 0)
return FALSE;
g_mutex_lock (self->priv->mutex);
new_list = _g_file_list_dup (file_list);
- link = g_list_nth (self->priv->files[n_queue - 1], destination_position);
+ link = g_list_nth (self->priv->files[n_selection - 1], destination_position);
if (link != NULL) {
GList *last_new;
@@ -360,7 +360,7 @@ gth_queue_manager_add_files (GFile *folder,
link->prev = last_new;
}
else
- self->priv->files[n_queue - 1] = g_list_concat (self->priv->files[n_queue - 1], new_list);
+ self->priv->files[n_selection - 1] = g_list_concat (self->priv->files[n_selection - 1], new_list);
gth_monitor_folder_changed (gth_main_get_default_monitor (),
folder,
@@ -374,18 +374,18 @@ gth_queue_manager_add_files (GFile *folder,
void
-gth_queue_manager_remove_files (GFile *folder,
- GList *file_list)
+gth_selections_manager_remove_files (GFile *folder,
+ GList *file_list)
{
- GthQueueManager *self;
- int n_queue;
- GHashTable *files_to_remove;
- GList *scan;
- GList *new_list;
-
- self = gth_queue_manager_get_default ();
- n_queue = _g_file_get_n_queue (folder);
- if (n_queue <= 0)
+ GthSelectionsManager *self;
+ int n_selection;
+ GHashTable *files_to_remove;
+ GList *scan;
+ GList *new_list;
+
+ self = gth_selections_manager_get_default ();
+ n_selection = _g_file_get_n_selection (folder);
+ if (n_selection <= 0)
return;
g_mutex_lock (self->priv->mutex);
@@ -395,7 +395,7 @@ gth_queue_manager_remove_files (GFile *folder,
g_hash_table_insert (files_to_remove, scan->data, GINT_TO_POINTER (1));
new_list = NULL;
- for (scan = self->priv->files[n_queue - 1]; scan; scan = scan->next) {
+ for (scan = self->priv->files[n_selection - 1]; scan; scan = scan->next) {
GFile *file = scan->data;
if (g_hash_table_lookup (files_to_remove, file))
@@ -407,8 +407,8 @@ gth_queue_manager_remove_files (GFile *folder,
g_hash_table_unref (files_to_remove);
- _g_object_list_unref (self->priv->files[n_queue - 1]);
- self->priv->files[n_queue - 1] = new_list;
+ _g_object_list_unref (self->priv->files[n_selection - 1]);
+ self->priv->files[n_selection - 1] = new_list;
gth_monitor_folder_changed (gth_main_get_default_monitor (),
folder,
@@ -420,10 +420,10 @@ gth_queue_manager_remove_files (GFile *folder,
void
-gth_queue_manager_reorder (GFile *folder,
- GList *visible_files, /* GFile list */
- GList *files_to_move, /* GFile list */
- int dest_pos)
+gth_selections_manager_reorder (GFile *folder,
+ GList *visible_files, /* GFile list */
+ GList *files_to_move, /* GFile list */
+ int dest_pos)
{
/* FIXME */
}
diff --git a/extensions/selections/gth-selections-manager.h b/extensions/selections/gth-selections-manager.h
new file mode 100644
index 0000000..6fd06a7
--- /dev/null
+++ b/extensions/selections/gth-selections-manager.h
@@ -0,0 +1,74 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+
+/*
+ * GThumb
+ *
+ * Copyright (C) 2012 Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GTH_SELECTIONS_MANAGER_H
+#define GTH_SELECTIONS_MANAGER_H
+
+#include <glib-object.h>
+#include <gtk/gtk.h>
+#include <gthumb.h>
+
+G_BEGIN_DECLS
+
+#define GTH_TYPE_SELECTIONS_MANAGER (gth_selections_manager_get_type ())
+#define GTH_SELECTIONS_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTH_TYPE_SELECTIONS_MANAGER, GthSelectionsManager))
+#define GTH_SELECTIONS_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GTH_TYPE_SELECTIONS_MANAGER, GthSelectionsManagerClass))
+#define GTH_IS_SELECTIONS_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTH_TYPE_SELECTIONS_MANAGER))
+#define GTH_IS_SELECTIONS_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GTH_TYPE_SELECTIONS_MANAGER))
+#define GTH_SELECTIONS_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GTH_TYPE_SELECTIONS_MANAGER, GthSelectionsManagerClass))
+
+typedef struct _GthSelectionsManager GthSelectionsManager;
+typedef struct _GthSelectionsManagerPrivate GthSelectionsManagerPrivate;
+typedef struct _GthSelectionsManagerClass GthSelectionsManagerClass;
+
+struct _GthSelectionsManager {
+ GObject __parent;
+ GthSelectionsManagerPrivate *priv;
+};
+
+struct _GthSelectionsManagerClass {
+ GObjectClass __parent_class;
+};
+
+GType gth_selections_manager_get_type (void) G_GNUC_CONST;
+
+void gth_selections_manager_for_each_child (GFile *folder,
+ const char *attributes,
+ GCancellable *cancellable,
+ ForEachChildCallback for_each_file_func,
+ ReadyCallback ready_callback,
+ gpointer user_data);
+gboolean gth_selections_manager_add_files (GFile *folder,
+ GList *file_list, /* GFile list */
+ int destination_position);
+void gth_selections_manager_remove_files (GFile *folder,
+ GList *file_list);
+void gth_selections_manager_reorder (GFile *folder,
+ GList *visible_files, /* GFile list */
+ GList *files_to_move, /* GFile list */
+ int dest_pos);
+void gth_selections_manager_update_file_info (GFile *file,
+ GFileInfo *info);
+
+G_END_DECLS
+
+#endif /* GTH_SELECTIONS_MANAGER_H */
+
diff --git a/extensions/work_queues/main.c b/extensions/selections/main.c
similarity index 82%
rename from extensions/work_queues/main.c
rename to extensions/selections/main.c
index d8fd88d..ef87285 100644
--- a/extensions/work_queues/main.c
+++ b/extensions/selections/main.c
@@ -24,16 +24,16 @@
#include <gtk/gtk.h>
#include <gthumb.h>
#include "callbacks.h"
-#include "gth-file-source-work-queues.h"
+#include "gth-file-source-selections.h"
G_MODULE_EXPORT void
gthumb_extension_activate (void)
{
- gth_main_register_file_source (GTH_TYPE_FILE_SOURCE_WORK_QUEUES);
- gth_hook_add_callback ("gth-browser-construct", 10, G_CALLBACK (work_queues__gth_browser_construct_cb), NULL);
- gth_hook_add_callback ("gth-browser-file-list-key-press", 10, G_CALLBACK (work_queues__gth_browser_file_list_key_press_cb), NULL);
- gth_hook_add_callback ("gth-browser-update-extra-widget", 20, G_CALLBACK (work_queues__gth_browser_update_extra_widget_cb), NULL);
+ gth_main_register_file_source (GTH_TYPE_FILE_SOURCE_SELECTIONS);
+ gth_hook_add_callback ("gth-browser-construct", 10, G_CALLBACK (selections__gth_browser_construct_cb), NULL);
+ gth_hook_add_callback ("gth-browser-file-list-key-press", 10, G_CALLBACK (selections__gth_browser_file_list_key_press_cb), NULL);
+ gth_hook_add_callback ("gth-browser-update-extra-widget", 20, G_CALLBACK (selections__gth_browser_update_extra_widget_cb), NULL);
}
diff --git a/extensions/work_queues/work_queues.extension.in.in b/extensions/selections/selections.extension.in.in
similarity index 88%
rename from extensions/work_queues/work_queues.extension.in.in
rename to extensions/selections/selections.extension.in.in
index e94a2ac..b72197f 100644
--- a/extensions/work_queues/work_queues.extension.in.in
+++ b/extensions/selections/selections.extension.in.in
@@ -1,9 +1,10 @@
[Extension]
-_Name=Work Queues
+_Name=Selections
_Description=Advanced file selection.
_Authors=gthumb development team
Copyright=Copyright  2008-2012 The Free Software Foundation, Inc.
Version=%VERSION%
+Icon=selection
URL=http://live.gnome.org/gthumb
Category=Browser
diff --git a/gthumb/gth-main.c b/gthumb/gth-main.c
index b8a8570..6ed5b36 100644
--- a/gthumb/gth-main.c
+++ b/gthumb/gth-main.c
@@ -1204,9 +1204,9 @@ gth_main_activate_extensions (void)
"rename_series",
"resize_images",
"search",
+ "selections",
"slideshow",
"webalbums",
- "work_queues",
NULL };
int i;
GError *error = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]