[gthumb] header bar: added other commands to the header bar
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] header bar: added other commands to the header bar
- Date: Sat, 9 Nov 2013 20:05:34 +0000 (UTC)
commit 7e365b5f174815624632698f0b4b1b634b7496d2
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Oct 20 19:25:39 2013 +0200
header bar: added other commands to the header bar
data/icons/hicolor/scalable/actions/Makefile.am | 34 ++-
.../hicolor/scalable/actions/comment-symbolic.svg | 30 +++
.../hicolor/scalable/actions/palette-symbolic.svg | 229 ++++++++++++++++++
.../hicolor/scalable/actions/tag-symbolic.svg | 78 ++++++
.../actions/view-presentation-symbolic.svg | 4 +-
.../scalable/actions/view-zoom-fit-symbolic.svg | 113 +++++++++
.../actions/view-zoom-fit-width-symbolic.svg | 113 +++++++++
.../scalable/actions/view-zoom-in-symbolic.svg | 113 +++++++++
.../actions/view-zoom-original-symbolic.svg | 113 +++++++++
.../scalable/actions/view-zoom-out-symbolic.svg | 113 +++++++++
extensions/edit_metadata/actions.c | 71 ++++++
extensions/edit_metadata/actions.h | 4 +
extensions/edit_metadata/callbacks.c | 94 ++++-----
extensions/edit_metadata/callbacks.h | 1 -
extensions/edit_metadata/main.c | 1 -
extensions/gstreamer_tools/actions.c | 20 +-
extensions/gstreamer_tools/actions.h | 6 +-
extensions/gstreamer_tools/gth-media-viewer-page.c | 78 ++-----
extensions/image_print/callbacks.c | 12 -
extensions/image_viewer/gth-image-viewer-page.c | 247 ++++++++++----------
gthumb/gth-browser-actions-callbacks.c | 114 ++++++----
gthumb/gth-browser-actions-callbacks.h | 11 +-
gthumb/gth-browser-actions-entries.h | 44 +---
gthumb/gth-browser-ui.h | 16 --
gthumb/gth-browser.c | 157 ++++++++-----
gthumb/gth-browser.h | 11 +-
gthumb/gth-window.c | 53 +++++
gthumb/gth-window.h | 8 +
gthumb/gtk-utils.c | 16 ++
gthumb/gtk-utils.h | 1 +
30 files changed, 1456 insertions(+), 449 deletions(-)
---
diff --git a/data/icons/hicolor/scalable/actions/Makefile.am b/data/icons/hicolor/scalable/actions/Makefile.am
index b1dd19d..7c74593 100644
--- a/data/icons/hicolor/scalable/actions/Makefile.am
+++ b/data/icons/hicolor/scalable/actions/Makefile.am
@@ -4,19 +4,27 @@ context = actions
iconsdir = $(themedir)/$(size)/$(context)
-icons_DATA = \
- bookmarks-symbolic.svg \
- browser-mode.svg \
- file-catalog.svg \
- file-library.svg \
- file-search.svg \
- palette.svg \
- share.svg \
- slideshow-pause.svg \
- tag.svg \
- tool-adjust-contrast.svg \
- tool-sharpen.svg \
- view-presentation-symbolic.svg
+icons_DATA = \
+ bookmarks-symbolic.svg \
+ browser-mode.svg \
+ comment-symbolic.svg \
+ file-catalog.svg \
+ file-library.svg \
+ file-search.svg \
+ palette.svg \
+ palette-symbolic.svg \
+ share.svg \
+ slideshow-pause.svg \
+ tag.svg \
+ tag-symbolic.svg \
+ tool-adjust-contrast.svg \
+ tool-sharpen.svg \
+ view-presentation-symbolic.svg \
+ view-zoom-fit-symbolic.svg \
+ view-zoom-fit-width-symbolic.svg \
+ view-zoom-in-symbolic.svg \
+ view-zoom-original-symbolic.svg \
+ view-zoom-out-symbolic.svg
EXTRA_DIST = $(icons_DATA)
diff --git a/data/icons/hicolor/scalable/actions/comment-symbolic.svg
b/data/icons/hicolor/scalable/actions/comment-symbolic.svg
new file mode 100644
index 0000000..117b999
--- /dev/null
+++ b/data/icons/hicolor/scalable/actions/comment-symbolic.svg
@@ -0,0 +1,30 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:svg='http://www.w3.org/2000/svg'
xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' id='svg7384'
xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' version='1.1' inkscape:version='0.47
r22583' height='16' sodipodi:docname='user-available-symbolic.svg'
xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
xmlns='http://www.w3.org/2000/svg' width='16'>
+ <metadata id='metadata90'>
+ <rdf:RDF>
+ <cc:Work rdf:about=''>
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
+ <dc:title>Gnome Symbolic Icon Theme</dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <sodipodi:namedview inkscape:cy='-71.46449' inkscape:current-layer='layer9' inkscape:window-width='1310'
pagecolor='#555753' showborder='false' showguides='true' inkscape:snap-nodes='false' objecttolerance='10'
showgrid='false' inkscape:object-nodes='true' inkscape:pageshadow='2' inkscape:guide-bbox='true'
inkscape:window-x='54' inkscape:snap-bbox='true' bordercolor='#666666' id='namedview88'
inkscape:window-maximized='0' inkscape:snap-global='true' inkscape:window-y='26' gridtolerance='10'
inkscape:zoom='1' inkscape:window-height='690' borderopacity='1' guidetolerance='10' inkscape:cx='83.606112'
inkscape:bbox-paths='false' inkscape:snap-grids='true' inkscape:pageopacity='1'
inkscape:snap-to-guides='true'>
+ <inkscape:grid visible='true' spacingx='1px' type='xygrid' spacingy='1px' id='grid4866' empspacing='2'
enabled='true' snapvisiblegridlinesonly='true'/>
+ </sodipodi:namedview>
+ <title id='title9167'>Gnome Symbolic Icon Theme</title>
+ <defs id='defs7386'/>
+ <g transform='translate(-41.000198,-357)' inkscape:groupmode='layer' id='layer9' inkscape:label='status'
style='display:inline'>
+
+ <path inkscape:connector-curvature='0' d='m 44.6875,358.0625 c -1.5235,0 -2.75,1.2265 -2.75,2.75 l
0,4.4375 c 0,1.5235 1.2265,2.75 2.75,2.75 l 6.305187,0 3.053347,3.98495 -0.07728,-4.0787 c 1.204532,-0.29284
2.09375,-1.35911 2.09375,-2.65625 l 0,-4.4375 c 0,-1.5235 -1.2265,-2.75 -2.75,-2.75 z' id='rect11261'
sodipodi:nodetypes='sssscccssss'
style='color:#bebebe;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.4000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate'/>
+ </g>
+ <g transform='translate(-41.000198,-357)' inkscape:groupmode='layer' id='layer10'
inkscape:label='devices'/>
+ <g transform='translate(-41.000198,-357)' inkscape:groupmode='layer' id='layer11' inkscape:label='apps'/>
+ <g transform='translate(-41.000198,-357)' inkscape:groupmode='layer' id='layer12'
inkscape:label='actions'/>
+ <g transform='translate(-41.000198,-357)' inkscape:groupmode='layer' id='layer13' inkscape:label='places'/>
+ <g transform='translate(-41.000198,-357)' inkscape:groupmode='layer' id='layer14'
inkscape:label='mimetypes'/>
+ <g transform='translate(-41.000198,-357)' inkscape:groupmode='layer' id='layer15' inkscape:label='emblems'
style='display:inline'/>
+ <g transform='translate(-41.000198,-357)' inkscape:groupmode='layer' id='g4953'
inkscape:label='categories' style='display:inline'/>
+</svg>
diff --git a/data/icons/hicolor/scalable/actions/palette-symbolic.svg
b/data/icons/hicolor/scalable/actions/palette-symbolic.svg
new file mode 100644
index 0000000..205cf67
--- /dev/null
+++ b/data/icons/hicolor/scalable/actions/palette-symbolic.svg
@@ -0,0 +1,229 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="palette-symbolic.svg">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient3946">
+ <stop
+ id="stop3948"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:0.74698794;" />
+ <stop
+ id="stop3950"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0.02409638;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3830-9">
+ <stop
+ style="stop-color:#000000;stop-opacity:0.74698794;"
+ offset="0"
+ id="stop3832-7" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0.02409638;"
+ offset="1"
+ id="stop3834-5" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3984">
+ <stop
+ style="stop-color:#f4deba;stop-opacity:1;"
+ offset="0"
+ id="stop3986" />
+ <stop
+ style="stop-color:#de9625;stop-opacity:0;"
+ offset="1"
+ id="stop3988" />
+ </linearGradient>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#555753"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="1"
+ inkscape:pageshadow="2"
+ inkscape:zoom="23.531954"
+ inkscape:cx="6.6591249"
+ inkscape:cy="5.9522186"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:snap-grids="false"
+ inkscape:window-width="1920"
+ inkscape:window-height="1134"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ showborder="true"
+ fit-margin-top="0"
+ fit-margin-right="0"
+ fit-margin-left="0"
+ fit-margin-bottom="0"
+ showguides="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid7044"
+ empspacing="8"
+ visible="true"
+ enabled="true"
+ snapvisiblegridlinesonly="true"
+ originx="-31.97559px"
+ originy="-816.00002px" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Livello 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-31.97559,-220.36218)">
+ <path
+ id="path3818"
+ d="m 61.840587,221.03647 c -0.04364,4.3e-4 -0.08737,0.002 -0.130679,0.003 -3.988456,0.13754
-6.690726,5.08913 -6.857994,5.75821 -0.2347,0.93879 -0.688902,2.7525 -0.548849,4.13466 0.119477,1.05139
0.978967,3.22543 2.054262,3.27322 1.075295,0.0478 0.454611,-2.8909 2.437934,-3.4405 1.856121,-0.51434
-0.669073,4.7782 0.501805,4.87379 1.170876,0.0956 2.819215,0.31109 5.447715,-2.26962 1.367693,-1.34283
3.570085,-3.41946 3.417497,-6.54751 -0.188176,-3.8341 -3.572042,-5.81556 -6.321691,-5.78539 z m
0.289583,9.58969 c 0.454155,-0.01 0.961562,0.0853 1.109196,0.64084 0.13394,0.504 -0.273114,1.12675
-1.027653,1.31411 -0.700022,0.17382 -1.457473,0.0714 -1.648637,-0.71716 -0.191163,-0.83635 0.765253,-1.17118
1.267056,-1.21897 0.09409,-0.009 0.195232,-0.0166 0.300038,-0.0188 z"
+ style="fill:#bebebe;fill-opacity:1;stroke:none"
+ inkscape:connector-curvature="0" />
+ <path
+ transform="matrix(0.03066774,-0.00150667,0.0089403,0.03983513,42.226599,204.27348)"
+ d="m 351,612.36218 c 0,16.01626 -20.81876,29 -46.5,29 -25.68124,0 -46.5,-12.98374 -46.5,-29
0,-16.01626 20.81876,-29 46.5,-29 25.68124,0 46.5,12.98374 46.5,29 z"
+ sodipodi:ry="29"
+ sodipodi:rx="46.5"
+ sodipodi:cy="612.36218"
+ sodipodi:cx="304.5"
+ id="path3820"
+ style="fill:#828282;fill-opacity:1;stroke:none"
+ sodipodi:type="arc" />
+ <path
+ transform="matrix(-0.02606513,0.01622926,-0.02718264,-0.03046095,90.373217,241.93668)"
+ d="m 351,612.36218 c 0,16.01626 -20.81876,29 -46.5,29 -25.68124,0 -46.5,-12.98374 -46.5,-29
0,-16.01626 20.81876,-29 46.5,-29 25.68124,0 46.5,12.98374 46.5,29 z"
+ sodipodi:ry="29"
+ sodipodi:rx="46.5"
+ sodipodi:cy="612.36218"
+ sodipodi:cx="304.5"
+ id="path3822"
+ style="fill:#828282;fill-opacity:1;stroke:none"
+ sodipodi:type="arc" />
+ <path
+ transform="matrix(0.02245904,0.01984223,-0.03683968,0.02086863,77.58947,204.64333)"
+ d="m 351,612.36218 c 0,16.01626 -20.81876,29 -46.5,29 -25.68124,0 -46.5,-12.98374 -46.5,-29
0,-16.01626 20.81876,-29 46.5,-29 25.68124,0 46.5,12.98374 46.5,29 z"
+ sodipodi:ry="29"
+ sodipodi:rx="46.5"
+ sodipodi:cy="612.36218"
+ sodipodi:cx="304.5"
+ id="path3824"
+ style="fill:#828282;fill-opacity:1;stroke:none"
+ sodipodi:type="arc" />
+ <path
+ transform="matrix(-0.01009646,0.03001405,-0.03941126,-0.01336271,92.348332,223.94654)"
+ d="m 351,612.36218 c 0,16.01626 -20.81876,29 -46.5,29 -25.68124,0 -46.5,-12.98374 -46.5,-29
0,-16.01626 20.81876,-29 46.5,-29 25.68124,0 46.5,12.98374 46.5,29 z"
+ sodipodi:ry="29"
+ sodipodi:rx="46.5"
+ sodipodi:cy="612.36218"
+ sodipodi:cx="304.5"
+ id="path3826"
+ style="fill:#828282;fill-opacity:1;stroke:none"
+ sodipodi:type="arc" />
+ <path
+ transform="matrix(0.08048987,0,0,0.08155002,30.179984,183.80487)"
+ d="m 362,501.86218 c 0,5.79899 -4.47715,10.5 -10,10.5 -5.52285,0 -10,-4.70101 -10,-10.5 0,-5.79899
4.47715,-10.5 10,-10.5 5.52285,0 10,4.70101 10,10.5 z"
+ sodipodi:ry="10.5"
+ sodipodi:rx="10"
+ sodipodi:cy="501.86218"
+ sodipodi:cx="352"
+ id="path3828"
+ style="opacity:0.75925927;fill:#828282;fill-opacity:1;stroke:none"
+ sodipodi:type="arc" />
+ <path
+ id="path3864"
+ d="m 23.434931,221.04968 c -3.988456,0.13754 -6.707732,5.08092 -6.875,5.75 -0.2347,0.93879
-0.671303,2.74284 -0.53125,4.125 0.119477,1.05139 0.955955,3.23346 2.03125,3.28125 1.075295,0.0478
0.454177,-2.8879 2.4375,-3.4375 1.856121,-0.51434 -0.670878,4.77941 0.5,4.875 1.170876,0.0956 2.84025,0.29946
5.46875,-2.28125 1.367693,-1.34283 3.558838,-3.4032 3.40625,-6.53125 -0.188176,-3.8341 -3.562851,-5.81142
-6.3125,-5.78125 -0.04364,4.3e-4 -0.08169,-0.001 -0.125,0 z m -0.40625,1.34375 c 0.541987,-0.0771
1.192418,0.0866 1.625,0.46875 0.576776,0.50957 0.558784,1.19701 -0.03125,1.53125 -0.590034,0.33424
-1.548224,0.19707 -2.125,-0.3125 -0.576776,-0.50957 -0.558784,-1.19701 0.03125,-1.53125 0.147508,-0.0836
0.319337,-0.13054 0.5,-0.15625 z m 3.8125,1.0625 c 0.160495,-0.0243 0.310945,0.009 0.46875,0.0625
0.631221,0.21402 0.94679,1.01045 0.6875,1.78125 -0.25929,0.7708 -0.993779,1.21402 -1.625,1 -0.631221,-0.21402
-0.91554,-1.01045 -0.65625,-1.78125 0.194467,-0.5781 0.643515,-0.9
8971 1.125,-1.0625 z m -6.625,0.40625 c 0.444533,0 0.8125,0.40209 0.8125,0.875 0,0.47291 -0.367967,0.84375
-0.8125,0.84375 -0.444533,0 -0.8125,-0.37084 -0.8125,-0.84375 0,-0.47291 0.367967,-0.875 0.8125,-0.875 z m
-1.71875,3.1875 c 0.787585,-0.0387 1.54431,0.45574 1.6875,1.09375 0.14319,0.63801 -0.399915,1.18006
-1.1875,1.21875 -0.787586,0.0387 -1.54431,-0.45574 -1.6875,-1.09375 -0.14319,-0.63801 0.399914,-1.18006
1.1875,-1.21875 z m 9.3125,0.0312 c 0.361988,0.0233 0.688568,0.13106 0.90625,0.375 0.435364,0.48787
0.231885,1.23946 -0.4375,1.65625 -0.669385,0.41679 -1.564636,0.36287 -2,-0.125 -0.435364,-0.48787
-0.231885,-1.23946 0.4375,-1.65625 0.334692,-0.20839 0.731762,-0.27329 1.09375,-0.25 z m -3.96875,3.53125 c
0.454155,-0.01 0.977366,0.10071 1.125,0.65625 0.13394,0.504 -0.276711,1.12514 -1.03125,1.3125
-0.700022,0.17382 -1.465086,0.0698 -1.65625,-0.71875 -0.191163,-0.83635 0.748197,-1.17096 1.25,-1.21875
0.09409,-0.009 0.207694,-0.029 0.3125,-0.0312 z"
+ style="fill:#bebebe;fill-opacity:1;stroke:none"
+ inkscape:connector-curvature="0" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#bebebe;fill-opacity:0.55144037;stroke:none"
+ id="path3866"
+ sodipodi:cx="304.5"
+ sodipodi:cy="612.36218"
+ sodipodi:rx="46.5"
+ sodipodi:ry="29"
+ d="m 351,612.36218 c 0,16.01626 -20.81876,29 -46.5,29 -25.68124,0 -46.5,-12.98374 -46.5,-29
0,-16.01626 20.81876,-29 46.5,-29 25.68124,0 46.5,12.98374 46.5,29 z"
+ transform="matrix(0.03066774,-0.00150667,0.0089403,0.03983513,3.9382349,204.27348)" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#bebebe;fill-opacity:0.55294118;stroke:none"
+ id="path3868"
+ sodipodi:cx="304.5"
+ sodipodi:cy="612.36218"
+ sodipodi:rx="46.5"
+ sodipodi:ry="29"
+ d="m 351,612.36218 c 0,16.01626 -20.81876,29 -46.5,29 -25.68124,0 -46.5,-12.98374 -46.5,-29
0,-16.01626 20.81876,-29 46.5,-29 25.68124,0 46.5,12.98374 46.5,29 z"
+ transform="matrix(-0.02606513,0.01622926,-0.02718264,-0.03046095,52.084853,241.93668)" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#bebebe;fill-opacity:0.55294118;stroke:none"
+ id="path3870"
+ sodipodi:cx="304.5"
+ sodipodi:cy="612.36218"
+ sodipodi:rx="46.5"
+ sodipodi:ry="29"
+ d="m 351,612.36218 c 0,16.01626 -20.81876,29 -46.5,29 -25.68124,0 -46.5,-12.98374 -46.5,-29
0,-16.01626 20.81876,-29 46.5,-29 25.68124,0 46.5,12.98374 46.5,29 z"
+ transform="matrix(0.02245904,0.01984223,-0.03683968,0.02086863,39.301106,204.64333)" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#bebebe;fill-opacity:0.55294118;stroke:none"
+ id="path3872"
+ sodipodi:cx="304.5"
+ sodipodi:cy="612.36218"
+ sodipodi:rx="46.5"
+ sodipodi:ry="29"
+ d="m 351,612.36218 c 0,16.01626 -20.81876,29 -46.5,29 -25.68124,0 -46.5,-12.98374 -46.5,-29
0,-16.01626 20.81876,-29 46.5,-29 25.68124,0 46.5,12.98374 46.5,29 z"
+ transform="matrix(-0.01009646,0.03001405,-0.03941126,-0.01336271,54.059968,223.94654)" />
+ <path
+ sodipodi:type="arc"
+ style="opacity:0.75925927;fill:#bebebe;fill-opacity:0.55294118;stroke:none"
+ id="path3874"
+ sodipodi:cx="352"
+ sodipodi:cy="501.86218"
+ sodipodi:rx="10"
+ sodipodi:ry="10.5"
+ d="m 362,501.86218 c 0,5.79899 -4.47715,10.5 -10,10.5 -5.52285,0 -10,-4.70101 -10,-10.5 0,-5.79899
4.47715,-10.5 10,-10.5 5.52285,0 10,4.70101 10,10.5 z"
+ transform="matrix(0.08048987,0,0,0.08155002,-8.1083793,183.80487)" />
+ <path
+ style="fill:#bebebe;fill-opacity:1;stroke:none"
+ d="m 32.591774,235.14279 c 3.259415,-0.86248 2.732543,-3.27515 4.232345,-4.26024 0.690213,-0.45334
1.782228,-0.39668 2.389701,0.2167 3.09233,3.51772 -4.136339,4.67037 -6.622046,4.04354 z"
+ id="path3789"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cscc" />
+ <path
+ style="fill:#bebebe;fill-opacity:1;stroke:none"
+ d="m 38.711112,229.26545 c 0.82943,0.17093 1.802999,1.17754 2.082276,1.67857 l 6.161834,-8.66907 c
0.08754,-0.92538 -0.828871,-1.23633 -1.338606,-0.97739 z"
+ id="path3791"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccc" />
+ </g>
+</svg>
diff --git a/data/icons/hicolor/scalable/actions/tag-symbolic.svg
b/data/icons/hicolor/scalable/actions/tag-symbolic.svg
new file mode 100644
index 0000000..ec0da2e
--- /dev/null
+++ b/data/icons/hicolor/scalable/actions/tag-symbolic.svg
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="tag-symbolic.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#555753"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="1"
+ inkscape:pageshadow="2"
+ inkscape:zoom="32"
+ inkscape:cx="-1.4769413"
+ inkscape:cy="5.3674131"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:snap-grids="false"
+ inkscape:window-width="1920"
+ inkscape:window-height="1134"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ showborder="true"
+ fit-margin-top="0"
+ fit-margin-right="0"
+ fit-margin-left="0"
+ fit-margin-bottom="0"
+ showguides="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid7044"
+ empspacing="8"
+ visible="true"
+ enabled="true"
+ snapvisiblegridlinesonly="true"
+ originx="-31.97559px"
+ originy="-816.00002px" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Livello 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-31.97559,-220.36218)">
+ <path
+ style="fill:#bebebe;fill-opacity:1;stroke:none"
+ d="M 5.59375 1.5 C 5.033904 1.508 4.487085 1.80677 4.15625 2.3125 L 4.0625 2.46875 C 3.340492 2.10458
2.422325 2.33791 1.96875 3.03125 L 1.3125 4.03125 C 0.858926 4.72461 1.033333 5.6406 1.65625 6.15625 L
1.53125 6.34375 C 1.001911 7.15292 1.222081 8.22067 2.03125 8.75 L 9.6875 13.75 C 10.496669 14.27935
11.564413 14.05918 12.09375 13.25 L 14.71875 9.21875 C 15.248087 8.40959 15.027919 7.31059 14.21875 6.78125 L
6.59375 1.78125 C 6.290313 1.58274 5.929658 1.49526 5.59375 1.5 z M 4.09375 3.84375 C 4.8876593 3.84375
5.53125 4.4873407 5.53125 5.28125 C 5.53125 6.0751593 4.8876593 6.71875 4.09375 6.71875 C 3.2998407 6.71875
2.65625 6.0751593 2.65625 5.28125 C 2.65625 4.4873407 3.2998407 3.84375 4.09375 3.84375 z "
+ transform="translate(31.97559,220.36218)"
+ id="path3776" />
+ </g>
+</svg>
diff --git a/data/icons/hicolor/scalable/actions/view-presentation-symbolic.svg
b/data/icons/hicolor/scalable/actions/view-presentation-symbolic.svg
index 097d640..0e78f1a 100644
--- a/data/icons/hicolor/scalable/actions/view-presentation-symbolic.svg
+++ b/data/icons/hicolor/scalable/actions/view-presentation-symbolic.svg
@@ -25,7 +25,7 @@
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:zoom="32"
- inkscape:cx="5.3581155"
+ inkscape:cx="6.2799131"
inkscape:cy="9.5270697"
inkscape:document-units="px"
inkscape:current-layer="layer1"
@@ -152,7 +152,7 @@
id="path3800"
inkscape:connector-curvature="0" />
<rect
- style="opacity:0.35;fill:#bebebe;fill-opacity:1;stroke:none"
+ style="opacity:0.3;fill:#bebebe;fill-opacity:1;stroke:none"
id="rect3804"
width="8.03125"
height="5.96875"
diff --git a/data/icons/hicolor/scalable/actions/view-zoom-fit-symbolic.svg
b/data/icons/hicolor/scalable/actions/view-zoom-fit-symbolic.svg
new file mode 100644
index 0000000..2cdc998
--- /dev/null
+++ b/data/icons/hicolor/scalable/actions/view-zoom-fit-symbolic.svg
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="view-zoom-fit-symbolic.svg">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient3946">
+ <stop
+ id="stop3948"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:0.74698794;" />
+ <stop
+ id="stop3950"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0.02409638;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3830-9">
+ <stop
+ style="stop-color:#000000;stop-opacity:0.74698794;"
+ offset="0"
+ id="stop3832-7" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0.02409638;"
+ offset="1"
+ id="stop3834-5" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3984">
+ <stop
+ style="stop-color:#f4deba;stop-opacity:1;"
+ offset="0"
+ id="stop3986" />
+ <stop
+ style="stop-color:#de9625;stop-opacity:0;"
+ offset="1"
+ id="stop3988" />
+ </linearGradient>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#555753"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="1"
+ inkscape:pageshadow="2"
+ inkscape:zoom="23.531954"
+ inkscape:cx="3.7438478"
+ inkscape:cy="7.3501669"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:snap-grids="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1134"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ showborder="true"
+ fit-margin-top="0"
+ fit-margin-right="0"
+ fit-margin-left="0"
+ fit-margin-bottom="0"
+ showguides="true"
+ inkscape:guide-bbox="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid7044"
+ empspacing="8"
+ visible="true"
+ enabled="true"
+ snapvisiblegridlinesonly="true"
+ originx="-31.97559px"
+ originy="-816.00002px" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Livello 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-31.97559,-220.36218)">
+ <path
+ style="fill:#bebebe;fill-opacity:1;stroke:none"
+ d="M 1.03125 1 L 1.03125 15 L 15.03125 15 L 15.03125 1 L 1.03125 1 z M 3.03125 3 L 7.03125 3 L
7.03125 5 L 5.03125 5 L 5.03125 7 L 3.03125 7 L 3.03125 3 z M 9.03125 3 L 13.03125 3 L 13.03125 7 L 11.03125
7 L 11.03125 5 L 9.03125 5 L 9.03125 3 z M 3.03125 9 L 5.03125 9 L 5.03125 11 L 7.03125 11 L 7.03125 13 L
3.03125 13 L 3.03125 9 z M 11.03125 9 L 13.03125 9 L 13.03125 13 L 9.03125 13 L 9.03125 11 L 11.03125 11 L
11.03125 9 z "
+ transform="translate(31.97559,220.36218)"
+ id="rect3832" />
+ </g>
+</svg>
diff --git a/data/icons/hicolor/scalable/actions/view-zoom-fit-width-symbolic.svg
b/data/icons/hicolor/scalable/actions/view-zoom-fit-width-symbolic.svg
new file mode 100644
index 0000000..0eb67b5
--- /dev/null
+++ b/data/icons/hicolor/scalable/actions/view-zoom-fit-width-symbolic.svg
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="view-zoom-fit-width-symbolic.svg">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient3946">
+ <stop
+ id="stop3948"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:0.74698794;" />
+ <stop
+ id="stop3950"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0.02409638;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3830-9">
+ <stop
+ style="stop-color:#000000;stop-opacity:0.74698794;"
+ offset="0"
+ id="stop3832-7" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0.02409638;"
+ offset="1"
+ id="stop3834-5" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3984">
+ <stop
+ style="stop-color:#f4deba;stop-opacity:1;"
+ offset="0"
+ id="stop3986" />
+ <stop
+ style="stop-color:#de9625;stop-opacity:0;"
+ offset="1"
+ id="stop3988" />
+ </linearGradient>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#555753"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="1"
+ inkscape:pageshadow="2"
+ inkscape:zoom="11.765977"
+ inkscape:cx="1.9402487"
+ inkscape:cy="13.424149"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:snap-grids="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1134"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ showborder="true"
+ fit-margin-top="0"
+ fit-margin-right="0"
+ fit-margin-left="0"
+ fit-margin-bottom="0"
+ showguides="true"
+ inkscape:guide-bbox="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid7044"
+ empspacing="8"
+ visible="true"
+ enabled="true"
+ snapvisiblegridlinesonly="true"
+ originx="-31.97559px"
+ originy="-816.00002px" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Livello 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-31.97559,-220.36218)">
+ <path
+ style="fill:#bebebe;fill-opacity:1;stroke:none"
+ d="M 1.03125 1 L 1.03125 15 L 15.03125 15 L 15.03125 1 L 1.03125 1 z M 3.03125 3 L 5.03125 3 L
7.03125 3 L 7.03125 5 L 5.03125 5 L 5.03125 11 L 7.03125 11 L 7.03125 13 L 5.03125 13 L 3.03125 13 L 3.03125
3 z M 9.03125 3 L 11.03125 3 L 13.03125 3 L 13.03125 13 L 11.03125 13 L 9.03125 13 L 9.03125 11 L 11.03125 11
L 11.03125 5 L 9.03125 5 L 9.03125 3 z "
+ transform="translate(31.97559,220.36218)"
+ id="rect4385" />
+ </g>
+</svg>
diff --git a/data/icons/hicolor/scalable/actions/view-zoom-in-symbolic.svg
b/data/icons/hicolor/scalable/actions/view-zoom-in-symbolic.svg
new file mode 100644
index 0000000..d0acbcb
--- /dev/null
+++ b/data/icons/hicolor/scalable/actions/view-zoom-in-symbolic.svg
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="view-zoom-in-symbolic.svg">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient3946">
+ <stop
+ id="stop3948"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:0.74698794;" />
+ <stop
+ id="stop3950"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0.02409638;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3830-9">
+ <stop
+ style="stop-color:#000000;stop-opacity:0.74698794;"
+ offset="0"
+ id="stop3832-7" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0.02409638;"
+ offset="1"
+ id="stop3834-5" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3984">
+ <stop
+ style="stop-color:#f4deba;stop-opacity:1;"
+ offset="0"
+ id="stop3986" />
+ <stop
+ style="stop-color:#de9625;stop-opacity:0;"
+ offset="1"
+ id="stop3988" />
+ </linearGradient>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#555753"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="1"
+ inkscape:pageshadow="2"
+ inkscape:zoom="23.531954"
+ inkscape:cx="2.865087"
+ inkscape:cy="10.791984"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:snap-grids="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1134"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ showborder="true"
+ fit-margin-top="0"
+ fit-margin-right="0"
+ fit-margin-left="0"
+ fit-margin-bottom="0"
+ showguides="true"
+ inkscape:guide-bbox="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid7044"
+ empspacing="8"
+ visible="true"
+ enabled="true"
+ snapvisiblegridlinesonly="true"
+ originx="-31.97559px"
+ originy="-816.00002px" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Livello 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-31.97559,-220.36218)">
+ <path
+ style="fill:#bebebe;fill-opacity:1;stroke:none"
+ d="M 1.03125 1 L 1.03125 15 L 15.03125 15 L 15.03125 1 L 1.03125 1 z M 7.03125 3 L 9.03125 3 L
9.03125 7 L 13.03125 7 L 13.03125 9 L 9.03125 9 L 9.03125 13 L 7.03125 13 L 7.03125 9 L 3.03125 9 L 3.03125 7
L 7.03125 7 L 7.03125 3 z "
+ transform="translate(31.97559,220.36218)"
+ id="rect3761" />
+ </g>
+</svg>
diff --git a/data/icons/hicolor/scalable/actions/view-zoom-original-symbolic.svg
b/data/icons/hicolor/scalable/actions/view-zoom-original-symbolic.svg
new file mode 100644
index 0000000..1fa3e31
--- /dev/null
+++ b/data/icons/hicolor/scalable/actions/view-zoom-original-symbolic.svg
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="view-zoom-original-symbolic.svg">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient3946">
+ <stop
+ id="stop3948"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:0.74698794;" />
+ <stop
+ id="stop3950"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0.02409638;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3830-9">
+ <stop
+ style="stop-color:#000000;stop-opacity:0.74698794;"
+ offset="0"
+ id="stop3832-7" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0.02409638;"
+ offset="1"
+ id="stop3834-5" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3984">
+ <stop
+ style="stop-color:#f4deba;stop-opacity:1;"
+ offset="0"
+ id="stop3986" />
+ <stop
+ style="stop-color:#de9625;stop-opacity:0;"
+ offset="1"
+ id="stop3988" />
+ </linearGradient>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#555753"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="1"
+ inkscape:pageshadow="2"
+ inkscape:zoom="33.279208"
+ inkscape:cx="8.0110732"
+ inkscape:cy="10.531557"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:snap-grids="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1134"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ showborder="true"
+ fit-margin-top="0"
+ fit-margin-right="0"
+ fit-margin-left="0"
+ fit-margin-bottom="0"
+ showguides="true"
+ inkscape:guide-bbox="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid7044"
+ empspacing="8"
+ visible="true"
+ enabled="true"
+ snapvisiblegridlinesonly="true"
+ originx="-31.97559px"
+ originy="-816.00002px" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Livello 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-31.97559,-220.36218)">
+ <path
+ style="fill:#bebebe;fill-opacity:1;stroke:none"
+ d="M 1.03125 1 L 1.03125 15 L 15.03125 15 L 15.03125 1 L 1.03125 1 z M 6.03125 4 L 8.03125 4 L
10.03125 4 L 10.03125 12 L 8.03125 12 L 8.03125 6 L 6.03125 6 L 6.03125 4 z "
+ transform="translate(31.97559,220.36218)"
+ id="rect3761" />
+ </g>
+</svg>
diff --git a/data/icons/hicolor/scalable/actions/view-zoom-out-symbolic.svg
b/data/icons/hicolor/scalable/actions/view-zoom-out-symbolic.svg
new file mode 100644
index 0000000..f051053
--- /dev/null
+++ b/data/icons/hicolor/scalable/actions/view-zoom-out-symbolic.svg
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="view-zoom-out-symbolic.svg">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient3946">
+ <stop
+ id="stop3948"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:0.74698794;" />
+ <stop
+ id="stop3950"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0.02409638;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3830-9">
+ <stop
+ style="stop-color:#000000;stop-opacity:0.74698794;"
+ offset="0"
+ id="stop3832-7" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0.02409638;"
+ offset="1"
+ id="stop3834-5" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3984">
+ <stop
+ style="stop-color:#f4deba;stop-opacity:1;"
+ offset="0"
+ id="stop3986" />
+ <stop
+ style="stop-color:#de9625;stop-opacity:0;"
+ offset="1"
+ id="stop3988" />
+ </linearGradient>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#555753"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="1"
+ inkscape:pageshadow="2"
+ inkscape:zoom="23.531954"
+ inkscape:cx="1.1230563"
+ inkscape:cy="10.791984"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:snap-grids="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1134"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ showborder="true"
+ fit-margin-top="0"
+ fit-margin-right="0"
+ fit-margin-left="0"
+ fit-margin-bottom="0"
+ showguides="true"
+ inkscape:guide-bbox="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid7044"
+ empspacing="8"
+ visible="true"
+ enabled="true"
+ snapvisiblegridlinesonly="true"
+ originx="-31.97559px"
+ originy="-816.00002px" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Livello 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-31.97559,-220.36218)">
+ <path
+ style="fill:#bebebe;fill-opacity:1;stroke:none"
+ d="M 1.03125 1 L 1.03125 15 L 15.03125 15 L 15.03125 1 L 1.03125 1 z M 3.03125 7 L 13.03125 7 L
13.03125 9 L 3.03125 9 L 3.03125 7 z "
+ transform="translate(31.97559,220.36218)"
+ id="rect3761" />
+ </g>
+</svg>
diff --git a/extensions/edit_metadata/actions.c b/extensions/edit_metadata/actions.c
index 58018bd..2a34612 100644
--- a/extensions/edit_metadata/actions.c
+++ b/extensions/edit_metadata/actions.c
@@ -89,3 +89,74 @@ gth_browser_activate_action_tool_delete_metadata (GtkAction *action,
_g_object_list_unref (file_data_list);
_gtk_tree_path_list_free (items);
}
+
+
+void
+gth_browser_activate_edit_metadata (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
+{
+ GthBrowser *browser = GTH_BROWSER (user_data);
+
+ dlg_edit_metadata (browser,
+ GTH_TYPE_EDIT_COMMENT_DIALOG,
+ "edit-comment-dialog");
+}
+
+
+void
+gth_browser_activate_edit_tags (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
+{
+ GthBrowser *browser = GTH_BROWSER (user_data);
+
+ dlg_edit_metadata (browser,
+ GTH_TYPE_EDIT_TAGS_DIALOG,
+ "edit-tags-dialog");
+}
+
+
+void
+gth_browser_activate_delete_metadata (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
+{
+ GthBrowser *browser = GTH_BROWSER (user_data);
+ GtkWidget *dialog;
+ int result;
+ GList *items;
+ GList *file_data_list;
+ GList *file_list;
+ GthTask *task;
+
+ dialog = gtk_message_dialog_new (GTK_WINDOW (browser),
+ GTK_DIALOG_MODAL,
+ GTK_MESSAGE_QUESTION,
+ GTK_BUTTONS_NONE,
+ _("Are you sure you want to permanently delete the metadata of the
selected files?"));
+ gtk_dialog_add_buttons (GTK_DIALOG (dialog),
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ GTK_STOCK_DELETE, GTK_RESPONSE_YES,
+ NULL);
+ gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
+ "%s",
+ _("If you delete the metadata, it will be permanently
lost."));
+
+ result = gtk_dialog_run (GTK_DIALOG (dialog));
+ gtk_widget_destroy (dialog);
+
+ if (result != GTK_RESPONSE_YES)
+ return;
+
+ items = gth_file_selection_get_selected (GTH_FILE_SELECTION (gth_browser_get_file_list_view
(browser)));
+ file_data_list = gth_file_list_get_files (GTH_FILE_LIST (gth_browser_get_file_list (browser)), items);
+ file_list = gth_file_data_list_to_file_list (file_data_list);
+ task = gth_delete_metadata_task_new (browser, file_list);
+ gth_browser_exec_task (browser, task, FALSE);
+
+ g_object_unref (task);
+ _g_object_list_unref (file_list);
+ _g_object_list_unref (file_data_list);
+ _gtk_tree_path_list_free (items);
+}
diff --git a/extensions/edit_metadata/actions.h b/extensions/edit_metadata/actions.h
index f0b5837..1be7d5f 100644
--- a/extensions/edit_metadata/actions.h
+++ b/extensions/edit_metadata/actions.h
@@ -30,4 +30,8 @@ DEFINE_ACTION(gth_browser_activate_action_edit_comment)
DEFINE_ACTION(gth_browser_activate_action_edit_tags)
DEFINE_ACTION(gth_browser_activate_action_tool_delete_metadata)
+DEF_ACTION_CALLBACK (gth_browser_activate_edit_metadata)
+DEF_ACTION_CALLBACK (gth_browser_activate_edit_tags)
+DEF_ACTION_CALLBACK (gth_browser_activate_delete_metadata)
+
#endif /* ACTIONS_H */
diff --git a/extensions/edit_metadata/callbacks.c b/extensions/edit_metadata/callbacks.c
index 8f4cb3f..dcc557d 100644
--- a/extensions/edit_metadata/callbacks.c
+++ b/extensions/edit_metadata/callbacks.c
@@ -41,16 +41,6 @@ static const char *fixed_ui_info =
" </placeholder>"
" </menu>"
" </menubar>"
-" <toolbar name='ToolBar'>"
-" <placeholder name='Edit_Actions'>"
-" <toolitem action='Edit_Metadata'/>"
-" </placeholder>"
-" </toolbar>"
-" <toolbar name='ViewerToolBar'>"
-" <placeholder name='Edit_Actions'>"
-" <toolitem action='Edit_Metadata'/>"
-" </placeholder>"
-" </toolbar>"
" <toolbar name='Fullscreen_ToolBar'>"
" <placeholder name='Edit_Actions'>"
" <toolitem action='Edit_Metadata'/>"
@@ -81,18 +71,6 @@ static const char *fixed_ui_file_tools_info =
"</ui>";
-static const char *viewer_ui_info =
-"<ui>"
-" <menubar name='MenuBar'>"
-" <menu name='Edit' action='EditMenu'>"
-" <placeholder name='Edit_Actions'>"
-" <menuitem action='Edit_Metadata'/>"
-" </placeholder>"
-" </menu>"
-" </menubar>"
-"</ui>";
-
-
static GthActionEntryExt edit_metadata_action_entries[] = {
{ "Edit_QuickTag", "tag", N_("T_ags") },
@@ -116,6 +94,13 @@ static GthActionEntryExt edit_metadata_action_entries[] = {
};
+static const GActionEntry actions[] = {
+ { "edit-metadata", gth_browser_activate_edit_metadata },
+ { "edit-tags", gth_browser_activate_edit_tags },
+ { "delete-metadata", gth_browser_activate_delete_metadata },
+};
+
+
typedef struct {
GthBrowser *browser;
GtkActionGroup *actions;
@@ -160,39 +145,36 @@ edit_metadata__gth_browser_construct_cb (GthBrowser *browser)
}
g_object_set_data_full (G_OBJECT (browser), BROWSER_DATA_KEY, data, (GDestroyNotify)
browser_data_free);
-}
-
-
-void
-edit_metadata__gth_browser_set_current_page_cb (GthBrowser *browser)
-{
- BrowserData *data;
- GError *error = NULL;
- data = g_object_get_data (G_OBJECT (browser), BROWSER_DATA_KEY);
- g_return_if_fail (data != NULL);
-
- switch (gth_window_get_current_page (GTH_WINDOW (browser))) {
- case GTH_BROWSER_PAGE_BROWSER:
- if (data->viewer_ui_merge_id != 0) {
- gtk_ui_manager_remove_ui (gth_browser_get_ui_manager (browser),
data->viewer_ui_merge_id);
- data->viewer_ui_merge_id = 0;
- }
- break;
-
- case GTH_BROWSER_PAGE_VIEWER:
- if (data->viewer_ui_merge_id != 0)
- return;
- data->viewer_ui_merge_id = gtk_ui_manager_add_ui_from_string (gth_browser_get_ui_manager
(browser), viewer_ui_info, -1, &error);
- if (data->viewer_ui_merge_id == 0) {
- g_warning ("ui building failed: %s", error->message);
- g_clear_error (&error);
- }
- break;
-
- default:
- break;
- }
+ g_action_map_add_action_entries (G_ACTION_MAP (browser),
+ actions,
+ G_N_ELEMENTS (actions),
+ browser);
+
+ gth_browser_add_header_bar_button (browser,
+ GTH_BROWSER_HEADER_SECTION_BROWSER_EDIT,
+ "comment-symbolic",
+ _("Comment"),
+ "win.edit-metadata",
+ NULL);
+ gth_browser_add_header_bar_button (browser,
+ GTH_BROWSER_HEADER_SECTION_BROWSER_EDIT,
+ "tag-symbolic",
+ _("Tags"),
+ "win.edit-tags",
+ NULL);
+ gth_browser_add_header_bar_button (browser,
+ GTH_BROWSER_HEADER_SECTION_VIEWER_EDIT,
+ "comment-symbolic",
+ _("Comment"),
+ "win.edit-metadata",
+ NULL);
+ gth_browser_add_header_bar_button (browser,
+ GTH_BROWSER_HEADER_SECTION_VIEWER_EDIT,
+ "tag-symbolic",
+ _("Tags"),
+ "win.edit-tags",
+ NULL);
}
@@ -211,6 +193,10 @@ edit_metadata__gth_browser_update_sensitivity_cb (GthBrowser *browser)
sensitive = (n_selected > 0);
g_object_set (gtk_action_group_get_action (data->actions, "Edit_Metadata"), "sensitive", sensitive,
NULL);
g_object_set (gtk_action_group_get_action (data->actions, "Tool_DeleteMetadata"), "sensitive",
sensitive, NULL);
+
+ g_object_set (g_action_map_lookup_action (G_ACTION_MAP (data->browser), "edit-metadata"), "enabled",
sensitive, NULL);
+ g_object_set (g_action_map_lookup_action (G_ACTION_MAP (data->browser), "edit-tags"), "enabled",
sensitive, NULL);
+ g_object_set (g_action_map_lookup_action (G_ACTION_MAP (data->browser), "delete-metadata"),
"enabled", sensitive, NULL);
}
diff --git a/extensions/edit_metadata/callbacks.h b/extensions/edit_metadata/callbacks.h
index 258d1ce..99d94b4 100644
--- a/extensions/edit_metadata/callbacks.h
+++ b/extensions/edit_metadata/callbacks.h
@@ -25,7 +25,6 @@
#include <gthumb.h>
void edit_metadata__gth_browser_construct_cb (GthBrowser *browser);
-void edit_metadata__gth_browser_set_current_page_cb (GthBrowser *browser);
void edit_metadata__gth_browser_update_sensitivity_cb (GthBrowser *browser);
gpointer edit_metadata__gth_browser_file_list_key_press_cb (GthBrowser *browser,
GdkEventKey *event);
diff --git a/extensions/edit_metadata/main.c b/extensions/edit_metadata/main.c
index 85b7df4..d10f2b5 100644
--- a/extensions/edit_metadata/main.c
+++ b/extensions/edit_metadata/main.c
@@ -41,7 +41,6 @@ gthumb_extension_activate (void)
gth_main_register_type ("edit-comment-dialog-page", GTH_TYPE_EDIT_GENERAL_PAGE);
gth_hook_add_callback ("gth-browser-construct", 7, G_CALLBACK
(edit_metadata__gth_browser_construct_cb), NULL);
- gth_hook_add_callback ("gth-browser-set-current-page", 5, G_CALLBACK
(edit_metadata__gth_browser_set_current_page_cb), NULL);
gth_hook_add_callback ("gth-browser-update-sensitivity", 10, G_CALLBACK
(edit_metadata__gth_browser_update_sensitivity_cb), NULL);
gth_hook_add_callback ("gth-browser-file-list-key-press", 10, G_CALLBACK
(edit_metadata__gth_browser_file_list_key_press_cb), NULL);
}
diff --git a/extensions/gstreamer_tools/actions.c b/extensions/gstreamer_tools/actions.c
index 86cdc51..327547a 100644
--- a/extensions/gstreamer_tools/actions.c
+++ b/extensions/gstreamer_tools/actions.c
@@ -31,7 +31,7 @@
#define MAX_ATTEMPTS 1024
-/* -- media_viewer_activate_action_screenshot -- */
+/* -- gth_browser_activate_video_screenshot -- */
typedef struct {
@@ -197,14 +197,18 @@ screenshot_ready_cb (GdkPixbuf *pixbuf,
void
-media_viewer_activate_action_screenshot (GtkAction *action,
- GthMediaViewerPage *page)
+gth_browser_activate_video_screenshot (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
{
- GstElement *playbin;
- SaveData *save_data;
- int video_fps_n;
- int video_fps_d;
-
+ GthBrowser *browser = GTH_BROWSER (user_data);
+ GthMediaViewerPage *page;
+ GstElement *playbin;
+ SaveData *save_data;
+ int video_fps_n;
+ int video_fps_d;
+
+ page = GTH_MEDIA_VIEWER_PAGE (gth_browser_get_viewer_page (browser));
playbin = gth_media_viewer_page_get_playbin (page);
if (playbin == NULL)
return;
diff --git a/extensions/gstreamer_tools/actions.h b/extensions/gstreamer_tools/actions.h
index 00f3438..df6c3a8 100644
--- a/extensions/gstreamer_tools/actions.h
+++ b/extensions/gstreamer_tools/actions.h
@@ -22,10 +22,8 @@
#ifndef ACTIONS_H
#define ACTIONS_H
-#include <gtk/gtk.h>
+#include <gthumb.h>
-#define DEFINE_ACTION(x) void x (GtkAction *action, gpointer data);
-
-DEFINE_ACTION(media_viewer_activate_action_screenshot)
+DEF_ACTION_CALLBACK (gth_browser_activate_video_screenshot)
#endif /* ACTIONS_H */
diff --git a/extensions/gstreamer_tools/gth-media-viewer-page.c
b/extensions/gstreamer_tools/gth-media-viewer-page.c
index 387872b..e6155ab 100644
--- a/extensions/gstreamer_tools/gth-media-viewer-page.c
+++ b/extensions/gstreamer_tools/gth-media-viewer-page.c
@@ -48,8 +48,6 @@ G_DEFINE_TYPE_WITH_CODE (GthMediaViewerPage,
struct _GthMediaViewerPagePrivate {
GthBrowser *browser;
- GtkActionGroup *actions;
- guint merge_id;
GthFileData *file_data;
GstElement *playbin;
GtkBuilder *builder;
@@ -78,32 +76,15 @@ struct _GthMediaViewerPagePrivate {
GdkCursor *cursor_void;
gboolean cursor_visible;
GthScreensaver *screensaver;
+ GtkWidget *screenshot_button;
};
static double default_rates[] = { 0.03, 0.06, 0.12, 0.25, 0.33, 0.50, 0.66, 1.0, 1.50, 2.0, 3.0, 4.0, 8.0,
16.0, 32.0 };
-static const char *media_viewer_ui_info =
-"<ui>"
-" <toolbar name='ViewerToolBar'>"
-" <placeholder name='ViewerCommands'>"
-" <toolitem action='MediaViewer_Screenshot'/>"
-" </placeholder>"
-" </toolbar>"
-" <toolbar name='Fullscreen_ToolBar'>"
-" <placeholder name='ViewerCommands'>"
-" <toolitem action='MediaViewer_Screenshot'/>"
-" </placeholder>"
-" </toolbar>"
-"</ui>";
-
-
-static GtkActionEntry media_viewer_action_entries[] = {
- { "MediaViewer_Screenshot", "camera-photo",
- N_("Screenshot"), NULL,
- N_("Take a screenshot"),
- G_CALLBACK (media_viewer_activate_action_screenshot) },
+static const GActionEntry actions[] = {
+ { "video-screenshot", gth_browser_activate_video_screenshot }
};
@@ -724,14 +705,17 @@ gth_media_viewer_page_real_activate (GthViewerPage *base,
self = (GthMediaViewerPage*) base;
self->priv->browser = browser;
-
- self->priv->actions = gtk_action_group_new ("Video Viewer Actions");
- gtk_action_group_set_translation_domain (self->priv->actions, NULL);
- gtk_action_group_add_actions (self->priv->actions,
- media_viewer_action_entries,
- G_N_ELEMENTS (media_viewer_action_entries),
- self);
- gtk_ui_manager_insert_action_group (gth_browser_get_ui_manager (browser), self->priv->actions, 0);
+ g_action_map_add_action_entries (G_ACTION_MAP (browser),
+ actions,
+ G_N_ELEMENTS (actions),
+ browser);
+ self->priv->screenshot_button =
+ gth_browser_add_header_bar_button (browser,
+ GTH_BROWSER_HEADER_SECTION_VIEWER_COMMANDS,
+ "camera-photo-symbolic",
+ _("Take a screenshot"),
+ "win.video-screenshot",
+ NULL);
/* video area */
@@ -907,9 +891,8 @@ gth_media_viewer_page_real_deactivate (GthViewerPage *base)
self->priv->playbin = NULL;
}
- gtk_ui_manager_remove_action_group (gth_browser_get_ui_manager (self->priv->browser),
self->priv->actions);
- g_object_unref (self->priv->actions);
- self->priv->actions = NULL;
+ gtk_widget_destroy (self->priv->screenshot_button);
+ self->priv->screenshot_button = NULL;
remove_fullscreen_toolbar (self);
@@ -1134,17 +1117,8 @@ static void
gth_media_viewer_page_real_show (GthViewerPage *base)
{
GthMediaViewerPage *self = GTH_MEDIA_VIEWER_PAGE (base);
- GError *error = NULL;
self->priv->visible = TRUE;
-
- if (self->priv->merge_id == 0) {
- self->priv->merge_id = gtk_ui_manager_add_ui_from_string (gth_browser_get_ui_manager
(self->priv->browser), media_viewer_ui_info, -1, &error);
- if (self->priv->merge_id == 0) {
- g_warning ("ui building failed: %s", error->message);
- g_error_free (error);
- }
- }
gth_viewer_page_focus (GTH_VIEWER_PAGE (self));
create_playbin (self);
@@ -1168,11 +1142,6 @@ gth_media_viewer_page_real_hide (GthViewerPage *base)
self->priv->visible = FALSE;
- if (self->priv->merge_id != 0) {
- gtk_ui_manager_remove_ui (gth_browser_get_ui_manager (self->priv->browser),
self->priv->merge_id);
- self->priv->merge_id = 0;
- }
-
if ((self->priv->playbin != NULL) && self->priv->playing)
gst_element_set_state (self->priv->playbin, GST_STATE_PAUSED);
}
@@ -1323,24 +1292,12 @@ gth_media_viewer_page_real_show_pointer (GthViewerPage *base,
static void
-set_action_sensitive (GthMediaViewerPage *self,
- const char *action_name,
- gboolean sensitive)
-{
- GtkAction *action;
-
- action = gtk_action_group_get_action (self->priv->actions, action_name);
- g_object_set (action, "sensitive", sensitive, NULL);
-}
-
-
-static void
gth_media_viewer_page_real_update_sensitivity (GthViewerPage *base)
{
GthMediaViewerPage *self = (GthMediaViewerPage *) base;
gtk_widget_set_sensitive (GET_WIDGET ("volume_box"), self->priv->has_audio);
- set_action_sensitive (self, "MediaViewer_Screenshot", self->priv->has_video);
+ gth_window_enable_action (GTH_WINDOW (self->priv->browser), "video-screenshot",
self->priv->has_video);
}
@@ -1485,6 +1442,7 @@ gth_media_viewer_page_init (GthMediaViewerPage *self)
self->priv->cursor_visible = TRUE;
self->priv->screensaver = gth_screensaver_new (NULL);
self->priv->visible = FALSE;
+ self->priv->screenshot_button = NULL;
}
diff --git a/extensions/image_print/callbacks.c b/extensions/image_print/callbacks.c
index 7022b91..7bcd40f 100644
--- a/extensions/image_print/callbacks.c
+++ b/extensions/image_print/callbacks.c
@@ -33,18 +33,6 @@
static const char *fixed_ui_info =
"<ui>"
-" <menubar name='MenuBar'>"
-" <menu name='File' action='FileMenu'>"
-" <placeholder name='File_Actions_2'>"
-" <menuitem action='File_Print'/>"
-" </placeholder>"
-" </menu>"
-" </menubar>"
-" <toolbar name='ToolBar'>"
-" <placeholder name='Export_Actions'>"
-" <toolitem action='File_Print'/>"
-" </placeholder>"
-" </toolbar>"
" <popup name='FileListPopup'>"
" <placeholder name='Open_Actions'>"
" <menuitem action='File_Print'/>"
diff --git a/extensions/image_viewer/gth-image-viewer-page.c b/extensions/image_viewer/gth-image-viewer-page.c
index 6602bac..ca57eb6 100644
--- a/extensions/image_viewer/gth-image-viewer-page.c
+++ b/extensions/image_viewer/gth-image-viewer-page.c
@@ -27,6 +27,7 @@
#include "preferences.h"
+#define HEADER_BUTTONS 5
#define UPDATE_QUALITY_DELAY 100
@@ -47,7 +48,6 @@ struct _GthImageViewerPagePrivate {
GtkWidget *viewer;
GthImagePreloader *preloader;
GtkActionGroup *actions;
- guint viewer_merge_id;
guint browser_merge_id;
GthImageHistory *history;
GthFileData *file_data;
@@ -56,6 +56,7 @@ struct _GthImageViewerPagePrivate {
GFile *last_loaded;
gboolean can_paste;
guint update_quality_event;
+ GtkWidget *buttons[HEADER_BUTTONS];
};
@@ -72,68 +73,10 @@ static const char *image_viewer_ui_info =
" </placeholder>"
" </menu>"
" </menubar>"
-" <toolbar name='ViewerToolBar'>"
-" <placeholder name='ViewerCommands'>"
-" <toolitem action='ImageViewer_View_ZoomIn'/>"
-" <toolitem action='ImageViewer_View_ZoomOut'/>"
-" <toolitem action='ImageViewer_View_Zoom100'/>"
-" <toolitem action='ImageViewer_View_ZoomFit'/>"
-" <toolitem action='ImageViewer_View_ZoomFitWidth'/>"
-" </placeholder>"
-" </toolbar>"
-" <toolbar name='Fullscreen_ToolBar'>"
-" <placeholder name='ViewerCommands'>"
-" <toolitem action='ImageViewer_View_ZoomIn'/>"
-" <toolitem action='ImageViewer_View_ZoomOut'/>"
-" <toolitem action='ImageViewer_View_Zoom100'/>"
-" <toolitem action='ImageViewer_View_ZoomFit'/>"
-" <toolitem action='ImageViewer_View_ZoomFitWidth'/>"
-" </placeholder>"
-" </toolbar>"
"</ui>";
static void
-image_viewer_activate_action_view_zoom_in (GtkAction *action,
- GthImageViewerPage *self)
-{
- gth_image_viewer_zoom_in (GTH_IMAGE_VIEWER (self->priv->viewer));
-}
-
-
-static void
-image_viewer_activate_action_view_zoom_out (GtkAction *action,
- GthImageViewerPage *self)
-{
- gth_image_viewer_zoom_out (GTH_IMAGE_VIEWER (self->priv->viewer));
-}
-
-
-static void
-image_viewer_activate_action_view_zoom_100 (GtkAction *action,
- GthImageViewerPage *self)
-{
- gth_image_viewer_set_zoom (GTH_IMAGE_VIEWER (self->priv->viewer), 1.0);
-}
-
-
-static void
-image_viewer_activate_action_view_zoom_fit (GtkAction *action,
- GthImageViewerPage *self)
-{
- gth_image_viewer_set_fit_mode (GTH_IMAGE_VIEWER (self->priv->viewer), GTH_FIT_SIZE);
-}
-
-
-static void
-image_viewer_activate_action_view_zoom_fit_width (GtkAction *action,
- GthImageViewerPage *self)
-{
- gth_image_viewer_set_fit_mode (GTH_IMAGE_VIEWER (self->priv->viewer), GTH_FIT_WIDTH);
-}
-
-
-static void
image_viewer_activate_action_edit_undo (GtkAction *action,
GthImageViewerPage *self)
{
@@ -185,31 +128,82 @@ static GtkActionEntry image_viewer_action_entries[] = {
N_("Paste Image"), "<control>p",
N_("Paste the image from the clipboard"),
G_CALLBACK (image_viewer_activate_action_edit_paste_image) },
+};
+
+
+static void
+gth_browser_activate_image_zoom_in (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
+{
+ GthBrowser *browser = user_data;
+ GthImageViewerPage *self = (GthImageViewerPage *) gth_browser_get_viewer_page (browser);
+
+ gth_image_viewer_zoom_in (GTH_IMAGE_VIEWER (self->priv->viewer));
+}
+
+
+static void
+gth_browser_activate_image_zoom_out (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
+{
+ GthBrowser *browser = user_data;
+ GthImageViewerPage *self = (GthImageViewerPage *) gth_browser_get_viewer_page (browser);
+
+ gth_image_viewer_zoom_out (GTH_IMAGE_VIEWER (self->priv->viewer));
+}
+
- { "ImageViewer_View_ZoomIn", GTK_STOCK_ZOOM_IN,
- N_("In"), "<control>plus",
- N_("Zoom in"),
- G_CALLBACK (image_viewer_activate_action_view_zoom_in) },
-
- { "ImageViewer_View_ZoomOut", GTK_STOCK_ZOOM_OUT,
- N_("Out"), "<control>minus",
- N_("Zoom out"),
- G_CALLBACK (image_viewer_activate_action_view_zoom_out) },
-
- { "ImageViewer_View_Zoom100", GTK_STOCK_ZOOM_100,
- N_("1:1"), "<control>0",
- N_("Actual size"),
- G_CALLBACK (image_viewer_activate_action_view_zoom_100) },
-
- { "ImageViewer_View_ZoomFit", GTK_STOCK_ZOOM_FIT,
- N_("Fit"), "",
- N_("Zoom to fit window"),
- G_CALLBACK (image_viewer_activate_action_view_zoom_fit) },
-
- { "ImageViewer_View_ZoomFitWidth", GTH_STOCK_ZOOM_FIT_WIDTH,
- N_("Width"), "",
- N_("Zoom to fit width"),
- G_CALLBACK (image_viewer_activate_action_view_zoom_fit_width) },
+static void
+gth_browser_activate_image_zoom_100 (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
+{
+ GthBrowser *browser = user_data;
+ GthImageViewerPage *self = (GthImageViewerPage *) gth_browser_get_viewer_page (browser);
+
+ gth_image_viewer_set_zoom (GTH_IMAGE_VIEWER (self->priv->viewer), 1.0);
+}
+
+
+static void
+gth_browser_activate_image_zoom_fit (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
+{
+ GthBrowser *browser = user_data;
+ GthImageViewerPage *self = (GthImageViewerPage *) gth_browser_get_viewer_page (browser);
+
+ gth_image_viewer_set_fit_mode (GTH_IMAGE_VIEWER (self->priv->viewer), GTH_FIT_SIZE);
+}
+
+
+static void
+gth_browser_activate_image_zoom_fit_width (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
+{
+ GthBrowser *browser = user_data;
+ GthImageViewerPage *self = (GthImageViewerPage *) gth_browser_get_viewer_page (browser);
+
+ gth_image_viewer_set_fit_mode (GTH_IMAGE_VIEWER (self->priv->viewer), GTH_FIT_WIDTH);
+}
+
+
+static const GActionEntry actions[] = {
+ { "image-zoom-in", gth_browser_activate_image_zoom_in },
+ { "image-zoom-out", gth_browser_activate_image_zoom_out },
+ { "image-zoom-100", gth_browser_activate_image_zoom_100 },
+ { "image-zoom-fit", gth_browser_activate_image_zoom_fit },
+ { "image-zoom-fit-width", gth_browser_activate_image_zoom_fit_width }
+};
+
+
+static const GthAccelerator accelerators[] = {
+ { "image-zoom-in", "<control>plus" },
+ { "image-zoom-out", "<control>minus" },
+ { "image-zoom-100", "<control>0" },
};
@@ -766,14 +760,45 @@ gth_image_viewer_page_real_activate (GthViewerPage *base,
self = (GthImageViewerPage*) base;
self->priv->browser = browser;
-
- self->priv->actions = gtk_action_group_new ("Image Viewer Actions");
- gtk_action_group_set_translation_domain (self->priv->actions, NULL);
- gtk_action_group_add_actions (self->priv->actions,
- image_viewer_action_entries,
- G_N_ELEMENTS (image_viewer_action_entries),
- self);
- gtk_ui_manager_insert_action_group (gth_browser_get_ui_manager (browser), self->priv->actions, 0);
+ g_action_map_add_action_entries (G_ACTION_MAP (browser),
+ actions,
+ G_N_ELEMENTS (actions),
+ browser);
+ self->priv->buttons[0] =
+ gth_browser_add_header_bar_button (browser,
+ GTH_BROWSER_HEADER_SECTION_VIEWER_COMMANDS,
+ "view-zoom-in-symbolic",
+ _("Zoom in"),
+ "win.image-zoom-in",
+ NULL);
+ self->priv->buttons[1] =
+ gth_browser_add_header_bar_button (browser,
+ GTH_BROWSER_HEADER_SECTION_VIEWER_COMMANDS,
+ "view-zoom-out-symbolic",
+ _("Zoom out"),
+ "win.image-zoom-out",
+ NULL);
+ self->priv->buttons[2] =
+ gth_browser_add_header_bar_button (browser,
+ GTH_BROWSER_HEADER_SECTION_VIEWER_COMMANDS,
+ "view-zoom-original-symbolic",
+ _("Actual size"),
+ "win.image-zoom-100",
+ NULL);
+ self->priv->buttons[3] =
+ gth_browser_add_header_bar_button (browser,
+ GTH_BROWSER_HEADER_SECTION_VIEWER_COMMANDS,
+ "view-zoom-fit-symbolic",
+ _("Zoom to fit window"),
+ "win.image-zoom-fit",
+ NULL);
+ self->priv->buttons[4] =
+ gth_browser_add_header_bar_button (browser,
+ GTH_BROWSER_HEADER_SECTION_VIEWER_COMMANDS,
+ "view-zoom-fit-width-symbolic",
+ _("Zoom to fit width"),
+ "win.image-zoom-fit-width",
+ NULL);
self->priv->preloader = gth_browser_get_image_preloader (browser);
@@ -865,18 +890,15 @@ static void
gth_image_viewer_page_real_deactivate (GthViewerPage *base)
{
GthImageViewerPage *self;
+ int i;
self = (GthImageViewerPage*) base;
- if (self->priv->browser_merge_id != 0) {
- gtk_ui_manager_remove_ui (gth_browser_get_ui_manager (self->priv->browser),
self->priv->browser_merge_id);
- self->priv->browser_merge_id = 0;
+ for (i = 0; i < HEADER_BUTTONS; i++) {
+ gtk_widget_destroy (self->priv->buttons[i]);
+ self->priv->buttons[i] = NULL;
}
- gtk_ui_manager_remove_action_group (gth_browser_get_ui_manager (self->priv->browser),
self->priv->actions);
- g_object_unref (self->priv->actions);
- self->priv->actions = NULL;
-
g_object_unref (self->priv->preloader);
self->priv->preloader = NULL;
@@ -887,35 +909,14 @@ gth_image_viewer_page_real_deactivate (GthViewerPage *base)
static void
gth_image_viewer_page_real_show (GthViewerPage *base)
{
- GthImageViewerPage *self;
- GError *error = NULL;
-
- self = (GthImageViewerPage*) base;
-
- if (self->priv->viewer_merge_id != 0)
- return;
-
- self->priv->viewer_merge_id = gtk_ui_manager_add_ui_from_string (gth_browser_get_ui_manager
(self->priv->browser), image_viewer_ui_info, -1, &error);
- if (self->priv->viewer_merge_id == 0) {
- g_warning ("ui building failed: %s", error->message);
- g_error_free (error);
- }
-
- gth_viewer_page_focus (GTH_VIEWER_PAGE (self));
+ gth_viewer_page_focus (GTH_VIEWER_PAGE (base));
}
static void
gth_image_viewer_page_real_hide (GthViewerPage *base)
{
- GthImageViewerPage *self;
-
- self = (GthImageViewerPage*) base;
-
- if (self->priv->viewer_merge_id != 0) {
- gtk_ui_manager_remove_ui (gth_browser_get_ui_manager (self->priv->browser),
self->priv->viewer_merge_id);
- self->priv->viewer_merge_id = 0;
- }
+ /* void */
}
@@ -924,12 +925,10 @@ gth_image_viewer_page_real_can_view (GthViewerPage *base,
GthFileData *file_data)
{
g_return_val_if_fail (file_data != NULL, FALSE);
-
return _g_mime_type_is_image (gth_file_data_get_mime_type (file_data));
}
-
static void
preloader_load_ready_cb (GObject *source_object,
GAsyncResult *result,
@@ -1583,8 +1582,6 @@ gth_image_viewer_page_init (GthImageViewerPage *self)
self->priv->image_changed = FALSE;
self->priv->loading_image = FALSE;
self->priv->can_paste = FALSE;
- self->priv->viewer_merge_id = 0;
- self->priv->browser_merge_id = 0;
self->priv->update_quality_event = 0;
}
diff --git a/gthumb/gth-browser-actions-callbacks.c b/gthumb/gth-browser-actions-callbacks.c
index e06941c..651f2b3 100644
--- a/gthumb/gth-browser-actions-callbacks.c
+++ b/gthumb/gth-browser-actions-callbacks.c
@@ -178,22 +178,6 @@ gth_browser_activate_action_view_reload (GtkAction *action,
void
-gth_browser_activate_action_view_prev (GtkAction *action,
- GthBrowser *browser)
-{
- gth_browser_show_prev_image (browser, FALSE, FALSE);
-}
-
-
-void
-gth_browser_activate_action_view_next (GtkAction *action,
- GthBrowser *browser)
-{
- gth_browser_show_next_image (browser, FALSE, FALSE);
-}
-
-
-void
gth_browser_activate_action_folder_open (GtkAction *action,
GthBrowser *browser)
{
@@ -228,36 +212,6 @@ gth_browser_activate_action_folder_open_in_new_window (GtkAction *action,
void
-gth_browser_activate_action_viewer_properties (GtkAction *action,
- GthBrowser *browser)
-{
- if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)))
- gth_browser_show_file_properties (GTH_BROWSER (browser));
- else
- gth_browser_hide_sidebar (GTH_BROWSER (browser));
-}
-
-
-void
-gth_browser_activate_action_browser_tools (GtkAction *action,
- GthBrowser *browser)
-{
- gth_browser_show_viewer_tools (GTH_BROWSER (browser));
-}
-
-
-void
-gth_browser_activate_action_viewer_tools (GtkAction *action,
- GthBrowser *browser)
-{
- if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)))
- gth_browser_show_viewer_tools (GTH_BROWSER (browser));
- else
- gth_browser_hide_sidebar (GTH_BROWSER (browser));
-}
-
-
-void
gth_browser_activate_action_view_shrink_wrap (GtkAction *action,
GthBrowser *browser)
{
@@ -276,6 +230,20 @@ gth_browser_activate_action_edit_select_all (GtkAction *action,
/* -- GAction callbacks -- */
+void
+toggle_action_activated (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer data)
+{
+ GVariant *state;
+
+ state = g_action_get_state (G_ACTION (action));
+ g_action_change_state (G_ACTION (action), g_variant_new_boolean (! g_variant_get_boolean (state)));
+
+ g_variant_unref (state);
+}
+
+
GtkWidget *
_gth_application_get_current_window (GApplication *application)
{
@@ -439,6 +407,30 @@ gth_browser_activate_browser_mode (GSimpleAction *action,
void
+gth_browser_activate_browser_edit_file (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
+{
+ gth_browser_show_viewer_tools (GTH_BROWSER (user_data));
+}
+
+
+void
+gth_browser_activate_browser_properties (GSimpleAction *action,
+ GVariant *state,
+ gpointer user_data)
+{
+ GthBrowser *browser = user_data;
+
+ g_simple_action_set_state (action, state);
+ if (g_variant_get_boolean (state))
+ gth_browser_show_file_properties (GTH_BROWSER (browser));
+ else
+ gth_browser_hide_sidebar (GTH_BROWSER (browser));
+}
+
+
+void
gth_browser_activate_clear_history (GSimpleAction *action,
GVariant *parameter,
gpointer user_data)
@@ -584,6 +576,36 @@ gth_browser_activate_save_as (GSimpleAction *action,
void
+gth_browser_activate_viewer_edit_file (GSimpleAction *action,
+ GVariant *state,
+ gpointer user_data)
+{
+ GthBrowser *browser = user_data;
+
+ g_simple_action_set_state (action, state);
+ if (g_variant_get_boolean (state))
+ gth_browser_show_viewer_tools (browser);
+ else
+ gth_browser_hide_sidebar (browser);
+}
+
+
+void
+gth_browser_activate_viewer_properties (GSimpleAction *action,
+ GVariant *state,
+ gpointer user_data)
+{
+ GthBrowser *browser = user_data;
+
+ g_simple_action_set_state (action, state);
+ if (g_variant_get_boolean (state))
+ gth_browser_show_file_properties (browser);
+ else
+ gth_browser_hide_sidebar (browser);
+}
+
+
+void
gth_browser_activate_unfullscreen (GSimpleAction *action,
GVariant *parameter,
gpointer user_data)
diff --git a/gthumb/gth-browser-actions-callbacks.h b/gthumb/gth-browser-actions-callbacks.h
index 04c8290..a6d4206 100644
--- a/gthumb/gth-browser-actions-callbacks.h
+++ b/gthumb/gth-browser-actions-callbacks.h
@@ -34,7 +34,6 @@ DEFINE_ACTION(gth_browser_activate_action_folder_open_in_file_manager)
DEFINE_ACTION(gth_browser_activate_action_view_sort_by)
DEFINE_ACTION(gth_browser_activate_action_view_filter)
DEFINE_ACTION(gth_browser_activate_action_view_filterbar)
-DEFINE_ACTION(gth_browser_activate_action_view_fullscreen)
DEFINE_ACTION(gth_browser_activate_action_view_thumbnails)
DEFINE_ACTION(gth_browser_activate_action_view_toolbar)
DEFINE_ACTION(gth_browser_activate_action_view_show_hidden_files)
@@ -43,13 +42,9 @@ DEFINE_ACTION(gth_browser_activate_action_view_sidebar)
DEFINE_ACTION(gth_browser_activate_action_view_thumbnail_list)
DEFINE_ACTION(gth_browser_activate_action_view_stop)
DEFINE_ACTION(gth_browser_activate_action_view_reload)
-DEFINE_ACTION(gth_browser_activate_action_view_next)
-DEFINE_ACTION(gth_browser_activate_action_view_prev)
-DEFINE_ACTION(gth_browser_activate_action_viewer_properties)
-DEFINE_ACTION(gth_browser_activate_action_browser_tools)
-DEFINE_ACTION(gth_browser_activate_action_viewer_tools)
DEFINE_ACTION(gth_browser_activate_action_view_shrink_wrap)
+DEF_ACTION_CALLBACK (toggle_action_activated)
DEF_ACTION_CALLBACK (gth_application_activate_new_window)
DEF_ACTION_CALLBACK (gth_application_activate_preferences)
DEF_ACTION_CALLBACK (gth_application_activate_show_shortcuts)
@@ -57,6 +52,8 @@ DEF_ACTION_CALLBACK (gth_application_activate_show_help)
DEF_ACTION_CALLBACK (gth_application_activate_about)
DEF_ACTION_CALLBACK (gth_application_activate_quit)
DEF_ACTION_CALLBACK (gth_browser_activate_browser_mode)
+DEF_ACTION_CALLBACK (gth_browser_activate_browser_edit_file)
+DEF_ACTION_CALLBACK (gth_browser_activate_browser_properties)
DEF_ACTION_CALLBACK (gth_browser_activate_clear_history)
DEF_ACTION_CALLBACK (gth_browser_activate_close)
DEF_ACTION_CALLBACK (gth_browser_activate_fullscreen)
@@ -70,6 +67,8 @@ DEF_ACTION_CALLBACK (gth_browser_activate_open_location)
DEF_ACTION_CALLBACK (gth_browser_activate_revert_to_saved)
DEF_ACTION_CALLBACK (gth_browser_activate_save)
DEF_ACTION_CALLBACK (gth_browser_activate_save_as)
+DEF_ACTION_CALLBACK (gth_browser_activate_viewer_edit_file)
+DEF_ACTION_CALLBACK (gth_browser_activate_viewer_properties)
DEF_ACTION_CALLBACK (gth_browser_activate_unfullscreen)
#endif /* GTH_BROWSER_ACTIONS_CALLBACK_H */
diff --git a/gthumb/gth-browser-actions-entries.h b/gthumb/gth-browser-actions-entries.h
index 0f823e2..a1ceff2 100644
--- a/gthumb/gth-browser-actions-entries.h
+++ b/gthumb/gth-browser-actions-entries.h
@@ -29,6 +29,8 @@
static const GActionEntry gth_browser_actions[] = {
{ "browser-mode", gth_browser_activate_browser_mode },
+ { "browser-edit-file", gth_browser_activate_browser_edit_file },
+ { "browser-properties", toggle_action_activated, NULL, "false",
gth_browser_activate_browser_properties },
{ "clear-history", gth_browser_activate_clear_history },
{ "close", gth_browser_activate_close },
{ "fullscreen", gth_browser_activate_fullscreen },
@@ -42,6 +44,8 @@ static const GActionEntry gth_browser_actions[] = {
{ "revert-to-saved", gth_browser_activate_revert_to_saved },
{ "save", gth_browser_activate_save },
{ "save-as", gth_browser_activate_save_as },
+ { "viewer-edit-file", toggle_action_activated, NULL, "false", gth_browser_activate_viewer_edit_file },
+ { "viewer-properties", toggle_action_activated, NULL, "false", gth_browser_activate_viewer_properties
},
{ "unfullscreen", gth_browser_activate_unfullscreen },
};
@@ -49,6 +53,7 @@ static const GActionEntry gth_browser_actions[] = {
static const GthAccelerator gth_browser_accelerators[] = {
{ "browser-mode", "Escape" },
{ "fullscreen", "F11" },
+ { "browser-properties", "<Ctrl>i" },
};
@@ -107,30 +112,6 @@ static GthActionEntryExt gth_browser_action_entries[] = {
N_("Reload the current location"),
GTH_ACTION_FLAG_NONE,
G_CALLBACK (gth_browser_activate_action_view_reload) },
-
- { "View_Prev", GTK_STOCK_GO_UP,
- N_("Previous"), NULL,
- N_("View previous image"),
- GTH_ACTION_FLAG_IS_IMPORTANT,
- G_CALLBACK (gth_browser_activate_action_view_prev) },
-
- { "View_Next", GTK_STOCK_GO_DOWN,
- N_("Next"), NULL,
- N_("View next image"),
- GTH_ACTION_FLAG_IS_IMPORTANT,
- G_CALLBACK (gth_browser_activate_action_view_next) },
-
- { "View_Leave_Fullscreen", GTK_STOCK_LEAVE_FULLSCREEN,
- NULL, NULL,
- N_("Leave Fullscreen"),
- GTH_ACTION_FLAG_NONE,
- G_CALLBACK (gth_browser_activate_action_view_fullscreen) },
-
- { "Browser_Tools", "palette",
- N_("Edit"), NULL,
- N_("Edit file"),
- GTH_ACTION_FLAG_NONE,
- G_CALLBACK (gth_browser_activate_action_browser_tools) },
};
@@ -170,21 +151,6 @@ static GtkToggleActionEntry gth_browser_action_toggle_entries[] = {
N_("Show hidden files and folders"),
G_CALLBACK (gth_browser_activate_action_view_show_hidden_files),
FALSE },
- { "Viewer_Properties", GTK_STOCK_PROPERTIES,
- NULL, "<control>I",
- N_("View file properties"),
- G_CALLBACK (gth_browser_activate_action_viewer_properties),
- FALSE },
- { "Browser_Properties", GTK_STOCK_PROPERTIES,
- NULL, "<control>I",
- N_("View file properties"),
- G_CALLBACK (gth_browser_activate_action_viewer_properties),
- FALSE },
- { "Viewer_Tools", "palette",
- N_("Edit"), NULL,
- N_("Edit file"),
- G_CALLBACK (gth_browser_activate_action_viewer_tools),
- FALSE },
{ "View_ShrinkWrap", NULL,
N_("_Fit Window to Image"), "<control>e",
N_("Resize the window to the size of the image"),
diff --git a/gthumb/gth-browser-ui.h b/gthumb/gth-browser-ui.h
index 37fef24..36c9c66 100644
--- a/gthumb/gth-browser-ui.h
+++ b/gthumb/gth-browser-ui.h
@@ -89,38 +89,24 @@ static const char *fixed_ui_info =
" <placeholder name='Edit_Actions_2'/>"
" <separator expand='true'/>"
" <placeholder name='BrowserCommandsSecondary'/>"
-" <toolitem action='Browser_Tools'/>"
-" <toolitem action='Browser_Properties'/>"
" </toolbar>"
" <toolbar name='ViewerToolBar'>"
-" <toolitem action='View_Prev'/>"
-" <toolitem action='View_Next'/>"
-" <separator/>"
" <placeholder name='ViewerCommands'/>"
" <separator/>"
" <placeholder name='Edit_Actions'/>"
" <placeholder name='Edit_Actions_2'/>"
" <separator expand='true'/>"
" <placeholder name='ViewerCommandsSecondary'/>"
-" <toolitem action='Viewer_Tools'/>"
-" <toolitem action='Viewer_Properties'/>"
" </toolbar>"
" <toolbar name='Fullscreen_ToolBar'>"
-" <toolitem action='View_Leave_Fullscreen'/>"
-" <separator/>"
-" <toolitem action='View_Prev'/>"
-" <toolitem action='View_Next'/>"
-" <separator/>"
" <placeholder name='ViewerCommands'/>"
" <separator/>"
" <placeholder name='Edit_Actions'/>"
" <placeholder name='Edit_Actions_2'/>"
" <separator expand='true'/>"
" <placeholder name='ViewerCommandsSecondary'/>"
-" <toolitem action='Viewer_Tools'/>"
-" <toolitem action='Viewer_Properties'/>"
" </toolbar>"
" <popup name='FileListPopup'>"
@@ -180,7 +166,6 @@ static const char *browser_ui_info =
" <placeholder name='View_Bars'>"
" <menuitem action='View_Sidebar'/>"
" <menuitem action='View_Filterbar'/>"
-" <menuitem action='Browser_Properties'/>"
" </placeholder>"
" <placeholder name='Folder_Actions'>"
" <menuitem action='View_Thumbnails'/>"
@@ -196,7 +181,6 @@ static const char *viewer_ui_info =
" <menu name='View' action='ViewMenu'>"
" <placeholder name='View_Bars'>"
" <menuitem action='View_Thumbnail_List'/>"
-" <menuitem action='Viewer_Properties'/>"
" </placeholder>"
" <placeholder name='View_Actions'>"
" <menuitem action='View_ShrinkWrap'/>"
diff --git a/gthumb/gth-browser.c b/gthumb/gth-browser.c
index e4dd6a1..a1827a1 100644
--- a/gthumb/gth-browser.c
+++ b/gthumb/gth-browser.c
@@ -305,18 +305,6 @@ monitor_event_data_unref (MonitorEventData *monitor_data)
static void
-_gth_browser_enable_action (GthBrowser *browser,
- const char *action_name,
- gboolean enabled)
-{
- GAction *action;
-
- action = g_action_map_lookup_action (G_ACTION_MAP (browser), action_name);
- g_object_set (action, "enabled", enabled, NULL);
-}
-
-
-static void
_gth_browser_set_action_sensitive (GthBrowser *browser,
const char *action_name,
gboolean sensitive)
@@ -409,8 +397,6 @@ gth_browser_update_sensitivity (GthBrowser *browser)
gboolean parent_available;
gboolean viewer_can_save;
gboolean modified;
- int current_file_pos;
- int n_files;
int n_selected;
if (browser->priv->location != NULL)
@@ -423,26 +409,19 @@ gth_browser_update_sensitivity (GthBrowser *browser)
viewer_can_save = (browser->priv->location != NULL) && (browser->priv->viewer_page != NULL) &&
gth_viewer_page_can_save (GTH_VIEWER_PAGE (browser->priv->viewer_page));
modified = gth_browser_get_file_modified (browser);
- if (browser->priv->current_file != NULL)
- current_file_pos = gth_file_store_get_pos (gth_browser_get_file_store (browser),
browser->priv->current_file->file);
- else
- current_file_pos = -1;
- n_files = gth_file_store_n_visibles (gth_browser_get_file_store (browser));
n_selected = gth_file_selection_get_n_selected (GTH_FILE_SELECTION (gth_browser_get_file_list_view
(browser)));
_gth_browser_set_action_sensitive (browser, "File_Open", n_selected == 1);
_gth_browser_set_action_sensitive (browser, "View_Stop", browser->priv->fullscreen ||
(browser->priv->activity_ref > 0));
- _gth_browser_set_action_sensitive (browser, "View_Prev", current_file_pos > 0);
- _gth_browser_set_action_sensitive (browser, "View_Next", (current_file_pos != -1) &&
(current_file_pos < n_files - 1));
_gth_browser_set_action_sensitive (browser, "View_Thumbnail_List", gth_window_get_current_page
(GTH_WINDOW (browser)) == GTH_BROWSER_PAGE_VIEWER);
_gth_browser_set_action_sensitive (browser, "View_Sidebar", gth_window_get_current_page (GTH_WINDOW
(browser)) == GTH_BROWSER_PAGE_BROWSER);
_gth_browser_set_action_sensitive (browser, "View_Reload", gth_window_get_current_page (GTH_WINDOW
(browser)) == GTH_BROWSER_PAGE_BROWSER);
- _gth_browser_enable_action (browser, "save", viewer_can_save && modified);
- _gth_browser_enable_action (browser, "save-as", viewer_can_save);
- _gth_browser_enable_action (browser, "revert-to-saved", viewer_can_save && modified);
- _gth_browser_enable_action (browser, "clear-history", browser->priv->history != NULL);
- _gth_browser_enable_action (browser, "go-up", parent_available);
+ gth_window_enable_action (GTH_WINDOW (browser), "save", viewer_can_save && modified);
+ gth_window_enable_action (GTH_WINDOW (browser), "save-as", viewer_can_save);
+ gth_window_enable_action (GTH_WINDOW (browser), "revert-to-saved", viewer_can_save && modified);
+ gth_window_enable_action (GTH_WINDOW (browser), "clear-history", browser->priv->history != NULL);
+ gth_window_enable_action (GTH_WINDOW (browser), "go-up", parent_available);
gth_sidebar_update_sensitivity (GTH_SIDEBAR (browser->priv->file_properties));
@@ -2264,7 +2243,7 @@ _gth_browser_update_header_section_visibility (GthBrowser *browser,
GtkWidget *header_section;
header_section = browser->priv->header_sections[section];
- gtk_widget_set_visible (header_section, visible && (_gtk_container_get_n_children (GTK_CONTAINER
(header_section)) > 0));
+ gtk_widget_set_visible (header_section, visible /* && (_gtk_container_get_n_children (GTK_CONTAINER
(header_section)) > 0) FIXME */);
}
@@ -2295,13 +2274,12 @@ _gth_browser_real_set_current_page (GthWindow *window,
_gth_browser_update_header_section_visibility (browser, GTH_BROWSER_HEADER_SECTION_BROWSER_VIEW, page
== GTH_BROWSER_PAGE_BROWSER);
_gth_browser_update_header_section_visibility (browser, GTH_BROWSER_HEADER_SECTION_BROWSER_EDIT, page
== GTH_BROWSER_PAGE_BROWSER);
_gth_browser_update_header_section_visibility (browser, GTH_BROWSER_HEADER_SECTION_BROWSER_TOOLS,
page == GTH_BROWSER_PAGE_BROWSER);
- _gth_browser_update_header_section_visibility (browser,
GTH_BROWSER_HEADER_SECTION_BROWSER_PROPERTIES, page == GTH_BROWSER_PAGE_BROWSER);
_gth_browser_update_header_section_visibility (browser, GTH_BROWSER_HEADER_SECTION_VIEWER_NAVIGATION,
page == GTH_BROWSER_PAGE_VIEWER);
+ _gth_browser_update_header_section_visibility (browser, GTH_BROWSER_HEADER_SECTION_VIEWER_COMMANDS,
page == GTH_BROWSER_PAGE_VIEWER);
_gth_browser_update_header_section_visibility (browser, GTH_BROWSER_HEADER_SECTION_VIEWER_VIEW, page
== GTH_BROWSER_PAGE_VIEWER);
_gth_browser_update_header_section_visibility (browser, GTH_BROWSER_HEADER_SECTION_VIEWER_EDIT, page
== GTH_BROWSER_PAGE_VIEWER);
_gth_browser_update_header_section_visibility (browser, GTH_BROWSER_HEADER_SECTION_VIEWER_TOOLS, page
== GTH_BROWSER_PAGE_VIEWER);
- _gth_browser_update_header_section_visibility (browser, GTH_BROWSER_HEADER_SECTION_VIEWER_PROPERTIES,
page == GTH_BROWSER_PAGE_VIEWER);
/* move the sidebar from the browser to the viewer and vice-versa */
@@ -2325,7 +2303,7 @@ _gth_browser_real_set_current_page (GthWindow *window,
if (page == GTH_BROWSER_PAGE_BROWSER) {
gth_sidebar_show_properties (GTH_SIDEBAR (browser->priv->file_properties));
- if (_gth_browser_get_action_active (browser, "Browser_Properties"))
+ if (gth_window_get_action_state (GTH_WINDOW (browser), "browser-properties"))
gth_browser_show_file_properties (browser);
else
gth_browser_hide_sidebar (browser);
@@ -3533,7 +3511,7 @@ gth_file_list_key_press_cb (GtkWidget *widget,
break;
case GDK_KEY_i:
- if (_gth_browser_get_action_active (browser, "Browser_Properties"))
+ if (gth_window_get_action_state (GTH_WINDOW (browser), "browser-properties"))
gth_browser_hide_sidebar (browser);
else
gth_browser_show_file_properties (browser);
@@ -4225,13 +4203,12 @@ gth_browser_init (GthBrowser *browser)
gtk_header_bar_pack_end (GTK_HEADER_BAR (header_bar),
browser->priv->header_sections[GTH_BROWSER_HEADER_SECTION_BROWSER_VIEW]);
gtk_header_bar_pack_end (GTK_HEADER_BAR (header_bar),
browser->priv->header_sections[GTH_BROWSER_HEADER_SECTION_BROWSER_EDIT]);
gtk_header_bar_pack_end (GTK_HEADER_BAR (header_bar),
browser->priv->header_sections[GTH_BROWSER_HEADER_SECTION_BROWSER_TOOLS]);
- gtk_header_bar_pack_end (GTK_HEADER_BAR (header_bar),
browser->priv->header_sections[GTH_BROWSER_HEADER_SECTION_BROWSER_PROPERTIES]);
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar),
browser->priv->header_sections[GTH_BROWSER_HEADER_SECTION_VIEWER_NAVIGATION]);
+ gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar),
browser->priv->header_sections[GTH_BROWSER_HEADER_SECTION_VIEWER_COMMANDS]);
gtk_header_bar_pack_end (GTK_HEADER_BAR (header_bar),
browser->priv->header_sections[GTH_BROWSER_HEADER_SECTION_VIEWER_VIEW]);
gtk_header_bar_pack_end (GTK_HEADER_BAR (header_bar),
browser->priv->header_sections[GTH_BROWSER_HEADER_SECTION_VIEWER_EDIT]);
gtk_header_bar_pack_end (GTK_HEADER_BAR (header_bar),
browser->priv->header_sections[GTH_BROWSER_HEADER_SECTION_VIEWER_TOOLS]);
- gtk_header_bar_pack_end (GTK_HEADER_BAR (header_bar),
browser->priv->header_sections[GTH_BROWSER_HEADER_SECTION_VIEWER_PROPERTIES]);
/* gears menu button */
@@ -4270,7 +4247,7 @@ gth_browser_init (GthBrowser *browser)
_("Go to the next visited location"),
"win.go-forward",
"<alt>Right");
- gth_browser_add_header_bar_button (browser,
+ /*gth_browser_add_header_bar_button (browser,
GTH_BROWSER_HEADER_SECTION_BROWSER_NAVIGATION,
"go-up-symbolic",
_("Go up one level"),
@@ -4281,7 +4258,7 @@ gth_browser_init (GthBrowser *browser)
"user-home-symbolic",
NULL,
"win.go-home",
- "<alt>Home");
+ "<alt>Home"); FIXME */
/* history menu button */
@@ -4303,12 +4280,24 @@ gth_browser_init (GthBrowser *browser)
/* browser commands */
+ gth_browser_add_header_bar_toggle_button (browser,
+ GTH_BROWSER_HEADER_SECTION_BROWSER_VIEW,
+ "document-properties-symbolic",
+ _("View file properties"),
+ "win.browser-properties",
+ NULL);
gth_browser_add_header_bar_button (browser,
GTH_BROWSER_HEADER_SECTION_BROWSER_VIEW,
"view-fullscreen-symbolic",
_("Switch to fullscreen"),
"win.fullscreen",
NULL);
+ gth_browser_add_header_bar_button (browser,
+ GTH_BROWSER_HEADER_SECTION_BROWSER_EDIT,
+ "palette-symbolic",
+ _("Edit file"),
+ "win.browser-edit-file",
+ NULL);
/* viewer navigation */
@@ -4321,12 +4310,27 @@ gth_browser_init (GthBrowser *browser)
/* viewer view */
+ gth_browser_add_header_bar_toggle_button (browser,
+ GTH_BROWSER_HEADER_SECTION_VIEWER_VIEW,
+ "document-properties-symbolic",
+ _("View file properties"),
+ "win.viewer-properties",
+ NULL);
gth_browser_add_header_bar_button (browser,
GTH_BROWSER_HEADER_SECTION_VIEWER_VIEW,
"view-fullscreen-symbolic",
_("Switch to fullscreen"),
"win.fullscreen",
NULL);
+
+ /* viewer edit */
+
+ gth_browser_add_header_bar_toggle_button (browser,
+ GTH_BROWSER_HEADER_SECTION_VIEWER_EDIT,
+ "palette-symbolic",
+ _("Edit file"),
+ "win.viewer-edit-file",
+ NULL);
}
/* toolbar */
@@ -4922,7 +4926,30 @@ gth_browser_get_headerbar_section (GthBrowser *browser,
}
-void
+static void
+_gth_browser_setup_header_bar_button (GthBrowser *browser,
+ GthBrowserHeaderSection section,
+ const char *icon_name,
+ const char *tooltip,
+ const char *action_name,
+ const char *accelerator,
+ GtkWidget *button)
+{
+ gtk_actionable_set_action_name (GTK_ACTIONABLE (button),action_name);
+ if (tooltip != NULL)
+ gtk_widget_set_tooltip_text (button, tooltip);
+ if (accelerator != NULL)
+ _gtk_window_add_accelerator_for_action (GTK_WINDOW (browser),
+ gth_window_get_accel_group (GTH_WINDOW (browser)),
+ action_name,
+ accelerator,
+ NULL);
+ gtk_widget_show (button);
+ gtk_box_pack_start (GTK_BOX (gth_browser_get_headerbar_section (browser, section)), button, FALSE,
FALSE, 0);
+}
+
+
+GtkWidget *
gth_browser_add_header_bar_button (GthBrowser *browser,
GthBrowserHeaderSection section,
const char *icon_name,
@@ -4936,17 +4963,29 @@ gth_browser_add_header_bar_button (GthBrowser *browser,
g_return_if_fail (action_name != NULL);
button = _gtk_image_button_new_for_header_bar (icon_name);
- gtk_actionable_set_action_name (GTK_ACTIONABLE (button),action_name);
- if (tooltip != NULL)
- gtk_widget_set_tooltip_text (button, tooltip);
- if (accelerator != NULL)
- _gtk_window_add_accelerator_for_action (GTK_WINDOW (browser),
- gth_window_get_accel_group (GTH_WINDOW (browser)),
- action_name,
- accelerator,
- NULL);
- gtk_widget_show (button);
- gtk_box_pack_start (GTK_BOX (gth_browser_get_headerbar_section (browser, section)), button, FALSE,
FALSE, 0);
+ _gth_browser_setup_header_bar_button (browser, section, icon_name, tooltip, action_name, accelerator,
button);
+
+ return button;
+}
+
+
+GtkWidget *
+gth_browser_add_header_bar_toggle_button (GthBrowser *browser,
+ GthBrowserHeaderSection section,
+ const char *icon_name,
+ const char *tooltip,
+ const char *action_name,
+ const char *accelerator)
+{
+ GtkWidget *button;
+
+ g_return_if_fail (icon_name != NULL);
+ g_return_if_fail (action_name != NULL);
+
+ button = _gtk_toggle_image_button_new_for_header_bar (icon_name);
+ _gth_browser_setup_header_bar_button (browser, section, icon_name, tooltip, action_name, accelerator,
button);
+
+ return button;
}
@@ -5936,17 +5975,17 @@ gth_browser_show_file_properties (GthBrowser *browser)
{
switch (gth_window_get_current_page (GTH_WINDOW (browser))) {
case GTH_BROWSER_PAGE_BROWSER:
- case GTH_WINDOW_PAGE_UNDEFINED: /* when called from gth_browser_init */
+ case GTH_WINDOW_PAGE_UNDEFINED: /* --> when called from gth_browser_init */
g_settings_set_boolean (browser->priv->browser_settings, PREF_BROWSER_PROPERTIES_VISIBLE,
TRUE);
- _gth_browser_set_action_active (browser, "Browser_Properties", TRUE);
+ gth_window_change_action_state (GTH_WINDOW (browser), "browser-properties", TRUE);
if (gth_window_get_current_page (GTH_WINDOW (browser)) != GTH_WINDOW_PAGE_UNDEFINED)
gtk_widget_show (browser->priv->file_properties);
break;
case GTH_BROWSER_PAGE_VIEWER:
- _gth_browser_set_action_active (browser, "Viewer_Tools", FALSE);
+ gth_window_change_action_state (GTH_WINDOW (browser), "viewer-edit-file", FALSE);
browser->priv->viewer_sidebar = GTH_SIDEBAR_STATE_PROPERTIES;
- _gth_browser_set_action_active (browser, "Viewer_Properties", TRUE);
+ gth_window_change_action_state (GTH_WINDOW (browser), "viewer-properties", TRUE);
gtk_widget_show (browser->priv->viewer_sidebar_alignment);
gtk_widget_show (browser->priv->file_properties);
gth_sidebar_show_properties (GTH_SIDEBAR (browser->priv->file_properties));
@@ -5960,9 +5999,9 @@ gth_browser_show_viewer_tools (GthBrowser *browser)
{
gth_window_set_current_page (GTH_WINDOW (browser), GTH_BROWSER_PAGE_VIEWER);
- _gth_browser_set_action_active (browser, "Viewer_Properties", FALSE);
+ gth_window_change_action_state (GTH_WINDOW (browser), "viewer-properties", FALSE);
browser->priv->viewer_sidebar = GTH_SIDEBAR_STATE_TOOLS;
- _gth_browser_set_action_active (browser, "Viewer_Tools", TRUE);
+ gth_window_change_action_state (GTH_WINDOW (browser), "viewer-edit-file", TRUE);
gtk_widget_show (browser->priv->viewer_sidebar_alignment);
gtk_widget_show (browser->priv->file_properties);
gth_sidebar_show_tools (GTH_SIDEBAR (browser->priv->file_properties));
@@ -5975,15 +6014,15 @@ gth_browser_hide_sidebar (GthBrowser *browser)
switch (gth_window_get_current_page (GTH_WINDOW (browser))) {
case GTH_BROWSER_PAGE_BROWSER:
g_settings_set_boolean (browser->priv->browser_settings, PREF_BROWSER_PROPERTIES_VISIBLE,
FALSE);
- _gth_browser_set_action_active (browser, "Browser_Properties", FALSE);
+ gth_window_change_action_state (GTH_WINDOW (browser), "browser-properties", FALSE);
gtk_widget_hide (browser->priv->file_properties);
break;
case GTH_BROWSER_PAGE_VIEWER:
if (browser->priv->viewer_sidebar == GTH_SIDEBAR_STATE_PROPERTIES)
- _gth_browser_set_action_active (browser, "Viewer_Properties", FALSE);
+ gth_window_change_action_state (GTH_WINDOW (browser), "viewer-properties", FALSE);
else if (browser->priv->viewer_sidebar == GTH_SIDEBAR_STATE_TOOLS)
- _gth_browser_set_action_active (browser, "Viewer_Tools", FALSE);
+ gth_window_change_action_state (GTH_WINDOW (browser), "viewer-edit-file", FALSE);
browser->priv->viewer_sidebar = GTH_SIDEBAR_STATE_HIDDEN;
gtk_widget_hide (browser->priv->viewer_sidebar_alignment);
break;
@@ -6495,10 +6534,10 @@ gth_browser_fullscreen (GthBrowser *browser)
browser->priv->fullscreen_controls = g_list_append (NULL, browser->priv->fullscreen_toolbar);
browser->priv->before_fullscreen.page = gth_window_get_current_page (GTH_WINDOW (browser));
- browser->priv->before_fullscreen.viewer_properties = _gth_browser_get_action_active (browser,
"Viewer_Properties");
- browser->priv->before_fullscreen.viewer_tools = _gth_browser_get_action_active (browser,
"Viewer_Tools");
+ browser->priv->before_fullscreen.viewer_properties = gth_window_get_action_state (GTH_WINDOW
(browser), "viewer-properties");
+ browser->priv->before_fullscreen.viewer_tools = gth_window_get_action_state (GTH_WINDOW (browser),
"viewer-edit-file");
browser->priv->before_fullscreen.thumbnail_list = _gth_browser_get_action_active (browser,
"View_Thumbnail_List");
- browser->priv->before_fullscreen.browser_properties = _gth_browser_get_action_active (browser,
"Browser_Properties");
+ browser->priv->before_fullscreen.browser_properties = gth_window_get_action_state (GTH_WINDOW
(browser), "browser-properties");
gth_browser_hide_sidebar (browser);
_gth_browser_set_thumbnail_list_visibility (browser, FALSE);
diff --git a/gthumb/gth-browser.h b/gthumb/gth-browser.h
index 6918390..71415c3 100644
--- a/gthumb/gth-browser.h
+++ b/gthumb/gth-browser.h
@@ -58,12 +58,11 @@ typedef enum { /*< skip >*/
GTH_BROWSER_HEADER_SECTION_BROWSER_VIEW,
GTH_BROWSER_HEADER_SECTION_BROWSER_EDIT,
GTH_BROWSER_HEADER_SECTION_BROWSER_TOOLS,
- GTH_BROWSER_HEADER_SECTION_BROWSER_PROPERTIES,
GTH_BROWSER_HEADER_SECTION_VIEWER_NAVIGATION,
+ GTH_BROWSER_HEADER_SECTION_VIEWER_COMMANDS,
GTH_BROWSER_HEADER_SECTION_VIEWER_VIEW,
GTH_BROWSER_HEADER_SECTION_VIEWER_EDIT,
GTH_BROWSER_HEADER_SECTION_VIEWER_TOOLS,
- GTH_BROWSER_HEADER_SECTION_VIEWER_PROPERTIES,
GTH_BROWSER_N_HEADER_SECTIONS
} GthBrowserHeaderSection;
@@ -133,12 +132,18 @@ GtkWidget * gth_browser_get_statusbar (GthBrowser *browser);
GtkWidget * gth_browser_get_filterbar (GthBrowser *browser);
GtkWidget * gth_browser_get_headerbar_section (GthBrowser *browser,
GthBrowserHeaderSection section);
-void gth_browser_add_header_bar_button (GthBrowser *browser,
+GtkWidget * gth_browser_add_header_bar_button (GthBrowser *browser,
GthBrowserHeaderSection section,
const char *icon_name,
const char *tooltip,
const char *action_name,
const char *accelerator);
+GtkWidget * gth_browser_add_header_bar_toggle_button (GthBrowser *browser,
+ GthBrowserHeaderSection section,
+ const char *icon_name,
+ const char *tooltip,
+ const char *action_name,
+ const char *accelerator);
GthMenuManager * gth_browser_get_menu_manager (GthBrowser *browser,
GthBrowserMenuManager
manager);
diff --git a/gthumb/gth-window.c b/gthumb/gth-window.c
index b3164a4..e2502a7 100644
--- a/gthumb/gth-window.c
+++ b/gthumb/gth-window.c
@@ -612,3 +612,56 @@ gth_window_add_accelerators (GthWindow *window,
NULL);
}
}
+
+
+void
+gth_window_enable_action (GthWindow *window,
+ const char *action_name,
+ gboolean enabled)
+{
+ GAction *action;
+
+ action = g_action_map_lookup_action (G_ACTION_MAP (window), action_name);
+ g_object_set (action, "enabled", enabled, NULL);
+}
+
+
+gboolean
+gth_window_get_action_state (GthWindow *window,
+ const char *action_name)
+{
+ GAction *action;
+ GVariant *state;
+ gboolean value;
+
+ action = g_action_map_lookup_action (G_ACTION_MAP (window), action_name);
+ g_return_val_if_fail (action != NULL, FALSE);
+ state = g_action_get_state (action);
+ value = g_variant_get_boolean (state);
+
+ g_variant_unref (state);
+
+ return value;
+}
+
+
+void
+gth_window_change_action_state (GthWindow *window,
+ const char *action_name,
+ gboolean value)
+{
+ GAction *action;
+ GVariant *old_state;
+ GVariant *new_state;
+
+ action = g_action_map_lookup_action (G_ACTION_MAP (window), action_name);
+ g_return_if_fail (action != NULL);
+
+ old_state = g_action_get_state (action);
+ new_state = g_variant_new_boolean (value);
+ if ((old_state == NULL) || ! g_variant_equal (old_state, new_state))
+ g_action_change_state (action, new_state);
+
+ if (old_state != NULL)
+ g_variant_unref (old_state);
+}
diff --git a/gthumb/gth-window.h b/gthumb/gth-window.h
index 426c7c9..182bddc 100644
--- a/gthumb/gth-window.h
+++ b/gthumb/gth-window.h
@@ -108,6 +108,14 @@ GtkAccelGroup *gth_window_get_accel_group (GthWindow *window);
void gth_window_add_accelerators (GthWindow *window,
const GthAccelerator *accelerators,
int n_accelerators);
+void gth_window_enable_action (GthWindow *window,
+ const char *action_name,
+ gboolean enabled);
+gboolean gth_window_get_action_state (GthWindow *window,
+ const char *action_name);
+void gth_window_change_action_state (GthWindow *window,
+ const char *action_name,
+ gboolean value);
G_END_DECLS
diff --git a/gthumb/gtk-utils.c b/gthumb/gtk-utils.c
index da33fa4..46ad975 100644
--- a/gthumb/gtk-utils.c
+++ b/gthumb/gtk-utils.c
@@ -1112,6 +1112,22 @@ _gtk_image_button_new_for_header_bar (const char *icon_name)
}
+GtkWidget *
+_gtk_toggle_image_button_new_for_header_bar (const char *icon_name)
+{
+ GtkWidget *button;
+ GtkWidget *image;
+
+ button = gtk_toggle_button_new ();
+ image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
+ gtk_widget_show (image);
+ gtk_container_add (GTK_CONTAINER (button), image);
+ _gtk_menu_button_set_style_for_header_bar (button);
+
+ return button;
+}
+
+
/* -- _gtk_window_add_accelerator_for_action -- */
diff --git a/gthumb/gtk-utils.h b/gthumb/gtk-utils.h
index dfacbfb..4305f95 100644
--- a/gthumb/gtk-utils.h
+++ b/gthumb/gtk-utils.h
@@ -143,6 +143,7 @@ gboolean _gtk_file_chooser_set_file_parent (GtkFileChooser *ch
GError **error);
GtkWidget * _gtk_menu_button_new_for_header_bar (void);
GtkWidget * _gtk_image_button_new_for_header_bar (const char *icon_name);
+GtkWidget * _gtk_toggle_image_button_new_for_header_bar(const char *icon_name);
void _gtk_window_add_accelerator_for_action (GtkWindow *window,
GtkAccelGroup *accel_group,
const char *action_name,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]