[Goodies-commits] r3328 - in xfce4-notes-plugin/trunk: icons/16x16 icons/22x22 icons/24x24 icons/32x32 icons/scalable panel-plugin
Mike Massonnet
mmassonnet at xfce.org
Wed Oct 10 23:57:14 CEST 2007
Author: mmassonnet
Date: 2007-10-10 21:57:14 +0000 (Wed, 10 Oct 2007)
New Revision: 3328
Added:
xfce4-notes-plugin/trunk/icons/16x16/xfce4-notes-plugin-rev.png
xfce4-notes-plugin/trunk/icons/22x22/xfce4-notes-plugin-rev.png
xfce4-notes-plugin/trunk/icons/24x24/xfce4-notes-plugin-rev.png
xfce4-notes-plugin/trunk/icons/32x32/xfce4-notes-plugin-rev.png
xfce4-notes-plugin/trunk/icons/scalable/xfce4-notes-plugin-rev.svg
Modified:
xfce4-notes-plugin/trunk/icons/16x16/Makefile.am
xfce4-notes-plugin/trunk/icons/22x22/Makefile.am
xfce4-notes-plugin/trunk/icons/24x24/Makefile.am
xfce4-notes-plugin/trunk/icons/32x32/Makefile.am
xfce4-notes-plugin/trunk/icons/scalable/Makefile.am
xfce4-notes-plugin/trunk/panel-plugin/notes.c
xfce4-notes-plugin/trunk/panel-plugin/notes.h
xfce4-notes-plugin/trunk/panel-plugin/panel-plugin.c
Log:
* icons/: Add hidden icons
* panel-plugin/{panel-plugin.c,notes.c,notes.h}:
Work around then plugin and window menus.
NotesWindow: Fixed ShowOnStartup, Above, Sticky status.
NotesPlugin: Switch hide/show state of the windows with either
a greyed or plain colors icon.
Modified: xfce4-notes-plugin/trunk/icons/16x16/Makefile.am
===================================================================
--- xfce4-notes-plugin/trunk/icons/16x16/Makefile.am 2007-10-10 21:56:39 UTC (rev 3327)
+++ xfce4-notes-plugin/trunk/icons/16x16/Makefile.am 2007-10-10 21:57:14 UTC (rev 3328)
@@ -1,6 +1,7 @@
iconsdir = $(datadir)/icons/hicolor/16x16/apps
icons_DATA = \
- xfce4-notes-plugin.png
+ xfce4-notes-plugin.png \
+ xfce4-notes-plugin-rev.png
EXTRA_DIST = \
$(icons_DATA)
Added: xfce4-notes-plugin/trunk/icons/16x16/xfce4-notes-plugin-rev.png
===================================================================
--- xfce4-notes-plugin/trunk/icons/16x16/xfce4-notes-plugin-rev.png (rev 0)
+++ xfce4-notes-plugin/trunk/icons/16x16/xfce4-notes-plugin-rev.png 2007-10-10 21:57:14 UTC (rev 3328)
@@ -0,0 +1,9 @@
+PNG
+
+
+IHDR µú7ê bKGD ÿÌ¿ pHYs
+×
+×B(x tIME× &0äR
+ IDAT(Á1oQ àç}Ï{¾ºQFt2YXÔ`ÿÅÏñ3Á`êR¥MnI%í5hòõúç·o¶/ `´÷µ=|Ù Þ=-ÉB ]سòEj!þY»Æ]
+E¿}óÌä£n i&]×
SÃkÝm·»Bº.¬¸ï§Ù_}r¢íÏV^]l|1výQ,~9u`ߥs?Ì+}<¯sqlñÄw'iLvG !$ªçr6&÷ôÑ4¥EjÒ
+Å£±©4¥d4©I©¡nMl" =T,K» ¸!ª= `ú à?ª«FYl¹Ü IEND®B`
\ No newline at end of file
Modified: xfce4-notes-plugin/trunk/icons/22x22/Makefile.am
===================================================================
--- xfce4-notes-plugin/trunk/icons/22x22/Makefile.am 2007-10-10 21:56:39 UTC (rev 3327)
+++ xfce4-notes-plugin/trunk/icons/22x22/Makefile.am 2007-10-10 21:57:14 UTC (rev 3328)
@@ -1,6 +1,7 @@
iconsdir = $(datadir)/icons/hicolor/22x22/apps
icons_DATA = \
- xfce4-notes-plugin.png
+ xfce4-notes-plugin.png \
+ xfce4-notes-plugin-rev.png
EXTRA_DIST = \
$(icons_DATA)
Added: xfce4-notes-plugin/trunk/icons/22x22/xfce4-notes-plugin-rev.png
===================================================================
--- xfce4-notes-plugin/trunk/icons/22x22/xfce4-notes-plugin-rev.png (rev 0)
+++ xfce4-notes-plugin/trunk/icons/22x22/xfce4-notes-plugin-rev.png 2007-10-10 21:57:14 UTC (rev 3328)
@@ -0,0 +1,7 @@
+PNG
+
+
+IHDR n½¤° bKGD ÿÌ¿ pHYs
+×
+×B(x tIME× &&º\ IDAT(ϵұjTAÆñß»ÜM¡
ص> ¦PK_Ë46¾/`!6Æ%(¨èêîæÅÞ5QHR9ÃÌ0çüçãpæãÄÃ{»¥s¶ß_Éìß¾Q«ÏîXÉ4ïþIO×tLö'<E¢½üòÊÀù6Ú¡:Ì}°í¥¿á|JïÖ\pÍWÏUñQÊ
+»®;í³¬[4mVÌ+¬²ç
E·dv½wEöÖ¦)%L¬¹©ç£|³)«ý Z¸HødÕeì CÛ~#J2°UZ¸1òZײðÙCN µn:5³26¬¹¤öÒ\²¾n}J¶Úüh©7ºÖôJVëÐ:::BJ!ÂÃJÑ+IÈ-"µ§h[K<¸Ú4ç,Z___VOsz*Y ÑôlËn:Þ¢§ eÒdRÕ'Ø~Ì>ÑÓõåÍ?~25D6¯r\!ÅØÐäÀÄK»ßJl½^l IEND®B`
\ No newline at end of file
Modified: xfce4-notes-plugin/trunk/icons/24x24/Makefile.am
===================================================================
--- xfce4-notes-plugin/trunk/icons/24x24/Makefile.am 2007-10-10 21:56:39 UTC (rev 3327)
+++ xfce4-notes-plugin/trunk/icons/24x24/Makefile.am 2007-10-10 21:57:14 UTC (rev 3328)
@@ -1,6 +1,7 @@
iconsdir = $(datadir)/icons/hicolor/24x24/apps
icons_DATA = \
- xfce4-notes-plugin.png
+ xfce4-notes-plugin.png \
+ xfce4-notes-plugin-rev.png
EXTRA_DIST = \
$(icons_DATA)
Added: xfce4-notes-plugin/trunk/icons/24x24/xfce4-notes-plugin-rev.png
===================================================================
--- xfce4-notes-plugin/trunk/icons/24x24/xfce4-notes-plugin-rev.png (rev 0)
+++ xfce4-notes-plugin/trunk/icons/24x24/xfce4-notes-plugin-rev.png 2007-10-10 21:57:14 UTC (rev 3328)
@@ -0,0 +1,11 @@
+PNG
+
+
+IHDR J~õs bKGD ÿÌ¿ pHYs
+×
+×B(x tIME× &¨;S IDAT8ËÍÔ±nS1àÏoÒÞHÐD"
+1Ã !: #H¼]Ø`áxÄB©
+*j©´ IzÍä
+P"1a˶lÿÿ9GÇÿ1ÿ]ððÞènn- ¤Ç÷7HprûF±À¦Ý1!Tï~ǸôäDMи Ö{^é9_6QÑM¨8#JÂÔ Á7[.¸æç
+ÙpÊ#×öÙY+¶$1Î<
+IáØ«nIvyïäÝL]l¸©cß@|µ+)}¯×,à£M]4p,ê;ðÃ1={¹A¨¼Ö¶.údÏ¡¾J+G¥v2TÍvl¹¤ôÒ¡®v<\§±'Uñ¶-Ú9jZZZ¢¢`iFèo°³N¢T£êU¬Ó^§õÁÕª:g%ºººJ¥ÒrXÒQH"*Uãá{Â|yKn¬À0åÂr2ÍÒàéöúâ>I?YVT6Ô7ôfÅõ7øxÎÿð üòn»qÁ IEND®B`
\ No newline at end of file
Modified: xfce4-notes-plugin/trunk/icons/32x32/Makefile.am
===================================================================
--- xfce4-notes-plugin/trunk/icons/32x32/Makefile.am 2007-10-10 21:56:39 UTC (rev 3327)
+++ xfce4-notes-plugin/trunk/icons/32x32/Makefile.am 2007-10-10 21:57:14 UTC (rev 3328)
@@ -1,6 +1,7 @@
iconsdir = $(datadir)/icons/hicolor/32x32/apps
icons_DATA = \
- xfce4-notes-plugin.png
+ xfce4-notes-plugin.png \
+ xfce4-notes-plugin-rev.png
EXTRA_DIST = \
$(icons_DATA)
Added: xfce4-notes-plugin/trunk/icons/32x32/xfce4-notes-plugin-rev.png
===================================================================
--- xfce4-notes-plugin/trunk/icons/32x32/xfce4-notes-plugin-rev.png (rev 0)
+++ xfce4-notes-plugin/trunk/icons/32x32/xfce4-notes-plugin-rev.png 2007-10-10 21:57:14 UTC (rev 3328)
@@ -0,0 +1,9 @@
+PNG
+
+
+IHDR Ùs² bKGD ÿÌ¿ pHYs
+×
+×B(x tIME× &[n 0IDATHÇíMkÔPdÌL:´ÔÖ2µÕAA»AQDw®\À?âOqçNp#ýÀ"¸¬]µCmgòu¿\$¦iñ£îÄ7{r8Ï{{ÿuj½Ù®ß{§×ç'æ¾~<ÁÆóÔ»Ño|b~§Å²Â],ÓAð¤Ìé·³Ã'¸ÛµÄ¯ÐßÐôPÄ4¹|°rÀûÊÀÞ#öÁcú´ÄXÀñ
9BòÕDäGàHÆUVÓeH¢_ÛD59(,)1®×`P(¦Hh`ÑÁÖÕ
+@Ìiñk°A¡Ð( !c{èéÊ@ß±°ÄÄg·-ª×.}ZQeà¬Yñ ¬*×h4D¡dì##ð×·Þ3½!¬
E£ÈPH$9)Å¥Eë|ÎÓ¶½g<\rfQ 1(rRr$yi.>KËMzl{úÑ54ßITý4
+ðè[FDþn<çÕÇ{8Ž\Ú¸%äÈÏõPP¸Ëà
ÏG+Ý ,-:Ñï%icÁ[¯gÒB 'þµéx´
+;I "ÅL``IAx8àO4Þ2pJÙ3 yq!+p h;æ¿o!%!G¾qb¼°0QÄ¿
áº0åÓé IEND®B`
\ No newline at end of file
Modified: xfce4-notes-plugin/trunk/icons/scalable/Makefile.am
===================================================================
--- xfce4-notes-plugin/trunk/icons/scalable/Makefile.am 2007-10-10 21:56:39 UTC (rev 3327)
+++ xfce4-notes-plugin/trunk/icons/scalable/Makefile.am 2007-10-10 21:57:14 UTC (rev 3328)
@@ -1,6 +1,7 @@
iconsdir = $(datadir)/icons/hicolor/scalable/apps
icons_DATA = \
- xfce4-notes-plugin.svg
+ xfce4-notes-plugin.svg \
+ xfce4-notes-plugin-rev.svg
EXTRA_DIST = \
$(icons_DATA)
Added: xfce4-notes-plugin/trunk/icons/scalable/xfce4-notes-plugin-rev.svg
===================================================================
--- xfce4-notes-plugin/trunk/icons/scalable/xfce4-notes-plugin-rev.svg (rev 0)
+++ xfce4-notes-plugin/trunk/icons/scalable/xfce4-notes-plugin-rev.svg 2007-10-10 21:57:14 UTC (rev 3328)
@@ -0,0 +1,778 @@
+<?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://web.resource.org/cc/"
+ 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:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="48px"
+ height="48px"
+ id="svg1307"
+ sodipodi:version="0.32"
+ inkscape:version="0.45.1"
+ sodipodi:docbase="/home/mike/devel/notes-plugin/icons/scalable"
+ sodipodi:docname="xfce4-notes-plugin-rev.svg"
+ inkscape:export-filename="/home/ulisse/icone/sticky-notes/scalable/sticky-notes.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1.4142136"
+ inkscape:cx="28.686603"
+ inkscape:cy="22.975642"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:grid-bbox="true"
+ inkscape:document-units="px"
+ inkscape:grid-points="true"
+ gridspacingx="0.5px"
+ gridspacingy="0.5px"
+ gridempspacing="2"
+ inkscape:window-width="1034"
+ inkscape:window-height="730"
+ inkscape:window-x="94"
+ inkscape:window-y="48"
+ fill="#2e3436"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ inkscape:showpageshadow="false"
+ showborder="true" />
+ <defs
+ id="defs1309">
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2832">
+ <stop
+ offset="0"
+ id="stop2834"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ offset="1"
+ id="stop2836"
+ style="stop-color:#000000;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2822">
+ <stop
+ offset="0"
+ id="stop2824"
+ style="stop-color:#000000;stop-opacity:0;" />
+ <stop
+ offset="0.5"
+ id="stop2830"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ offset="1"
+ id="stop2826"
+ style="stop-color:#000000;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2934">
+ <stop
+ offset="0"
+ id="stop2936"
+ style="stop-color:#dddddd;stop-opacity:1;" />
+ <stop
+ offset="1"
+ id="stop2938"
+ style="stop-color:#c3c3c3;stop-opacity:1" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2926">
+ <stop
+ offset="0"
+ id="stop2928"
+ style="stop-color:#c3c3c3;stop-opacity:1" />
+ <stop
+ offset="1"
+ id="stop2930"
+ style="stop-color:#999999;stop-opacity:1" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2910">
+ <stop
+ offset="0"
+ id="stop2912"
+ style="stop-color:#dddddd;stop-opacity:1" />
+ <stop
+ offset="1"
+ id="stop2914"
+ style="stop-color:#dddddd;stop-opacity:1" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2898">
+ <stop
+ offset="0"
+ id="stop2900"
+ style="stop-color:#ffffff;stop-opacity:1;" />
+ <stop
+ offset="1"
+ id="stop2902"
+ style="stop-color:#ffffff;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2882">
+ <stop
+ offset="0"
+ id="stop2908"
+ style="stop-color:#dddddd;stop-opacity:1;" />
+ <stop
+ offset="1"
+ id="stop2886"
+ style="stop-color:#c3c3c3;stop-opacity:1" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2837">
+ <stop
+ offset="0"
+ id="stop2839"
+ style="stop-color:#ffffff;stop-opacity:1;" />
+ <stop
+ offset="1"
+ id="stop2841"
+ style="stop-color:#ffffff;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2825">
+ <stop
+ offset="0"
+ id="stop2827"
+ style="stop-color:#ffffff;stop-opacity:1;" />
+ <stop
+ offset="1"
+ id="stop2829"
+ style="stop-color:#ffffff;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2807">
+ <stop
+ offset="0"
+ id="stop2809"
+ style="stop-color:#999999;stop-opacity:1" />
+ <stop
+ offset="1"
+ id="stop2811"
+ style="stop-color:#c3c3c3;stop-opacity:1" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2214">
+ <stop
+ offset="0"
+ id="stop2216"
+ style="stop-color:#c3c3c3;stop-opacity:1" />
+ <stop
+ offset="1"
+ id="stop2218"
+ style="stop-color:#999999;stop-opacity:1" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2281">
+ <stop
+ offset="0"
+ id="stop2283"
+ style="stop-color:#000000;stop-opacity:1" />
+ <stop
+ offset="1"
+ id="stop2285"
+ style="stop-color:#000000;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2263">
+ <stop
+ offset="0"
+ id="stop2265"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ offset="1"
+ id="stop2267"
+ style="stop-color:#000000;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2207">
+ <stop
+ offset="0"
+ id="stop2209"
+ style="stop-color:#f4f4f4;stop-opacity:1" />
+ <stop
+ offset="1"
+ id="stop2211"
+ style="stop-color:#c3c3c3;stop-opacity:1" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2213"
+ x1="21"
+ y1="23.785212"
+ gradientTransform="translate(0,-3.000034)"
+ x2="22.125"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient2207"
+ y2="27.959209" />
+ <radialGradient
+ inkscape:collect="always"
+ id="radialGradient2269"
+ r="19.25"
+ gradientTransform="matrix(1,0,0,0.194805,0,35.22727)"
+ cx="25.25"
+ cy="43.75"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient2263"
+ fy="43.75"
+ fx="25.25" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2287"
+ x1="6.3131518"
+ y1="27.126162"
+ x2="6.8376656"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient2281"
+ y2="31" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2295"
+ x1="28.870058"
+ y1="22.477673"
+ x2="29.495005"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient2214"
+ y2="25.004829" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2226"
+ x1="27.534513"
+ y1="36.90781"
+ x2="27.534513"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient2807"
+ y2="28.79846" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2831"
+ x1="39.875"
+ y1="19.0625"
+ x2="40.167702"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient2825"
+ y2="21.125" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2843"
+ x1="6.0359154"
+ y1="25.024548"
+ x2="6.6739359"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient2837"
+ y2="27.933392" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2888"
+ x1="37.207386"
+ y1="16.975407"
+ x2="38.323223"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient2882"
+ y2="20.749966" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2904"
+ x1="16.357021"
+ y1="23.864025"
+ x2="16.632799"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient2898"
+ y2="45.10363" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2916"
+ x1="33.1875"
+ y1="25.5"
+ x2="33.25"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient2910"
+ y2="30.0625" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2924"
+ x1="39.279198"
+ y1="18.280069"
+ x2="40.481865"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient2926"
+ y2="22.897709" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2940"
+ x1="24"
+ y1="35.625"
+ x2="24"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient2934"
+ y2="30.762564" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2828"
+ x1="20"
+ y1="39.5"
+ x2="20"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient2822"
+ y2="33.982628" />
+ <radialGradient
+ inkscape:collect="always"
+ id="radialGradient2838"
+ r="3"
+ gradientTransform="matrix(2,0,0,0.916667,-40,3.0625)"
+ cx="40"
+ cy="36.75"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient2832"
+ fy="36.75"
+ fx="40" />
+ <radialGradient
+ inkscape:collect="always"
+ id="radialGradient2850"
+ r="3"
+ gradientTransform="matrix(-2,0,0,-0.916667,88,70.4375)"
+ cx="40"
+ cy="36.75"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient2832"
+ fy="36.75"
+ fx="40" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2828-292"
+ y2="33.982628"
+ y1="39.5"
+ x2="20"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient2822-704"
+ x1="20" />
+ <linearGradient
+ id="linearGradient2822-704">
+ <stop
+ offset="0"
+ id="stop2289"
+ style="stop-color:#000000;stop-opacity:0;" />
+ <stop
+ offset="0.5"
+ id="stop2291"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ offset="1"
+ id="stop2293"
+ style="stop-color:#000000;stop-opacity:0;" />
+ </linearGradient>
+ <radialGradient
+ inkscape:collect="always"
+ id="radialGradient2838-850"
+ r="3"
+ gradientTransform="matrix(2,0,0,0.916667,-40,3.0625)"
+ cx="40"
+ cy="36.75"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient2832-69"
+ fy="36.75"
+ fx="40" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2832-69">
+ <stop
+ offset="0"
+ id="stop2297"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ offset="1"
+ id="stop2299"
+ style="stop-color:#000000;stop-opacity:0;" />
+ </linearGradient>
+ <radialGradient
+ inkscape:collect="always"
+ id="radialGradient2850-540"
+ r="3"
+ gradientTransform="matrix(-2,0,0,-0.916667,88,70.4375)"
+ cx="40"
+ cy="36.75"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient2832-679"
+ fy="36.75"
+ fx="40" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2832-679">
+ <stop
+ offset="0"
+ id="stop2303"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ offset="1"
+ id="stop2305"
+ style="stop-color:#000000;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2916-726"
+ y2="30.0625"
+ y1="25.5"
+ x2="33.25"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient2910-388"
+ x1="33.1875" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2910-388">
+ <stop
+ offset="0"
+ id="stop2309"
+ style="stop-color:#dddddd;stop-opacity:1" />
+ <stop
+ offset="1"
+ id="stop2311"
+ style="stop-color:#dddddd;stop-opacity:1" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2226-66"
+ y2="28.79846"
+ y1="36.90781"
+ x2="27.534513"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient2807-325"
+ x1="27.534513" />
+ <linearGradient
+ id="linearGradient2807-325">
+ <stop
+ offset="0"
+ id="stop2315"
+ style="stop-color:#999999;stop-opacity:1" />
+ <stop
+ offset="1"
+ id="stop2317"
+ style="stop-color:#c3c3c3;stop-opacity:1" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2287-361"
+ y2="31"
+ y1="27.126162"
+ x2="6.8376656"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient2281-455"
+ x1="6.3131518" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2281-455">
+ <stop
+ offset="0"
+ id="stop2321"
+ style="stop-color:#000000;stop-opacity:1" />
+ <stop
+ offset="1"
+ id="stop2323"
+ style="stop-color:#000000;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2940-869"
+ y2="30.762564"
+ y1="35.625"
+ x2="24"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient2934-637"
+ x1="24" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2934-637">
+ <stop
+ offset="0"
+ id="stop2327"
+ style="stop-color:#dddddd;stop-opacity:1;" />
+ <stop
+ offset="1"
+ id="stop2329"
+ style="stop-color:#c3c3c3;stop-opacity:1" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2904-511"
+ y2="45.10363"
+ y1="23.864025"
+ x2="16.632799"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient2898-570"
+ x1="16.357021" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2898-570">
+ <stop
+ offset="0"
+ id="stop2333"
+ style="stop-color:#ffffff;stop-opacity:1;" />
+ <stop
+ offset="1"
+ id="stop2335"
+ style="stop-color:#ffffff;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2888-491"
+ y2="20.749966"
+ y1="16.975407"
+ x2="38.323223"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient2882-186"
+ x1="37.207386" />
+ <linearGradient
+ id="linearGradient2882-186">
+ <stop
+ offset="0"
+ id="stop2339"
+ style="stop-color:#dddddd;stop-opacity:1;" />
+ <stop
+ offset="1"
+ id="stop2341"
+ style="stop-color:#c3c3c3;stop-opacity:1" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2924-443"
+ y2="22.897709"
+ y1="18.280069"
+ x2="40.481865"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient2926-712"
+ x1="39.279198" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2926-712">
+ <stop
+ offset="0"
+ id="stop2345"
+ style="stop-color:#c3c3c3;stop-opacity:1" />
+ <stop
+ offset="1"
+ id="stop2347"
+ style="stop-color:#999999;stop-opacity:1" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2831-403"
+ y2="21.125"
+ y1="19.0625"
+ x2="40.167702"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient2825-593"
+ x1="39.875" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2825-593">
+ <stop
+ offset="0"
+ id="stop2351"
+ style="stop-color:#ffffff;stop-opacity:1;" />
+ <stop
+ offset="1"
+ id="stop2353"
+ style="stop-color:#ffffff;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2213-598"
+ y2="27.959209"
+ y1="23.785212"
+ gradientTransform="translate(0,-3.000034)"
+ x2="22.125"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient2207-448"
+ x1="21" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2207-448">
+ <stop
+ offset="0"
+ id="stop2357"
+ style="stop-color:#f4f4f4;stop-opacity:1" />
+ <stop
+ offset="1"
+ id="stop2359"
+ style="stop-color:#c3c3c3;stop-opacity:1" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2295-530"
+ y2="25.004829"
+ y1="22.477673"
+ x2="29.495005"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient2214-936"
+ x1="28.870058" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2214-936">
+ <stop
+ offset="0"
+ id="stop2363"
+ style="stop-color:#c3c3c3;stop-opacity:1" />
+ <stop
+ offset="1"
+ id="stop2365"
+ style="stop-color:#999999;stop-opacity:1" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2843-644"
+ y2="27.933392"
+ y1="25.024548"
+ x2="6.6739359"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient2837-121"
+ x1="6.0359154" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2837-121">
+ <stop
+ offset="0"
+ id="stop2369"
+ style="stop-color:#ffffff;stop-opacity:1;" />
+ <stop
+ offset="1"
+ id="stop2371"
+ style="stop-color:#ffffff;stop-opacity:0;" />
+ </linearGradient>
+ </defs>
+ <metadata
+ id="metadata1312">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Ulisse Perusin</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:title>Notes</dc:title>
+ <dc:contributor>
+ <cc:Agent>
+ <dc:title>Lapo Calamandrei</dc:title>
+ </cc:Agent>
+ </dc:contributor>
+ <cc:license
+ rdf:resource="http://creativecommons.org/licenses/GPL/2.0/" />
+ </cc:Work>
+ <cc:License
+ rdf:about="http://creativecommons.org/licenses/GPL/2.0/">
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/Reproduction" />
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/Distribution" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/Notice" />
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/ShareAlike" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/SourceCode" />
+ </cc:License>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:groupmode="layer"
+ id="layer1"
+ inkscape:label="Layer 1">
+ <g
+ id="g4492"
+ style="opacity:0.75">
+ <g
+ style="opacity:0.2745098"
+ id="g2852"
+ transform="matrix(0.980114,0,0,1.363636,0.414756,-13.86362)">
+ <rect
+ style="opacity:1;color:black;fill:url(#linearGradient2828-292);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ height="5.5"
+ width="32"
+ y="34"
+ x="8"
+ id="rect2815" />
+ <path
+ style="opacity:1;color:black;fill:url(#radialGradient2838-850);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ id="path2820"
+ d="M 40,39.5 C 43.312,39.5 46,38.268 46,36.75 C 46,35.232 43.312,34 40,34 L 40,39.5 z " />
+ <path
+ style="opacity:1;color:black;fill:url(#radialGradient2850-540);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ id="path2848"
+ d="M 8,34 C 4.688,34 2,35.232 2,36.75 C 2,38.268 4.688,39.5 8,39.5 L 8,34 z " />
+ </g>
+ <path
+ sodipodi:nodetypes="ccccccc"
+ style="color:#000000;fill:url(#linearGradient2916-726);fill-opacity:1.0;fill-rule:evenodd;stroke:url(#linearGradient2226-66);stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 8,13.5 L 4.5,32 L 4.5,37.5 L 43.5,37.5 L 43.5,32 L 40.5,13.5 L 8,13.5 z "
+ id="path2191" />
+ <path
+ sodipodi:nodetypes="ccccc"
+ style="opacity:0.18431373;fill:url(#linearGradient2287-361);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.25pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 5.5,31 L 42.585938,31 L 41.354473,21.996209 L 5.5,29 L 5.5,31 z "
+ id="path2271" />
+ <rect
+ style="opacity:1;color:black;fill:url(#linearGradient2940-869);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ height="5"
+ width="38"
+ y="32"
+ x="5"
+ id="rect2845" />
+ <path
+ sodipodi:nodetypes="ccccccc"
+ style="opacity:0.53333327;color:black;fill:none;fill-opacity:1.0;fill-rule:evenodd;stroke:url(#linearGradient2904-511);stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ d="M 8.8125,14.5 L 5.5,32 L 5.5,36.5 L 42.5,36.5 L 42.5,32 L 39.625,14.5 L 8.8125,14.5 z "
+ id="path2799" />
+ <path
+ sodipodi:nodetypes="ccccc"
+ style="color:black;fill:url(#linearGradient2888-491);fill-opacity:1.0;fill-rule:evenodd;stroke:url(#linearGradient2924-443);stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;opacity:0.75"
+ d="M 8,13.499966 L 40.5,13.499966 C 41.703125,22.531216 41,22.999966 39,22.999966 L 5.328125,27.999966 L 8,13.499966 z "
+ id="rect2179" />
+ <path
+ style="color:black;fill:none;fill-opacity:1.0;fill-rule:evenodd;stroke:url(#linearGradient2831-403);stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;opacity:0.67058824"
+ sodipodi:type="inkscape:offset"
+ d="M 8.8125,14.5 L 6.53125,26.8125 L 38.84375,22.03125 C 38.894914,22.016671 38.947165,22.006221 39,22 C 39.461157,22 39.697676,21.935738 39.75,21.90625 C 39.802324,21.876762 39.866621,21.899614 39.96875,21.4375 C 40.150115,20.616856 39.991557,18.072607 39.5625,14.5 L 8.8125,14.5 z "
+ inkscape:original="M 8 13.5 L 5.3125 28 L 39 23 C 41 23 41.703125 22.53125 40.5 13.5 L 8 13.5 z "
+ inkscape:radius="-0.99436891"
+ id="path2815" />
+ <path
+ sodipodi:nodetypes="ccccc"
+ style="color:#000000;fill:url(#linearGradient2213-598);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient2295-530);stroke-width:0.9999997;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 2.5,26.499966 L 35.5,10.499966 C 34.461788,15.241546 37.656856,23.602212 39.5,22.999966 L 4.9091373,29.404027 C 3.4091373,29.404027 2.5,27.999966 2.5,26.499966 z "
+ id="rect2195" />
+ <path
+ style="color:black;fill:none;fill-opacity:1.0;fill-rule:evenodd;stroke:url(#linearGradient2843-644);stroke-width:0.9999997;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ sodipodi:type="inkscape:offset"
+ d="M 34.46875,12.125 L 3.65625,27.0625 C 3.7313076,27.364699 3.7834516,27.705696 3.9375,27.90625 C 4.1762868,28.217123 4.4563285,28.355419 4.84375,28.375 L 37.0625,22.40625 C 36.46677,21.523699 35.92008,20.402292 35.46875,19.09375 C 34.723726,16.933702 34.368075,14.432538 34.46875,12.125 z "
+ inkscape:original="M 35.5 10.5 L 2.5 26.5 C 2.5 28 3.4062501 29.406249 4.90625 29.40625 L 39.5 23 C 37.656856 23.602246 34.461788 15.24158 35.5 10.5 z "
+ inkscape:radius="-1.0117563"
+ id="path2835" />
+ </g>
+ </g>
+</svg>
Modified: xfce4-notes-plugin/trunk/panel-plugin/notes.c
===================================================================
--- xfce4-notes-plugin/trunk/panel-plugin/notes.c 2007-10-10 21:56:39 UTC (rev 3327)
+++ xfce4-notes-plugin/trunk/panel-plugin/notes.c 2007-10-10 21:57:14 UTC (rev 3328)
@@ -36,6 +36,8 @@
static gboolean notes_window_menu_popup (NotesWindow *notes_window,
GdkEvent *event);
+static void notes_window_menu_destroy (NotesWindow *notes_window);
+
static void notes_window_set_sos_always (NotesWindow *notes_window);
static void notes_window_set_sos_never (NotesWindow *notes_window);
@@ -44,14 +46,12 @@
static void notes_window_set_statusbar (NotesWindow *notes_window);
-static void notes_window_set_always_on_top (NotesWindow *notes_window);
+static void notes_window_set_above (NotesWindow *notes_window);
-static void notes_window_set_stick (NotesWindow *notes_window);
+static void notes_window_set_sticky (NotesWindow *notes_window);
-static void notes_window_show (NotesWindow *notes_window);
-
-static gboolean notes_window_hide (NotesWindow *notes_window);
-
+static gboolean notes_window_state_event (NotesWindow *notes_window,
+ GdkEventWindowState *event);
static gboolean notes_window_start_move (NotesWindow *notes_window,
GdkEventButton *event);
static gboolean notes_window_shade (NotesWindow *notes_window,
@@ -80,14 +80,10 @@
notes_window_read_name (NotesPlugin *notes_plugin)
{
static GDir *dir = NULL;
- static gchar *notes_path = NULL;
static const gchar *window_name = NULL;
if (G_UNLIKELY (dir == NULL))
- {
- notes_path = notes_plugin->notes_path;
- dir = g_dir_open (notes_path, 0, NULL);
- }
+ dir = g_dir_open (notes_plugin->notes_path, 0, NULL);
window_name = g_dir_read_name (dir);
TRACE ("window_name: %s", window_name);
@@ -103,6 +99,7 @@
NotesWindow *
notes_window_new (NotesPlugin *notes_plugin)
{
+ /* Convenience function for signal callbacks */
return notes_window_new_with_label (notes_plugin, NULL);
}
@@ -119,6 +116,7 @@
notes_window = g_slice_new0 (NotesWindow);
notes_window->notes_plugin = notes_plugin;
+ notes_window->notes = NULL;
notes_window->name = g_strdup (window_name);
notes_plugin->windows = g_slist_prepend (notes_plugin->windows, notes_window);
@@ -154,7 +152,7 @@
0);
gtk_widget_show (notes_window->hbox);
- /* Add button XXX create panel button ?! */
+ /* Add button */
notes_window->btn_add = xfce_create_panel_button ();
gtk_widget_set_size_request (notes_window->btn_add, 22, 22);
img_add = gtk_image_new_from_stock (GTK_STOCK_ADD, GTK_ICON_SIZE_MENU);
@@ -263,15 +261,19 @@
GTK_ACCEL_MASK);
/* Signals FIXME */
- g_signal_connect_swapped (G_OBJECT (notes_window->eb_move),
+ g_signal_connect_swapped (notes_window->window,
+ "window-state-event",
+ G_CALLBACK (notes_window_state_event),
+ notes_window);
+ g_signal_connect_swapped (notes_window->eb_move,
"button-press-event",
G_CALLBACK (notes_window_start_move),
notes_window);
- g_signal_connect_swapped (G_OBJECT (notes_window->eb_move),
+ g_signal_connect_swapped (notes_window->eb_move,
"scroll-event",
G_CALLBACK (notes_window_shade),
notes_window);
- g_signal_connect_swapped (G_OBJECT (notes_window->btn_menu),
+ g_signal_connect_swapped (notes_window->btn_menu,
"event",
G_CALLBACK (notes_window_menu_popup),
notes_window);
@@ -294,7 +296,6 @@
/* Load data */
notes_window_load_data (notes_window);
- notes_window_menu_new (notes_window);
/* Show the stuff, or not */
if (G_UNLIKELY (notes_window->show_statusbar))
@@ -338,23 +339,23 @@
notes_window->w = xfce_rc_read_int_entry (rc, "Width", 375);
notes_window->h = xfce_rc_read_int_entry (rc, "Height", 430);
- notes_window->always_on_top = xfce_rc_read_bool_entry (rc, "AlwaysOnTop", FALSE);
+ notes_window->above = xfce_rc_read_bool_entry (rc, "Above", FALSE);
notes_window->show_on_startup = xfce_rc_read_int_entry (rc, "ShowOnStartup", LAST_STATE);
notes_window->show_statusbar = xfce_rc_read_bool_entry (rc, "ShowStatusbar", FALSE);
- notes_window->stick = xfce_rc_read_bool_entry (rc, "Stick", TRUE);
+ notes_window->sticky = xfce_rc_read_bool_entry (rc, "Sticky", TRUE);
notes_window->visible = xfce_rc_read_bool_entry (rc, "Visible", TRUE);
xfce_rc_close (rc);
- TRACE ("\nalways_on_top: %d"
+ TRACE ("\nabove: %d"
"\nshow_on_startup: %d"
"\nshow_statusbar: %d"
- "\nstick: %d"
+ "\nsticky: %d"
"\nvisible: %d",
- notes_window->always_on_top,
+ notes_window->above,
notes_window->show_on_startup,
notes_window->show_statusbar,
- notes_window->stick,
+ notes_window->sticky,
notes_window->visible);
note_name = notes_note_read_name (notes_window);
@@ -371,38 +372,50 @@
notes_window_save_data (NotesWindow *notes_window)
{
XfceRc *rc;
- const gchar *window_name;
rc = xfce_rc_simple_open (notes_window->notes_plugin->config_file, FALSE);
g_return_if_fail (G_LIKELY (rc != NULL));
+ xfce_rc_set_group (rc, notes_window->name);
- window_name = gtk_label_get_text (GTK_LABEL (notes_window->title));
-
- xfce_rc_set_group (rc, window_name);
-
if (GTK_WIDGET_VISIBLE (notes_window->window))
{
gtk_window_get_position (GTK_WINDOW (notes_window->window),
¬es_window->x,
¬es_window->y);
- gtk_window_get_size (GTK_WINDOW (notes_window->window),
- ¬es_window->w,
- ¬es_window->h);
+ if (GTK_WIDGET_VISIBLE (notes_window->notebook))
+ gtk_window_get_size (GTK_WINDOW (notes_window->window),
+ ¬es_window->w,
+ ¬es_window->h);
+ else
+ gtk_window_get_size (GTK_WINDOW (notes_window->window),
+ ¬es_window->w,
+ NULL);
}
+ TRACE ("\nabove: %d"
+ "\nshow_on_startup: %d"
+ "\nshow_statusbar: %d"
+ "\nsticky: %d"
+ "\nvisible: %d",
+ notes_window->above,
+ notes_window->show_on_startup,
+ notes_window->show_statusbar,
+ notes_window->sticky,
+ notes_window->visible);
+
xfce_rc_write_int_entry (rc, "PosX", notes_window->x);
xfce_rc_write_int_entry (rc, "PosY", notes_window->y);
xfce_rc_write_int_entry (rc, "Width", notes_window->w);
xfce_rc_write_int_entry (rc, "Height", notes_window->h);
- xfce_rc_write_bool_entry (rc, "AlwaysOnTop",
- notes_window->always_on_top);
+ xfce_rc_write_bool_entry (rc, "Above",
+ notes_window->above);
xfce_rc_write_int_entry (rc, "ShowOnStartup",
notes_window->show_on_startup);
xfce_rc_write_bool_entry (rc, "ShowStatusbar",
notes_window->show_statusbar);
- xfce_rc_write_bool_entry (rc, "Stick",
- notes_window->stick);
+ xfce_rc_write_bool_entry (rc, "Sticky",
+ notes_window->sticky);
xfce_rc_write_bool_entry (rc, "Visible",
GTK_WIDGET_VISIBLE (notes_window->window));
@@ -424,8 +437,8 @@
GtkWidget *mi_separator1 = gtk_separator_menu_item_new ();
GtkWidget *mi_show_on_startup = gtk_menu_item_new_with_label (_("Show on startup"));
GtkWidget *mi_show_statusbar = gtk_check_menu_item_new_with_label (_("Show statusbar"));
- GtkWidget *mi_always_on_top = gtk_check_menu_item_new_with_label (_("Always on top"));
- GtkWidget *mi_stick = gtk_check_menu_item_new_with_label (_("Sticky window"));
+ GtkWidget *mi_above = gtk_check_menu_item_new_with_label (_("Always on top"));
+ GtkWidget *mi_sticky = gtk_check_menu_item_new_with_label (_("Sticky window"));
gtk_menu_shell_append (GTK_MENU_SHELL (notes_window->menu), mi_new_window);
gtk_menu_shell_append (GTK_MENU_SHELL (notes_window->menu), mi_destroy_window);
@@ -433,8 +446,8 @@
gtk_menu_shell_append (GTK_MENU_SHELL (notes_window->menu), mi_separator1);
gtk_menu_shell_append (GTK_MENU_SHELL (notes_window->menu), mi_show_on_startup);
gtk_menu_shell_append (GTK_MENU_SHELL (notes_window->menu), mi_show_statusbar);
- gtk_menu_shell_append (GTK_MENU_SHELL (notes_window->menu), mi_always_on_top);
- gtk_menu_shell_append (GTK_MENU_SHELL (notes_window->menu), mi_stick);
+ gtk_menu_shell_append (GTK_MENU_SHELL (notes_window->menu), mi_above);
+ gtk_menu_shell_append (GTK_MENU_SHELL (notes_window->menu), mi_sticky);
gtk_menu_attach_to_widget (GTK_MENU (notes_window->menu), notes_window->btn_menu, NULL);
/* Sub-menu "Show on startup" */
@@ -461,12 +474,16 @@
(notes_window->show_on_startup == LAST_STATE));
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (mi_show_statusbar),
notes_window->show_statusbar);
- gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (mi_always_on_top),
- notes_window->always_on_top);
- gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (mi_stick),
- notes_window->stick);
+ gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (mi_above),
+ notes_window->above);
+ gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (mi_sticky),
+ notes_window->sticky);
/* Signals */
+ g_signal_connect_swapped (notes_window->menu,
+ "deactivate",
+ G_CALLBACK (notes_window_menu_destroy),
+ notes_window);
g_signal_connect_swapped (mi_new_window,
"activate",
G_CALLBACK (notes_window_new),
@@ -495,13 +512,13 @@
"activate",
G_CALLBACK (notes_window_set_statusbar),
notes_window);
- g_signal_connect_swapped (mi_always_on_top,
+ g_signal_connect_swapped (mi_above,
"activate",
- G_CALLBACK (notes_window_set_always_on_top),
+ G_CALLBACK (notes_window_set_above),
notes_window);
- g_signal_connect_swapped (mi_stick,
+ g_signal_connect_swapped (mi_sticky,
"activate",
- G_CALLBACK (notes_window_set_stick),
+ G_CALLBACK (notes_window_set_sticky),
notes_window);
/* Show the stuff */
@@ -513,35 +530,42 @@
GdkEvent *event)
{
if (event->type == GDK_BUTTON_PRESS)
- gtk_menu_popup (GTK_MENU (notes_window->menu),
- NULL,
- NULL,
- NULL,
- NULL,
- event->button.button,
- event->button.time);
+ {
+ notes_window_menu_new (notes_window);
+ gtk_menu_popup (GTK_MENU (notes_window->menu),
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ event->button.button,
+ event->button.time);
+ }
return FALSE;
}
static void
+notes_window_menu_destroy (NotesWindow *notes_window)
+{
+ DBG ("Dettach window menu");
+ gtk_menu_detach (GTK_MENU (notes_window->menu));
+}
+
+static void
notes_window_set_sos_always (NotesWindow *notes_window)
{
notes_window->show_on_startup = ALWAYS;
- notes_window_save_data (notes_window);
}
static void
notes_window_set_sos_never (NotesWindow *notes_window)
{
- notes_window->show_on_startup = ALWAYS;
- notes_window_save_data (notes_window);
+ notes_window->show_on_startup = NEVER;
}
static void
notes_window_set_sos_last_state (NotesWindow *notes_window)
{
notes_window->show_on_startup = LAST_STATE;
- notes_window_save_data (notes_window);
}
static void
@@ -555,26 +579,56 @@
}
static void
-notes_window_set_always_on_top (NotesWindow *notes_window)
+notes_window_set_above (NotesWindow *notes_window)
{
- notes_window->always_on_top = !notes_window->always_on_top;
+ notes_window->above = !notes_window->above;
gtk_window_set_keep_above (GTK_WINDOW (notes_window->window),
- notes_window->always_on_top);
+ notes_window->above);
}
static void
-notes_window_set_stick (NotesWindow *notes_window)
+notes_window_set_sticky (NotesWindow *notes_window)
{
- notes_window->stick = !notes_window->stick;
- if (notes_window->stick)
+ notes_window->sticky = !notes_window->sticky;
+ if (notes_window->sticky)
gtk_window_stick (GTK_WINDOW (notes_window->window));
else
gtk_window_unstick (GTK_WINDOW (notes_window->window));
}
-static void
+static gboolean
+notes_window_state_event (NotesWindow *notes_window,
+ GdkEventWindowState *event)
+{
+ if (G_UNLIKELY (event->type != GDK_WINDOW_STATE))
+ return FALSE;
+
+ if (event->changed_mask & GDK_WINDOW_STATE_ABOVE)
+ {
+ /* FIXME above state event isn't notified */
+ notes_window->above = (gboolean) event->new_window_state & GDK_WINDOW_STATE_ABOVE;
+ TRACE ("Window state above: %d", notes_window->above);
+ }
+
+ if (event->changed_mask & GDK_WINDOW_STATE_STICKY)
+ {
+ /**
+ * Hiding the top level window will unstick it too, and send a
+ * window-state-event signal, so here we take the value only if
+ * the window is visible
+ **/
+ if (GTK_WIDGET_VISIBLE (notes_window->window))
+ notes_window->sticky = (gboolean) event->new_window_state & GDK_WINDOW_STATE_STICKY;
+ TRACE ("Window state sticky: %d", notes_window->sticky);
+ }
+
+ return FALSE;
+}
+
+void
notes_window_show (NotesWindow *notes_window)
{
+ TRACE ("Show window: %p", notes_window);
if (notes_window->x != -1 && notes_window->y != -1)
gtk_window_move (GTK_WINDOW (notes_window->window),
notes_window->x,
@@ -583,8 +637,8 @@
notes_window->w,
notes_window->h);
gtk_window_set_keep_above (GTK_WINDOW (notes_window->window),
- notes_window->always_on_top);
- if (notes_window->stick)
+ notes_window->above);
+ if (notes_window->sticky)
gtk_window_stick (GTK_WINDOW (notes_window->window));
else
gtk_window_unstick (GTK_WINDOW (notes_window->window));
@@ -596,9 +650,10 @@
gtk_widget_show (notes_window->window);
}
-static gboolean
+gboolean
notes_window_hide (NotesWindow *notes_window)
{
+ TRACE ("Hide window: %p", notes_window);
gtk_window_get_position (GTK_WINDOW (notes_window->window),
¬es_window->x,
¬es_window->y);
@@ -613,7 +668,8 @@
gtk_widget_hide (notes_window->window);
gtk_widget_show (notes_window->notebook);
- return FALSE;
+
+ return TRUE; /* Stop other handlers from being invoked */
}
static gboolean
@@ -622,9 +678,9 @@
{
if (G_LIKELY (event->type == GDK_BUTTON_PRESS))
{
+ /* Send to foreground and move the window */
if (event->button == 1)
{
- /* Send to foreground and move the window */
gdk_window_show (notes_window->window->window);
gtk_window_begin_move_drag (GTK_WINDOW (notes_window->window),
event->button,
@@ -632,8 +688,8 @@
event->y_root,
event->time);
}
+ /* Send to background */
else if (event->button == 2)
- /* Send to background */
gdk_window_lower (notes_window->window->window);
}
@@ -648,7 +704,7 @@
{
if (event->direction == GDK_SCROLL_UP)
{
- /* Hide the text view */
+ /* Hide the notebook */
if (G_LIKELY (GTK_WIDGET_VISIBLE (notes_window->notebook)))
gtk_window_get_size (GTK_WINDOW (notes_window->window),
¬es_window->w,
@@ -662,7 +718,7 @@
}
else if (event->direction == GDK_SCROLL_DOWN)
{
- /* Show the text view */
+ /* Show the notebook */
gtk_window_get_size (GTK_WINDOW (notes_window->window),
¬es_window->w,
NULL);
Modified: xfce4-notes-plugin/trunk/panel-plugin/notes.h
===================================================================
--- xfce4-notes-plugin/trunk/panel-plugin/notes.h 2007-10-10 21:56:39 UTC (rev 3327)
+++ xfce4-notes-plugin/trunk/panel-plugin/notes.h 2007-10-10 21:57:14 UTC (rev 3328)
@@ -33,7 +33,10 @@
gchar *notes_path;
GtkWidget *btn_panel;
+ GtkWidget *icon_panel;
+ GtkWidget *menu;
GtkWidget *icon;
+ GtkWidget *icon_rev;
GtkTooltips *tooltips;
};
@@ -53,10 +56,10 @@
gchar *name;
gint x, y, w, h;
- gboolean always_on_top;
ShowOnStartup show_on_startup;
gboolean show_statusbar;
- gboolean stick;
+ gboolean above;
+ gboolean sticky;
gboolean visible;
GtkWidget *window;
@@ -68,8 +71,8 @@
GtkWidget *btn_menu;
GtkWidget *btn_close;
GtkWidget *menu;
+ GtkWidget *eb_move; /* event box */
GtkWidget *title;
- GtkWidget *eb_move; /* event box */
GtkWidget *notebook;
GtkWidget *statusbar;
};
@@ -91,6 +94,8 @@
{
};
+
+
const gchar * notes_window_read_name (NotesPlugin *notes_plugin);
NotesWindow * notes_window_new (NotesPlugin *notes_plugin);
@@ -106,6 +111,12 @@
NotesWindow *notes_window);*/
void notes_window_save_data (NotesWindow *notes_window);
+void notes_window_show (NotesWindow *notes_window);
+
+gboolean notes_window_hide (NotesWindow *notes_window);
+
+
+
const gchar * notes_note_read_name (NotesWindow *notes_window);
NotesNote * notes_note_new (NotesWindow *notes_window,
Modified: xfce4-notes-plugin/trunk/panel-plugin/panel-plugin.c
===================================================================
--- xfce4-notes-plugin/trunk/panel-plugin/panel-plugin.c 2007-10-10 21:56:39 UTC (rev 3327)
+++ xfce4-notes-plugin/trunk/panel-plugin/panel-plugin.c 2007-10-10 21:57:14 UTC (rev 3328)
@@ -51,8 +51,12 @@
static gboolean notes_plugin_set_size (NotesPlugin *notes_plugin,
int size);
-static gboolean notes_plugin_popup (NotesPlugin *notes_plugin);
+static void notes_plugin_menu_new (NotesPlugin *notes_plugin);
+static gboolean notes_plugin_menu_popup (NotesPlugin *notes_plugin,
+ GdkEvent *event);
+static void notes_plugin_menu_destroy (NotesPlugin *notes_plugin);
+
/* TODO sort the next functions */
/*static gboolean save_on_timeout_execute (NotesPlugin *notes_plugin);
@@ -80,14 +84,15 @@
{
NotesPlugin *notes_plugin = g_slice_new0 (NotesPlugin);
notes_plugin->panel_plugin = panel_plugin;
+ notes_plugin->windows = NULL;
/* notes_plugin->timeout_id = 0; FIXME */
notes_plugin->btn_panel = xfce_create_panel_button ();
- notes_plugin->icon = gtk_image_new ();
+ notes_plugin->icon_panel = gtk_image_new ();
notes_plugin->tooltips = gtk_tooltips_new ();
gtk_container_add (GTK_CONTAINER (notes_plugin->btn_panel),
- notes_plugin->icon);
+ notes_plugin->icon_panel);
gtk_container_add (GTK_CONTAINER (panel_plugin),
notes_plugin->btn_panel);
@@ -95,18 +100,18 @@
"size-changed",
G_CALLBACK (notes_plugin_set_size),
notes_plugin);
- g_signal_connect (notes_plugin->btn_panel,
- "clicked",
- G_CALLBACK (notes_plugin_popup),
- notes_plugin);
g_signal_connect_swapped (panel_plugin,
"save",
G_CALLBACK (notes_plugin_save_data),
notes_plugin);
- g_signal_connect (panel_plugin,
- "free-data",
- G_CALLBACK (notes_plugin_free),
- notes_plugin);
+ g_signal_connect_swapped (panel_plugin,
+ "free-data",
+ G_CALLBACK (notes_plugin_free),
+ notes_plugin);
+ g_signal_connect_swapped (notes_plugin->btn_panel,
+ "event",
+ G_CALLBACK (notes_plugin_menu_popup),
+ notes_plugin);
xfce_panel_plugin_add_action_widget (panel_plugin, notes_plugin->btn_panel);
gtk_widget_show_all (notes_plugin->btn_panel);
@@ -156,7 +161,7 @@
size = size - 2 - (2 * MAX (notes_plugin->btn_panel->style->xthickness,
notes_plugin->btn_panel->style->ythickness));
GdkPixbuf *pixbuf = xfce_themed_icon_load ("xfce4-notes-plugin", size);
- gtk_image_set_from_pixbuf (GTK_IMAGE (notes_plugin->icon), pixbuf);
+ gtk_image_set_from_pixbuf (GTK_IMAGE (notes_plugin->icon_panel), pixbuf);
g_object_unref (G_OBJECT (pixbuf));
return TRUE;
@@ -178,14 +183,80 @@
gtk_main_quit ();
}
+static void
+notes_plugin_menu_new (NotesPlugin *notes_plugin)
+{
+ guint i = 0;
+ NotesWindow *notes_window;
+
+ notes_plugin->menu = gtk_menu_new ();
+
+ while ((notes_window = (NotesWindow *)g_slist_nth_data (notes_plugin->windows, i++)) != NULL)
+ {
+ TRACE ("notes_window (%d): %p", (i-1), notes_window);
+ GtkWidget *mi_foo = gtk_image_menu_item_new_with_label (notes_window->name);
+
+ if (GTK_WIDGET_VISIBLE (notes_window->window))
+ {
+ GtkWidget *icon = gtk_image_new_from_icon_name ("xfce4-notes-plugin",
+ GTK_ICON_SIZE_MENU);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mi_foo), icon);
+ g_signal_connect_swapped (mi_foo,
+ "activate",
+ G_CALLBACK (notes_window_hide),
+ notes_window);
+ }
+ else
+ {
+ GtkWidget *icon = gtk_image_new_from_icon_name ("xfce4-notes-plugin-rev",
+ GTK_ICON_SIZE_MENU);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mi_foo), icon);
+ g_signal_connect_swapped (mi_foo,
+ "activate",
+ G_CALLBACK (notes_window_show),
+ notes_window);
+ }
+
+ gtk_menu_shell_append (GTK_MENU_SHELL (notes_plugin->menu), mi_foo);
+ }
+
+ gtk_menu_attach_to_widget (GTK_MENU (notes_plugin->menu), notes_plugin->btn_panel, NULL);
+
+ g_signal_connect_swapped (notes_plugin->menu,
+ "deactivate",
+ G_CALLBACK (notes_plugin_menu_destroy),
+ notes_plugin);
+
+ gtk_widget_show_all (notes_plugin->menu);
+}
+
static gboolean
-notes_plugin_popup (NotesPlugin *notes_plugin)
+notes_plugin_menu_popup (NotesPlugin *notes_plugin,
+ GdkEvent *event)
{
+ if (event->type == GDK_BUTTON_PRESS && event->button.button == 1)
+ {
+ notes_plugin_menu_new (notes_plugin);
+ gtk_menu_popup (GTK_MENU (notes_plugin->menu),
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ event->button.button,
+ event->button.time);
+ }
return FALSE;
}
+static void
+notes_plugin_menu_destroy (NotesPlugin *notes_plugin)
+{
+ DBG ("Dettach window menu");
+ gtk_menu_detach (GTK_MENU (notes_plugin->menu));
+}
+
XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL (notes_plugin_register);
/* TODO sort the next functions */
More information about the Goodies-commits
mailing list