summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/images/binfile-symbolic.svg229
-rw-r--r--data/images/tipoftheday-symbolic.svg474
-rw-r--r--src/common/Makefile.am2
-rw-r--r--src/framework.c63
-rw-r--r--src/glibext/helpers.h1
-rw-r--r--src/gtkext/Makefile.am1
-rw-r--r--src/gtkext/dockstation-int.h58
-rw-r--r--src/gtkext/grid-int.h77
-rw-r--r--src/gtkext/helpers.h43
-rw-r--r--src/gtkext/hexview.c2
-rw-r--r--src/gtkext/panel-int.h4
-rw-r--r--src/gtkext/panel.c2
-rw-r--r--src/gui/Makefile.am14
-rw-r--r--src/gui/core/Makefile.am4
-rw-r--r--src/gui/core/core.c19
-rw-r--r--src/gui/core/core.h1
-rw-r--r--src/gui/core/panels.c143
-rw-r--r--src/gui/core/panels.h24
-rw-r--r--src/gui/gresource.xml3
-rw-r--r--src/gui/panel-int.h105
-rw-r--r--src/gui/panel.c300
-rw-r--r--src/gui/panel.h76
-rw-r--r--src/gui/panels/Makefile.am33
-rw-r--r--src/gui/panels/binary-int.h75
-rw-r--r--src/gui/panels/binary-launch.ui64
-rw-r--r--src/gui/panels/binary-props.ui39
-rw-r--r--src/gui/panels/binary.c513
-rw-r--r--src/gui/panels/binary.h64
-rw-r--r--src/gui/panels/binary.ui16
-rw-r--r--src/gui/panels/gresource.xml24
-rw-r--r--src/gui/panels/welcome-hints.txt23
-rw-r--r--src/gui/panels/welcome-int.h89
-rw-r--r--src/gui/panels/welcome.c817
-rw-r--r--src/gui/panels/welcome.h38
-rw-r--r--src/gui/panels/welcome.ui448
-rw-r--r--src/gui/style.css46
36 files changed, 2756 insertions, 1178 deletions
diff --git a/data/images/binfile-symbolic.svg b/data/images/binfile-symbolic.svg
new file mode 100644
index 0000000..4e18f54
--- /dev/null
+++ b/data/images/binfile-symbolic.svg
@@ -0,0 +1,229 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ viewBox="-26 -28 52 52"
+ version="1.1"
+ id="svg42"
+ sodipodi:docname="binfile-symbolic.svg"
+ inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:cc="http://creativecommons.org/ns#">
+ <sodipodi:namedview
+ id="namedview44"
+ pagecolor="#ffffff"
+ bordercolor="#000000"
+ borderopacity="0.25"
+ inkscape:showpageshadow="2"
+ inkscape:pageopacity="0"
+ inkscape:pagecheckerboard="true"
+ inkscape:deskcolor="#d1d1d1"
+ showgrid="true"
+ inkscape:zoom="15.662673"
+ inkscape:cx="23.303813"
+ inkscape:cy="25.155349"
+ inkscape:window-width="1920"
+ inkscape:window-height="1011"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="g1230">
+ <inkscape:grid
+ type="xygrid"
+ id="grid282"
+ originx="26"
+ originy="26" />
+ </sodipodi:namedview>
+ <defs
+ id="defs30">
+ <clipPath
+ id="b">
+ <circle
+ cy="-15"
+ r="9.5"
+ id="circle2" />
+ <circle
+ cy="-15"
+ r="9.5"
+ transform="rotate(120)"
+ id="circle4" />
+ <circle
+ cy="-15"
+ r="9.5"
+ transform="rotate(240)"
+ id="circle6" />
+ </clipPath>
+ <mask
+ id="a"
+ width="60"
+ height="60"
+ x="-30"
+ y="-30"
+ maskUnits="userSpaceOnUse">
+ <path
+ fill="#fff"
+ d="M-27-27h54v54h-54z"
+ id="path9" />
+ <path
+ d="M2-23v-4h-4v4M-.5-6v4h1v-4"
+ id="path11" />
+ <circle
+ cy="-15"
+ r="10.5"
+ id="circle13" />
+ <g
+ transform="rotate(120)"
+ id="g19">
+ <path
+ d="M2-23v-4h-4v4M-.5-6v4h1v-4"
+ id="path15" />
+ <circle
+ cy="-15"
+ r="10.5"
+ id="circle17" />
+ </g>
+ <g
+ transform="rotate(240)"
+ id="g25">
+ <path
+ d="M2-23v-4h-4v4M-.5-6v4h1v-4"
+ id="path21" />
+ <circle
+ cy="-15"
+ r="10.5"
+ id="circle23" />
+ </g>
+ <circle
+ r="3"
+ id="circle27" />
+ </mask>
+ </defs>
+ <metadata
+ id="metadata46">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="" />
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:groupmode="layer"
+ id="g1230"
+ inkscape:label="file"
+ style="display:inline"
+ sodipodi:insensitive="true">
+ <rect
+ style="display:none;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
+ id="rect4363"
+ width="38"
+ height="48"
+ x="-19"
+ y="-26.000002"
+ rx="0.99999994"
+ ry="1"
+ inkscape:label="border ext" />
+ <rect
+ style="display:none;fill:#ffa700;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
+ id="rect4521"
+ width="34"
+ height="44"
+ x="-17"
+ y="-24"
+ rx="1"
+ ry="0.99999994"
+ inkscape:label="border int" />
+ <rect
+ style="display:none;fill:#4eff00;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
+ id="rect4575"
+ width="10"
+ height="12"
+ x="9"
+ y="-26"
+ inkscape:label="corner ext" />
+ <rect
+ style="display:none;fill:#00ffc4;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
+ id="rect3694"
+ width="8"
+ height="10"
+ x="11"
+ y="-26"
+ inkscape:label="corner int" />
+ <path
+ id="rect4765"
+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
+ inkscape:label="border"
+ d="m -18,-26 c -0.553998,0 -1,0.446002 -1,1 v 46 c 0,0.553998 0.446002,1 1,1 h 36 c 0.553998,0 1,-0.446002 1,-1 v -35 h -2 v 33 c 0,0.553998 -0.446002,1 -1,1 h -32 c -0.553998,0 -1,-0.446002 -1,-1 v -42 c 0,-0.553998 0.446002,-1 1,-1 H 9 v -2 z" />
+ <path
+ id="rect4774"
+ style="display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
+ inkscape:label="corner"
+ d="m 9,-26 v 12 h 10 v -2 h -8 v -10 z" />
+ <path
+ id="rect1239"
+ style="stroke-width:0;stroke-linecap:round;stroke-linejoin:round"
+ d="m 11,-26 8,10 -1,2 -8,-10 z"
+ sodipodi:nodetypes="ccccc"
+ inkscape:label="top right" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer5"
+ inkscape:label="lens"
+ style="display:inline">
+ <circle
+ style="display:none;fill:#1600ba;fill-opacity:1;stroke-width:0;stroke-linecap:round;stroke-linejoin:round"
+ id="path410"
+ cx="-2"
+ cy="-1.5"
+ r="10.5"
+ inkscape:label="circle ext" />
+ <circle
+ style="display:none;fill:#ba00b9;fill-opacity:1;stroke-width:0;stroke-linecap:round;stroke-linejoin:round"
+ id="path2870"
+ cx="-2"
+ cy="-1.5"
+ r="9.5"
+ inkscape:label="circle int" />
+ <path
+ id="circle2925"
+ style="fill:#000000;fill-opacity:1;stroke-width:0;stroke-linecap:round;stroke-linejoin:round"
+ inkscape:label="circle"
+ d="M -2 -12 A 10.5 10.5 0 0 0 -12.5 -1.5 A 10.5 10.5 0 0 0 -2 9 A 10.5 10.5 0 0 0 8.5 -1.5 A 10.5 10.5 0 0 0 -2 -12 z M -2 -11 A 9.5 9.5 0 0 1 7.5 -1.5 A 9.5 9.5 0 0 1 -2 8 A 9.5 9.5 0 0 1 -11.5 -1.5 A 9.5 9.5 0 0 1 -2 -11 z " />
+ <path
+ id="rect3512"
+ style="stroke-width:0;stroke-linecap:round;stroke-linejoin:round"
+ d="M 5,5 15,14 13,16 4,6 Z"
+ sodipodi:nodetypes="ccccc" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer1"
+ inkscape:label="binary"
+ style="display:inline">
+ <text
+ xml:space="preserve"
+ style="font-size:10.6667px;display:none;fill:#ffffff;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ x="-8.5920248"
+ y="2.3133454"
+ id="text1425"
+ inkscape:label="orig"><tspan
+ sodipodi:role="line"
+ id="tspan1423"
+ x="-8.5920248"
+ y="2.3133454"
+ style="font-size:10.6667px;stroke:#000000;stroke-opacity:1">0 1</tspan></text>
+ <g
+ aria-label="0 1"
+ id="text3453"
+ style="font-size:10.6667px;display:inline;fill:#ffffff;stroke:#000000;stroke-linecap:round;stroke-linejoin:round"
+ inkscape:label="paths">
+ <path
+ d="m -3.0133405,-1.5053333 q 0,1.22667054 -0.2560008,2.11200667 -0.2560008,0.87466943 -0.8106692,1.34400423 -0.5546685,0.4693348 -1.4720047,0.4693348 -1.2906707,0 -1.9093394,-1.0346699 -0.6080019,-1.04533663 -0.6080019,-2.8906758 0,-1.2373372 0.2453341,-2.1120067 0.2560008,-0.8746694 0.8106693,-1.3333375 0.5546684,-0.4693348 1.4613379,-0.4693348 1.280004,0 1.9093394,1.0346699 0.6293353,1.0240032 0.6293353,2.8800091 z m -4.1173464,0 q 0,1.56800496 0.3520012,2.34667408 0.3626678,0.77866912 1.2266705,0.77866912 0.853336,0 1.2160038,-0.76800242 0.3733346,-0.77866912 0.3733346,-2.35734078 0,-1.5573383 -0.3733346,-2.3360074 -0.3626678,-0.7786691 -1.2160038,-0.7786691 -0.8640027,0 -1.2266705,0.7786691 -0.3520012,0.7786691 -0.3520012,2.3360074 z"
+ id="path3455" />
+ <path
+ d="M 4.0693563,2.3133454 H 3.15202 V -3.009338 q 0,-0.4586682 0.010667,-0.7360024 0.010667,-0.2773342 0.032,-0.5760018 -0.1706672,0.1706672 -0.3093343,0.2880009 -0.1386671,0.1173337 -0.3520011,0.2986676 L 1.7226822,-3.0733383 1.232014,-3.7026736 3.2906872,-5.3026786 h 0.7786691 z"
+ id="path3457" />
+ </g>
+ </g>
+</svg>
diff --git a/data/images/tipoftheday-symbolic.svg b/data/images/tipoftheday-symbolic.svg
new file mode 100644
index 0000000..952de70
--- /dev/null
+++ b/data/images/tipoftheday-symbolic.svg
@@ -0,0 +1,474 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ version="1.1"
+ id="svg2"
+ width="650"
+ height="650"
+ viewBox="0 0 650 650"
+ sodipodi:docname="tipoftheday-symbolic.svg"
+ inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg">
+ <defs
+ id="defs6">
+ <inkscape:path-effect
+ effect="fillet_chamfer"
+ id="path-effect2240"
+ is_visible="true"
+ lpeversion="1"
+ nodesatellites_param="F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,1,1,0,25,0,1 @ F,0,1,1,0,25,0,1 @ F,0,1,1,0,25,0,1 @ F,0,1,1,0,25,0,1 @ F,0,0,1,0,0,0,1"
+ unit="px"
+ method="auto"
+ mode="F"
+ radius="25"
+ chamfer_steps="1"
+ flexible="false"
+ use_knot_distance="true"
+ apply_no_radius="true"
+ apply_with_radius="true"
+ only_selected="true"
+ hide_knots="false" />
+ <inkscape:path-effect
+ effect="fillet_chamfer"
+ id="path-effect2206"
+ is_visible="true"
+ lpeversion="1"
+ nodesatellites_param="F,0,0,1,0,0,0,1 @ F,0,1,1,0,12,0,1 @ F,0,1,1,0,12,0,1 @ F,0,1,1,0,12,0,1 @ F,0,1,1,0,12,0,1 @ F,0,1,1,0,12,0,1 @ F,0,1,1,0,12,0,1 @ F,0,0,1,0,0,0,1"
+ unit="px"
+ method="auto"
+ mode="F"
+ radius="12"
+ chamfer_steps="1"
+ flexible="false"
+ use_knot_distance="true"
+ apply_no_radius="true"
+ apply_with_radius="true"
+ only_selected="true"
+ hide_knots="false" />
+ <inkscape:path-effect
+ effect="fillet_chamfer"
+ id="path-effect2199"
+ is_visible="true"
+ lpeversion="1"
+ nodesatellites_param="F,0,0,1,0,0,0,1 @ F,0,1,1,0,11,0,4 @ F,0,1,1,0,11,0,4 @ F,0,1,1,0,11,0,4 @ F,0,1,1,0,11,0,4 @ F,0,1,1,0,11,0,4 @ F,0,1,1,0,11,0,4 @ F,0,0,1,0,0,0,1"
+ unit="px"
+ method="auto"
+ mode="F"
+ radius="12"
+ chamfer_steps="3"
+ flexible="false"
+ use_knot_distance="true"
+ apply_no_radius="true"
+ apply_with_radius="true"
+ only_selected="true"
+ hide_knots="false" />
+ <inkscape:path-effect
+ effect="fillet_chamfer"
+ id="path-effect2197"
+ is_visible="true"
+ lpeversion="1"
+ nodesatellites_param="F,0,0,1,0,0,0,1 @ F,0,1,1,0,31,0,1 @ F,0,1,1,0,31,0,1 @ F,0,1,1,0,31,0,1 @ F,0,1,1,0,31,0,1 @ F,0,1,1,0,31,0,1 @ F,0,1,1,0,31,0,1 @ F,0,0,1,0,0,0,1"
+ unit="px"
+ method="auto"
+ mode="F"
+ radius="31"
+ chamfer_steps="1"
+ flexible="false"
+ use_knot_distance="true"
+ apply_no_radius="true"
+ apply_with_radius="true"
+ only_selected="true"
+ hide_knots="false" />
+ <inkscape:path-effect
+ effect="fillet_chamfer"
+ id="path-effect2138"
+ is_visible="true"
+ lpeversion="1"
+ nodesatellites_param="F,0,0,1,0,0,0,1 @ F,0,1,1,0,12,0,1 @ F,0,1,1,0,12,0,1 @ F,0,1,1,0,12,0,1 @ F,0,1,1,0,12,0,1 @ F,0,1,1,0,12,0,1 @ F,0,1,1,0,12,0,1 @ F,0,0,1,0,0,0,1"
+ unit="px"
+ method="auto"
+ mode="F"
+ radius="12"
+ chamfer_steps="1"
+ flexible="false"
+ use_knot_distance="true"
+ apply_no_radius="true"
+ apply_with_radius="true"
+ only_selected="true"
+ hide_knots="false" />
+ <inkscape:path-effect
+ effect="fillet_chamfer"
+ id="path-effect2136"
+ is_visible="true"
+ lpeversion="1"
+ nodesatellites_param="F,0,0,1,0,12,0,1 @ F,0,1,1,0,12,0,1 @ F,0,1,1,0,12,0,1 @ F,0,1,1,0,12,0,1 @ F,0,1,1,0,12,0,1 @ F,0,1,1,0,12,0,1 @ F,0,1,1,0,12,0,1 @ F,0,0,1,0,12,0,1"
+ unit="px"
+ method="auto"
+ mode="F"
+ radius="12"
+ chamfer_steps="1"
+ flexible="false"
+ use_knot_distance="true"
+ apply_no_radius="true"
+ apply_with_radius="true"
+ only_selected="true"
+ hide_knots="false" />
+ <inkscape:path-effect
+ effect="fillet_chamfer"
+ id="path-effect1898"
+ is_visible="true"
+ lpeversion="1"
+ nodesatellites_param="F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1"
+ unit="px"
+ method="auto"
+ mode="F"
+ radius="23"
+ chamfer_steps="1"
+ flexible="false"
+ use_knot_distance="true"
+ apply_no_radius="true"
+ apply_with_radius="true"
+ only_selected="true"
+ hide_knots="false" />
+ <inkscape:path-effect
+ effect="fillet_chamfer"
+ id="path-effect1874"
+ is_visible="true"
+ lpeversion="1"
+ nodesatellites_param="F,0,0,1,0,25,0,1 @ F,0,0,1,0,25,0,1 @ F,0,0,1,0,25,0,1 @ F,0,0,1,0,25,0,1 @ F,0,0,1,0,25,0,1 @ F,0,0,1,0,25,0,1 @ F,0,0,1,0,25,0,1"
+ unit="px"
+ method="auto"
+ mode="F"
+ radius="25"
+ chamfer_steps="1"
+ flexible="false"
+ use_knot_distance="true"
+ apply_no_radius="true"
+ apply_with_radius="true"
+ only_selected="false"
+ hide_knots="false" />
+ </defs>
+ <sodipodi:namedview
+ id="namedview4"
+ pagecolor="#ffffff"
+ bordercolor="#000000"
+ borderopacity="0.25"
+ inkscape:showpageshadow="2"
+ inkscape:pageopacity="0.0"
+ inkscape:pagecheckerboard="0"
+ inkscape:deskcolor="#d1d1d1"
+ showgrid="true"
+ inkscape:zoom="1.0728017"
+ inkscape:cx="78.299652"
+ inkscape:cy="318.79144"
+ inkscape:window-width="1920"
+ inkscape:window-height="1011"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="layer4">
+ <inkscape:grid
+ type="xygrid"
+ id="grid2007"
+ originx="93.66602"
+ originy="-10.000001" />
+ </sodipodi:namedview>
+ <g
+ inkscape:groupmode="layer"
+ inkscape:label="Image"
+ id="g8"
+ style="display:none"
+ transform="translate(93.66602,-9.9999993)">
+ <image
+ width="682.66669"
+ height="682.66669"
+ preserveAspectRatio="none"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABmJLR0QAAAAAAAD5Q7t/AAAACXBI
+WXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wgSEzkfeDBN6QAAABl0RVh0Q29tbWVudABDcmVhdGVk
+IHdpdGggR0lNUFeBDhcAACAASURBVHja7d17kJ51fTf+9+69u9mwJCGQkAOQkJNyCCeDKAcFKYhA
+qVjrqTzO01bpo/SHlbHaw2+m40zbcXymHTv4WIGn0+oAPhUFLNF44AEJkBKQEEIggGVJSCAJOWeT
+TTa72c3vj3v9CTbAJtnsdd33/XrN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IAAAADXCKwDqjdcAHE6G/zECACX1v5QAbQsEABrPaiVA
+24K35hUA9cqrAIaToX+MAAAARgDAKACe/kEAACEAnT8IACAEoPMHAQCEAHT+IACAEIDOHwQAEALQ
++YMAAEIAOn8QAEAQQMcPAgAMl2lJ/h9laEj/K7b3RQAAowFK4KkfBAAQBtDpgwAAwgA6fRAAwPcm
++aoylMqfJ9mnDCAAwEgxQuAJHwQAEALQ+UNtaFYCABAAAAABAACoR+YAwPAwD2Bkef8PAgAIATp/
+4EB5BQAARgAAowCe/kEAAIQAnT8IAIAgoOMHAQAQAnT+IAAAgoCOHwQAQBDQ8YMAAAgDOn0QAIDG
+Cgc6eQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASu//AxdVgfzar9wBAAAAAElFTkSu
+QmCC
+"
+ id="image10" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer1"
+ inkscape:label="glass"
+ style="display:inline"
+ transform="translate(93.66602,-9.9999993)">
+ <rect
+ style="display:none;fill:#0000ff;stroke-width:0;stroke-linecap:round;stroke-linejoin:round"
+ id="rect1708"
+ width="260"
+ height="100"
+ x="211.33334"
+ y="388.56705" />
+ <circle
+ style="display:none;fill:#0000ff;stroke-width:0;stroke-linecap:round;stroke-linejoin:round"
+ id="path1809"
+ cx="341.33334"
+ cy="224.89578"
+ r="215" />
+ <path
+ id="rect2235"
+ style="display:none;fill:#000000;fill-opacity:0.25;stroke-width:0;stroke-linecap:round;stroke-linejoin:round"
+ d="m 341.33398,9.8964844 c -118.7411,0 -215,96.2588956 -215,214.9999956 0.18532,58.6064 24.26094,114.20819 66.00977,154.33008 9.94954,9.56181 21.49034,27.14716 24.57421,40.60547 l 10.16602,44.36524 c 2.18556,9.53801 8.6328,17.13104 17.00977,21.17187 a 103.49999,20 0 0 0 97.24023,13.19727 103.49999,20 0 0 0 97.23437,-13.19336 c 8.38004,-4.04003 14.82953,-11.6354 17.01563,-21.17578 L 465.75,419.83203 c 3.08387,-13.45831 14.62467,-31.04366 24.57421,-40.60547 41.74883,-40.12189 65.82445,-95.72368 66.00977,-154.33008 0,-118.7411 -96.2589,-214.9999956 -215,-214.9999956 z" />
+ <path
+ id="circle3072"
+ style="display:none;fill:none;stroke:#d66868;stroke-width:32;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
+ d="M 197.02511,265.82419 C 182.0017,212.8536 197.20659,155.90981 236.63564,117.47888 276.06469,79.047958 333.37953,65.307805 385.94759,81.684159"
+ sodipodi:nodetypes="csc"
+ inkscape:label="light" />
+ <path
+ style="color:#000000;display:none;fill:#000000;fill-opacity:0.1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
+ d="m 346.49023,58.978516 c -44.42827,-1.369495 -88.31106,15.160596 -121.02148,47.042964 -43.6139,42.50984 -60.45387,105.57529 -43.83594,164.16797 a 16,16 0 0 0 19.75781,11.02735 16,16 0 0 0 11.02735,-19.75782 C 198.98912,214.11059 212.55861,163.28944 247.80273,128.9375 283.04686,94.585563 334.20087,82.322739 381.18945,96.960937 A 16,16 0 0 0 401.22266,86.443359 16,16 0 0 0 390.70703,66.408203 c -14.53686,-4.528619 -29.40737,-6.973189 -44.2168,-7.429687 z"
+ id="path3152" />
+ <path
+ id="path3210"
+ style="display:inline;fill:#000000;fill-opacity:0.25;stroke-width:0;stroke-linecap:round;stroke-linejoin:round"
+ d="m 341.33398,9.8964844 c -118.74098,0 -215,96.2590156 -215,214.9999956 0.18532,58.60635 24.26098,114.20823 66.00977,154.33008 9.94953,9.5618 21.49035,27.14717 24.57421,40.60547 l 10.16602,44.36524 c 2.18556,9.538 8.6328,17.13104 17.00977,21.17187 a 103.49999,20 0 0 0 97.24023,13.19727 103.49999,20 0 0 0 97.23437,-13.19336 c 8.38004,-4.04003 14.82953,-11.63541 17.01563,-21.17578 L 465.75,419.83203 c 3.08386,-13.4583 14.62468,-31.04367 24.57421,-40.60547 41.74879,-40.12185 65.82445,-95.72373 66.00977,-154.33008 0,-118.74098 -96.25902,-214.9999956 -215,-214.9999956 z m -3.16602,49.0351566 c 2.76991,-0.05362 5.54551,-0.03872 8.32227,0.04687 14.80942,0.456497 29.67995,2.901073 44.2168,7.429687 a 16,16 0 0 1 10.51562,20.035156 16,16 0 0 1 -20.0332,10.517579 C 334.20092,82.322754 283.04682,94.585597 247.80273,128.9375 c -35.24408,34.35191 -48.8136,85.17314 -35.38477,132.52148 a 16,16 0 0 1 -11.02734,19.75782 16,16 0 0 1 -19.75781,-11.02735 c -16.61792,-58.59262 0.22208,-121.65817 43.83594,-164.16797 30.66598,-29.889686 71.15059,-46.285463 112.69921,-47.089839 z" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer2"
+ inkscape:label="base"
+ style="display:inline"
+ transform="translate(93.66602,-9.9999993)">
+ <rect
+ style="display:none;fill:#ff0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round"
+ id="rect2005"
+ width="180"
+ height="130.64417"
+ x="251.33334"
+ y="504.35583"
+ ry="0" />
+ <rect
+ style="display:none;fill:#ff0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round"
+ id="rect2015"
+ width="116.16666"
+ height="35"
+ x="283.25"
+ y="625" />
+ <path
+ id="rect2201"
+ style="display:inline;fill:#000000;fill-opacity:0.5;stroke-width:0;stroke-linecap:round;stroke-linejoin:round"
+ d="M 251.33398,504.38672 V 623 a 12,12 0 0 0 12,12 H 271.25 a 12,12 0 0 1 12,12 v 1 a 12,12 0 0 0 12,12 h 92.16601 a 12,12 0 0 0 12,-12 v -1 a 12,12 0 0 1 12,-12 h 7.91797 a 12,12 0 0 0 12,-12 V 504.38672 a 103.49999,20 0 0 1 -90,10.17969 103.49999,20 0 0 1 -90,-10.17969 z" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer3"
+ inkscape:label="sep"
+ style="display:inline"
+ transform="translate(93.66602,-9.9999993)">
+ <ellipse
+ style="display:none;fill:#ff9955;stroke-width:0;stroke-linecap:round;stroke-linejoin:round"
+ id="path2475"
+ cx="341.33334"
+ cy="478.56641"
+ rx="103.49999"
+ ry="20"
+ sodipodi:insensitive="true" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer4"
+ inkscape:label="background"
+ transform="translate(220,-0.10351487)"
+ style="display:inline">
+ <rect
+ style="display:none;fill:#ffce09;fill-opacity:1;stroke:none;stroke-width:0.999998;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
+ id="rect6199"
+ width="650"
+ height="650"
+ x="-220"
+ y="0.10351487" />
+ <rect
+ style="display:none;fill:#000000;fill-opacity:0.730517;stroke:none;stroke-width:0.999998;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
+ id="rect6987"
+ width="650"
+ height="650"
+ x="-220"
+ y="0.10351487" />
+ </g>
+</svg>
diff --git a/src/common/Makefile.am b/src/common/Makefile.am
index 0a7475f..83c754c 100644
--- a/src/common/Makefile.am
+++ b/src/common/Makefile.am
@@ -20,7 +20,6 @@ libcommon_la_SOURCES = \
packed.h packed.c \
pathname.h pathname.c \
pearson.h pearson.c \
- shuffle.h shuffle.c \
sort.h sort.c \
sqlite.h sqlite.c \
szstr.h \
@@ -61,6 +60,7 @@ libcommon4_la_SOURCES = \
macros.h \
packed.h packed.c \
pathname.h pathname.c \
+ shuffle.h shuffle.c \
sort.h sort.c \
xdg.h xdg.c
diff --git a/src/framework.c b/src/framework.c
index 9e4f81c..1c90fda 100644
--- a/src/framework.c
+++ b/src/framework.c
@@ -30,8 +30,8 @@
#include "framework.h"
#include "glibext/helpers.h"
#include "gui/core/core.h"
-#include "analysis/contents/file.h" // REMME
-#include "gtkext/hexview.h" // REMME
+#include "gui/core/panels.h" // REMME
+#include "gui/panels/welcome.h" // REMME
@@ -257,49 +257,24 @@ static void gtk_chrysalide_framework_activate(GApplication *app)
gtk_window_present(window);
+
do
{
- GBinContent *cnt;
-
- GtkWidget *parent;
- GtkHexView *wgt;
-
-
-#if 0
-
- cnt = g_file_content_new("tmp.bin");
-
- parent = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5);
- gtk_box_set_homogeneous(GTK_BOX(parent), FALSE);
- gtk_window_set_child(window, parent);
-
- wgt = gtk_hex_view_new(cnt);
- gtk_box_append(GTK_BOX(parent), GTK_WIDGET(wgt));
-
- wgt = gtk_hex_view_new(cnt);
- gtk_box_append(GTK_BOX(parent), GTK_WIDGET(wgt));
-
-#else
-
- cnt = g_file_content_new("/bin/id");
- //cnt = g_file_content_new("tmp.bin");
-
-
- parent = gtk_scrolled_window_new();
- gtk_window_set_child(window, parent);
-
- wgt = gtk_hex_view_new(cnt);
- gtk_scrolled_window_set_child(GTK_SCROLLED_WINDOW(parent), GTK_WIDGET(wgt));
-
-#endif
+ GPanelItem *item;
+ GtkTiledPanel *panel;
+ item = find_item_panel_by_type(G_TYPE_WELCOME_PANEL);
+ panel = g_panel_item_get_panel(item);
+ gtk_window_set_child(window, GTK_WIDGET(panel));
+ unref_object(item);
}
while (0);
+
/* Chargement des extensions de thème */
/*
@@ -322,6 +297,20 @@ static void gtk_chrysalide_framework_activate(GApplication *app)
unref_object(css);
+
+
+
+
+ css = gtk_css_provider_new();
+
+ gtk_css_provider_load_from_resource(css, "/re/chrysalide/framework/gui/style.css");
+
+ gtk_style_context_add_provider_for_display(gtk_widget_get_display(GTK_WIDGET(window)),
+ GTK_STYLE_PROVIDER(css), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+
+ unref_object(css);
+
+
}
@@ -349,7 +338,7 @@ int main(int argc, char **argv)
int result; /* Bilan de l'exécution */
GtkChrysalideFramework *app; /* Gestion d'application GTK */
- if (!load_gui_components(AGC_BUFFER_FEATURES))
+ if (!load_gui_components(AGC_BUFFER_FEATURES | AGC_PANELS))
return EXIT_FAILURE;
ensure_wm_icon_and_name();
@@ -360,7 +349,7 @@ int main(int argc, char **argv)
g_object_unref(G_OBJECT(app));
- unload_gui_components(AGC_BUFFER_FEATURES);
+ unload_gui_components(AGC_BUFFER_FEATURES | AGC_PANELS);
return result;
diff --git a/src/glibext/helpers.h b/src/glibext/helpers.h
index 04e51ad..cfcc85b 100644
--- a/src/glibext/helpers.h
+++ b/src/glibext/helpers.h
@@ -193,4 +193,5 @@
#endif
+
#endif /* _GLIBEXT_HELPERS_H */
diff --git a/src/gtkext/Makefile.am b/src/gtkext/Makefile.am
index 2eb6821..57834b2 100644
--- a/src/gtkext/Makefile.am
+++ b/src/gtkext/Makefile.am
@@ -42,6 +42,7 @@ libgtkext4_la_SOURCES = \
dockstation.h dockstation.c \
grid-int.h \
grid.h grid.c \
+ helpers.h \
hexview-int.h \
hexview.h hexview.c \
panel-int.h \
diff --git a/src/gtkext/dockstation-int.h b/src/gtkext/dockstation-int.h
new file mode 100644
index 0000000..a44371a
--- /dev/null
+++ b/src/gtkext/dockstation-int.h
@@ -0,0 +1,58 @@
+
+/* Chrysalide - Outil d'analyse de fichiers binaires
+ * dockstation.h - prototypes internes pour la manipulation et l'affichage de composants rassemblés
+ *
+ * Copyright (C) 2024 Cyrille Bagard
+ *
+ * This file is part of Chrysalide.
+ *
+ * Chrysalide is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Chrysalide is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Chrysalide. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#ifndef _GTKEXT_DOCKSTATION_INT_H
+#define _GTKEXT_DOCKSTATION_INT_H
+
+
+#include "dockstation.h"
+
+
+
+/* Station de réception pour concentration d'éléments (instance) */
+struct _GtkDockStation
+{
+ GtkWidget parent; /* A laisser en premier */
+
+};
+
+/* Station de réception pour concentration d'éléments (classe) */
+struct _GtkDockStationClass
+{
+ GtkWidgetClass parent; /* A laisser en premier */
+
+ /* Signaux */
+
+ void (* dock_widget) (GtkDockStation *, GtkWidget *);
+ void (* undock_widget) (GtkDockStation *, GtkWidget *);
+
+ void (* switch_widget) (GtkDockStation *, GtkWidget *);
+
+ void (* menu_requested) (GtkDockStation *, GtkWidget *);
+ void (* close_requested) (GtkDockStation *, GtkWidget *);
+
+};
+
+
+
+#endif /* _GTKEXT_DOCKSTATION_INT_H */
diff --git a/src/gtkext/grid-int.h b/src/gtkext/grid-int.h
new file mode 100644
index 0000000..5ae48ad
--- /dev/null
+++ b/src/gtkext/grid-int.h
@@ -0,0 +1,77 @@
+
+/* Chrysalide - Outil d'analyse de fichiers binaires
+ * grid-int.h - prototypes interne pour un composant d'affichage avec des chemins vers les composants contenus
+ *
+ * Copyright (C) 2024 Cyrille Bagard
+ *
+ * This file is part of Chrysalide.
+ *
+ * Chrysalide is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Chrysalide is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Chrysalide. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#ifndef _GTKEXT_GRID_INT_H
+#define _GTKEXT_GRID_INT_H
+
+
+#include "grid.h"
+
+
+
+/* -------------------------- GESTION DES TUILES AFFICHEES -------------------------- */
+
+
+/* Informations concernant une tuile */
+typedef struct _grid_tile_t
+{
+ struct _grid_tile_t *parent; /* Tuile parente */
+
+ GtkWidget *widget; /* Support d'affichage */
+
+ char *path; /* Chemin d'accès */
+
+ struct _grid_tile_t *children[2]; /* Tuiles encastrées ou 2xNULL */
+
+} grid_tile_t;
+
+
+
+/* --------------------------- INTERFACE DU COMPOSANT GTK --------------------------- */
+
+
+/* Conteneur pour un affichage en tuiles nommées (instance) */
+struct _GtkTilingGrid
+{
+ GtkWidget parent; /* A laisser en premier */
+
+ grid_tile_t *tiles; /* Tuiles représentées */
+
+ GtkTiledPanel *def_panel; /* Panneau principal par défaut*/
+
+};
+
+/* Conteneur pour un affichage en tuiles nommées (classe) */
+struct _GtkTilingGridClass
+{
+ GtkWidgetClass parent; /* A laisser en premier */
+
+ /* Signaux */
+
+ void (* station_created) (GtkTilingGrid *, GtkDockStation *, gpointer);
+
+};
+
+
+
+#endif /* _GTKEXT_GRID_INT_H */
diff --git a/src/gtkext/helpers.h b/src/gtkext/helpers.h
new file mode 100644
index 0000000..3f8b3cd
--- /dev/null
+++ b/src/gtkext/helpers.h
@@ -0,0 +1,43 @@
+
+/* Chrysalide - Outil d'analyse de fichiers binaires
+ * helpers.h - prototypes pour la simplification des interactions de base avec GTK
+ *
+ * Copyright (C) 2024 Cyrille Bagard
+ *
+ * This file is part of Chrysalide.
+ *
+ * Chrysalide is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Chrysalide is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Chrysalide. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#ifndef _GTKEXT_HELPERS_H
+#define _GTKEXT_HELPERS_H
+
+
+#include <assert.h>
+#include <glib-object.h>
+
+
+
+/**
+ * Facilités de transmission de paramètres pour les fonctions de type
+ * gtk_widget_class_bind_template_callback_full() et gtk_builder_cscope_add_callback_symbol().
+ */
+
+#define BUILDER_CB(cb) \
+ #cb, G_CALLBACK(cb)
+
+
+
+#endif /* _GTKEXT_HELPERS_H */
diff --git a/src/gtkext/hexview.c b/src/gtkext/hexview.c
index 7363079..6a78ce6 100644
--- a/src/gtkext/hexview.c
+++ b/src/gtkext/hexview.c
@@ -110,7 +110,7 @@ static void gtk_hex_view_class_init(GtkHexViewClass *class)
widget = GTK_WIDGET_CLASS(class);
- gtk_widget_class_set_css_name(widget, "GtkHexView");
+ // REMME gtk_widget_class_set_css_name(widget, "GtkHexView");
g_type_ensure(GTK_TYPE_COMPOSING_AREA);
diff --git a/src/gtkext/panel-int.h b/src/gtkext/panel-int.h
index 7699f73..593e5b4 100644
--- a/src/gtkext/panel-int.h
+++ b/src/gtkext/panel-int.h
@@ -33,14 +33,14 @@
/* Elément réactif pour panneaux de l'éditeur (instance) */
struct _GtkTiledPanel
{
- GtkWidget parent; /* A laisser en premier */
+ GtkBox parent; /* A laisser en premier */
};
/* Elément réactif pour panneaux de l'éditeur (classe) */
struct _GtkTiledPanelClass
{
- GtkWidgetClass parent; /* A laisser en premier */
+ GtkBoxClass parent; /* A laisser en premier */
};
diff --git a/src/gtkext/panel.c b/src/gtkext/panel.c
index f0c39aa..b2817fa 100644
--- a/src/gtkext/panel.c
+++ b/src/gtkext/panel.c
@@ -51,7 +51,7 @@ static void gtk_tiled_panel_finalize(GtkTiledPanel *);
/* Détermine le type du conteneur d'affichage en tuiles nommées. */
-G_DEFINE_TYPE(GtkTiledPanel, gtk_tiled_panel, GTK_TYPE_WIDGET)
+G_DEFINE_TYPE(GtkTiledPanel, gtk_tiled_panel, GTK_TYPE_BOX)
/******************************************************************************
diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am
index da46844..4197989 100644
--- a/src/gui/Makefile.am
+++ b/src/gui/Makefile.am
@@ -27,10 +27,13 @@ libgui_la_CFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS)
libgui4_la_SOURCES = \
+ panel-int.h \
+ panel.h panel.c \
resources.h resources.c
libgui4_la_LIBADD = \
- core/libguicore4.la
+ core/libguicore4.la \
+ panels/libguipanels4.la
libgui4_la_CFLAGS = $(LIBGTK4_CFLAGS)
@@ -40,10 +43,13 @@ devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%)
dev_HEADERS = $(libgui_la_SOURCES:%c=)
-SUBDIRS = core # dialogs menus panels tb
+SUBDIRS = core panels # dialogs menus panels tb
-resources.c: gresource.xml $(UI_FILES)
+RES_FILES = \
+ style.css
+
+resources.c: gresource.xml $(RES_FILES)
glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-source --c-name gui gresource.xml
resources.h: gresource.xml
@@ -52,4 +58,4 @@ resources.h: gresource.xml
CLEANFILES = resources.h resources.c
-EXTRA_DIST = gresource.xml $(UI_FILES)
+EXTRA_DIST = gresource.xml $(RES_FILES)
diff --git a/src/gui/core/Makefile.am b/src/gui/core/Makefile.am
index 96ef578..3c4cbc7 100644
--- a/src/gui/core/Makefile.am
+++ b/src/gui/core/Makefile.am
@@ -15,7 +15,6 @@ RES_FILES = \
libguicore_la_SOURCES = \
global.h global.c \
items.h items.c \
- panels.h panels.c \
resources.h resources.c \
theme.h theme.c
@@ -24,7 +23,8 @@ libguicore_la_CFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS)
libguicore4_la_SOURCES = \
core.h core.c \
- logs.h logs.c
+ logs.h logs.c \
+ panels.h panels.c
libguicore4_la_CFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS)
diff --git a/src/gui/core/core.c b/src/gui/core/core.c
index 2d47dc9..d02d54c 100644
--- a/src/gui/core/core.c
+++ b/src/gui/core/core.c
@@ -24,6 +24,7 @@
#include "core.h"
+#include "panels.h"
#include "../../glibext/linetoken.h"
@@ -59,6 +60,15 @@ bool load_gui_components(AvailableGuiComponent flags)
}
+ if ((flags & AGC_PANELS) != 0 && (__loaded & AGC_PANELS) == 0)
+ {
+ result = load_main_panels();
+ if (!result) goto done;
+
+ __loaded |= AGC_PANELS;
+
+ }
+
done:
return result;
@@ -80,6 +90,14 @@ bool load_gui_components(AvailableGuiComponent flags)
void unload_gui_components(AvailableGuiComponent flags)
{
+ if ((flags & AGC_PANELS) != 0 && (__loaded & AGC_PANELS) == 0)
+ {
+ unload_all_panels();
+
+ __loaded &= ~AGC_PANELS;
+
+ }
+
if ((flags & AGC_BUFFER_FEATURES) != 0 && (__loaded & AGC_BUFFER_FEATURES) == 0)
{
exit_segment_content_hash_table();
@@ -87,7 +105,6 @@ void unload_gui_components(AvailableGuiComponent flags)
__loaded &= ~AGC_BUFFER_FEATURES;
}
-
}
diff --git a/src/gui/core/core.h b/src/gui/core/core.h
index bcb5433..19647ce 100644
--- a/src/gui/core/core.h
+++ b/src/gui/core/core.h
@@ -34,6 +34,7 @@ typedef enum _AvailableGuiComponent
{
AGC_NONE = (0 << 0), /* Statut initial */
AGC_BUFFER_FEATURES = (1 << 0), /* Tampons de bribes de texte */
+ AGC_PANELS = (1 << 1), /* Panneaux graphiques de base */
} AvailableGuiComponent;
diff --git a/src/gui/core/panels.c b/src/gui/core/panels.c
index 1b6f604..69ab2aa 100644
--- a/src/gui/core/panels.c
+++ b/src/gui/core/panels.c
@@ -1,8 +1,8 @@
/* Chrysalide - Outil d'analyse de fichiers binaires
- * panels.c - gestion d'ensemble de tous les panneaux pour l'éditeur
+ * panels.c - gestion d'ensemble de tous les panneaux graphiques du framework
*
- * Copyright (C) 2016-2019 Cyrille Bagard
+ * Copyright (C) 2016-2024 Cyrille Bagard
*
* This file is part of Chrysalide.
*
@@ -25,28 +25,16 @@
#include "panels.h"
-#include <assert.h>
#include <malloc.h>
-#include "items.h"
-#include "../panel-int.h"
-#include "../panels/bintree.h"
-#include "../panels/bookmarks.h"
-#include "../panels/errors.h"
-#include "../panels/glance.h"
-#include "../panels/history.h"
-#include "../panels/log.h"
-#include "../panels/regedit.h"
-#include "../panels/strings.h"
-#include "../panels/symbols.h"
+#include "../panels/binary.h"
#include "../panels/welcome.h"
-#include "../../core/params.h"
/* Liste des panneaux disponibles */
-static GType *_panels_list = NULL;
+static GPanelItem **_panels_list = NULL;
static size_t _panels_count = 0;
@@ -55,36 +43,54 @@ static size_t _panels_count = 0;
* *
* Paramètres : - *
* *
-* Description : Charge les principaux panneaux de l'éditeur. *
+* Description : Charge les principaux panneaux graphiques du framework. *
* *
-* Retour : - *
+* Retour : Bilan de l'opération. *
* *
* Remarques : - *
* *
******************************************************************************/
-void load_main_panels(void)
+bool load_main_panels(void)
{
- GGenConfig *config; /* Configuration globale */
- GPanelItem *panel; /* Panneau à précharger */
+ bool result; /* Bilan à retourner */
- config = get_main_configuration();
+ result = true;
- register_panel_item(G_TYPE_LOG_PANEL, config);
+ // TODO register_panel_item(G_TYPE_LOG_PANEL, config);
/* Chargement du panneau de rapport au plus tôt */
- panel = g_panel_item_new(G_TYPE_LOG_PANEL, NULL);
- g_object_unref(G_OBJECT(panel));
-
- register_panel_item(G_TYPE_WELCOME_PANEL, config);
- register_panel_item(G_TYPE_REGEDIT_PANEL, config);
- register_panel_item(G_TYPE_SYMBOLS_PANEL, config);
- register_panel_item(G_TYPE_HISTORY_PANEL, config);
- register_panel_item(G_TYPE_STRINGS_PANEL, config);
- register_panel_item(G_TYPE_GLANCE_PANEL, config);
- register_panel_item(G_TYPE_BOOKMARKS_PANEL, config);
- register_panel_item(G_TYPE_BINTREE_PANEL, config);
- register_panel_item(G_TYPE_ERROR_PANEL, config);
+ // TODO panel = g_panel_item_new(G_TYPE_LOG_PANEL, NULL);
+
+ register_panel_item(g_binary_panel_new());
+ register_panel_item(g_welcome_panel_new());
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : - *
+* *
+* Description : Décharge tous les panneaux graphiques du framework. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+void unload_all_panels(void)
+{
+ size_t i; /* Boucle de parcours */
+
+ for (i = 0; i < _panels_count; i++)
+ unref_object(_panels_list[i]);
+
+ _panels_list = NULL;
+ _panels_count = 0;
}
@@ -102,27 +108,49 @@ void load_main_panels(void)
* *
******************************************************************************/
-void register_panel_item(GType type, GGenConfig *config)
+void register_panel_item(/* __steal */ GPanelItem *item)
{
- GPanelItemClass *class; /* Classe associée au type */
-#ifndef NDEBUG
- bool status; /* Bilan de mise en place */
-#endif
+ _panels_list = realloc(_panels_list, ++_panels_count * sizeof(GPanelItem *));
- _panels_list = realloc(_panels_list, ++_panels_count * sizeof(GType));
+ _panels_list[_panels_count - 1] = item;
- _panels_list[_panels_count - 1] = type;
+}
- class = g_type_class_ref(type);
-#ifndef NDEBUG
- status = gtk_panel_item_class_setup_configuration(class, config);
- assert(status);
-#else
- gtk_panel_item_class_setup_configuration(class, config);
-#endif
+/******************************************************************************
+* *
+* Paramètres : target = type de définition de panneau recherchée. *
+* *
+* Description : Retrouve la définition d'un type de panneau. *
+* *
+* Retour : Instance de définition identifiée ou NULL en cas d'échec. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
- g_type_class_unref(class);
+GPanelItem *find_item_panel_by_type(GType target)
+{
+ GPanelItem *result; /* Instance à renvoyer */
+ size_t i; /* Boucle de parcours */
+ GPanelItem *item; /* Définition de panneau */
+
+ result = NULL;
+
+ for (i = 0; i < _panels_count; i++)
+ {
+ item = _panels_list[i];
+
+ if (G_OBJECT_TYPE(item) == target)
+ {
+ result = item;
+ ref_object(result);
+ break;
+ }
+
+ }
+
+ return result;
}
@@ -141,27 +169,22 @@ void register_panel_item(GType type, GGenConfig *config)
* *
******************************************************************************/
-bool _browse_all_item_panels(bool skip, handle_panel_item_fc handle, void *data)
+bool browse_all_item_panels(bool skip, handle_panel_item_fc handle, void *data)
{
bool result; /* Résultat à renvoyer */
- GType type; /* Type de panneau à traiter */
size_t i; /* Boucle de parcours */
- GPanelItemClass *class; /* Classe associée au type */
+ GPanelItem *item; /* Définition de panneau */
result = true;
for (i = 0; i < _panels_count; i++)
{
- type = _panels_list[i];
+ item = _panels_list[i];
- if (skip && type == G_TYPE_WELCOME_PANEL)
+ if (skip && G_OBJECT_TYPE(item) == G_TYPE_WELCOME_PANEL)
continue;
- class = g_type_class_ref(type);
-
- result = handle(class, data);
-
- g_type_class_unref(class);
+ result = handle(item, data);
if (!result) break;
diff --git a/src/gui/core/panels.h b/src/gui/core/panels.h
index 3846038..aaea9e6 100644
--- a/src/gui/core/panels.h
+++ b/src/gui/core/panels.h
@@ -1,8 +1,8 @@
/* Chrysalide - Outil d'analyse de fichiers binaires
- * panels.h - prototypes pour la gestion d'ensemble de tous les panneaux pour l'éditeur
+ * panels.h - prototypes pour la gestion d'ensemble de tous les panneaux graphiques du framework
*
- * Copyright (C) 2016-2019 Cyrille Bagard
+ * Copyright (C) 2016-2024 Cyrille Bagard
*
* This file is part of Chrysalide.
*
@@ -30,24 +30,26 @@
#include "../panel.h"
-#include "../../glibext/configuration.h"
-/* Charge les principaux panneaux de l'éditeur. */
-void load_main_panels(void);
+/* Charge les principaux panneaux graphiques du framework. */
+bool load_main_panels(void);
+
+/* Décharge tous les panneaux graphiques du framework. */
+void unload_all_panels(void);
/* Enregistre un panneau comme partie intégrante de l'éditeur. */
-void register_panel_item(GType, GGenConfig *);
+void register_panel_item(/* __steal */ GPanelItem *);
+
+/* Retrouve la définition d'un type de panneau. */
+GPanelItem *find_item_panel_by_type(GType);
/* Réalise un traitement sur un panneau de l'éditeur. */
-typedef bool (* handle_panel_item_fc) (GPanelItemClass *, void *);
+typedef bool (* handle_panel_item_fc) (GPanelItem *, void *);
/* Effectue le parcours de tous les panneaux chargés. */
-bool _browse_all_item_panels(bool, handle_panel_item_fc, void *);
-
-#define browse_all_item_panels(h, d) \
- _browse_all_item_panels(false, h, d)
+bool browse_all_item_panels(bool, handle_panel_item_fc, void *);
diff --git a/src/gui/gresource.xml b/src/gui/gresource.xml
index f8baf25..437ec51 100644
--- a/src/gui/gresource.xml
+++ b/src/gui/gresource.xml
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
+ <gresource prefix="/re/chrysalide/framework/gui">
+ <file compressed="true">style.css</file>
+ </gresource>
<gresource prefix="/re/chrysalide/framework/images">
<file compressed="true" alias="chrysalide-logo.svg">../../pixmaps/chrysalide-logo.svg</file>
</gresource>
diff --git a/src/gui/panel-int.h b/src/gui/panel-int.h
index d54dc16..7e6f7e3 100644
--- a/src/gui/panel-int.h
+++ b/src/gui/panel-int.h
@@ -2,7 +2,7 @@
/* Chrysalide - Outil d'analyse de fichiers binaires
* panel-int.h - prototypes pour les définitions internes liées aux panneaux d'affichage
*
- * Copyright (C) 2019 Cyrille Bagard
+ * Copyright (C) 2019-2024 Cyrille Bagard
*
* This file is part of Chrysalide.
*
@@ -22,117 +22,50 @@
*/
-#ifndef _GUI_PANELS_PANEL_INT_H
-#define _GUI_PANELS_PANEL_INT_H
+#ifndef _GUI_PANEL_INT_H
+#define _GUI_PANEL_INT_H
#include "panel.h"
-#include <gtk/gtk.h>
-
-
-#include "item-int.h"
-#include "../glibext/delayed.h"
-
-
-
-/* ------------------------- COEUR DES PANNEAUX D'AFFICHAGE ------------------------- */
-
/* Fournit une indication sur la personnalité du panneau. */
-typedef PanelItemPersonality (* get_panel_personality_fc) (const GPanelItemClass *);
-
-/* Fournit une indication d'accroche du panneau au démarrage. */
-typedef bool (* dock_panel_at_startup_fc) (const GPanelItemClass *);
-
-/* Détermine si un panneau peut être filtré. */
-typedef bool (* can_search_panel_fc) (const GPanelItemClass *);
+typedef PanelItemPersonality (* get_panel_item_personality_cb) (const GPanelItem *);
-/* Indique le chemin initial de la localisation d'un panneau. */
-typedef char * (* get_panel_path_fc) (const GPanelItemClass *);
+/* Fournit un composant pour lancer l'activité d'un panneau. */
+typedef GtkWidget * (* get_panel_item_widget_cb) (GPanelItem *);
-/* Indique la définition d'un éventuel raccourci clavier. */
-typedef char * (* get_panel_bindings_fc) (const GPanelItemClass *);
-
-/* Place un panneau dans l'ensemble affiché. */
-typedef void (* ack_dock_process_fc) (GPanelItem *);
-
-/* Supprime un panneau de l'ensemble affiché. */
-typedef void (* ack_undock_process_fc) (GPanelItem *);
-
-/* Démarre l'actualisation du filtrage du contenu. */
-typedef void (* update_filtered_fc) (GPanelItem *);
+/* Fournit un composant représentant un panneau graphique. */
+typedef GtkTiledPanel * (* get_panel_item_panel_cb) (GPanelItem *, GtkWidget *);
/* Elément réactif pour panneaux de l'éditeur (instance) */
struct _GPanelItem
{
- GEditorItem parent; /* A laisser en premier */
-
- bool docked; /* Panneau inscrusté ? */
+ GObject parent; /* A laisser en premier */
- GNamedWidget *widget; /* Composant avec noms */
- GtkWidget *cached_widget; /* Composant GTK récupéré */
+ GtkWidget *launcher; /* Eventuel lanceur associé */
+ GtkWidget *properties; /* Propriétés de lancement */
- char *filter; /* Eventuel filtre textuel */
-
- cairo_surface_t *surface; /* Copie d'écran préalable */
- gdouble hadj_value; /* Sauvegarde de défilement #1 */
- gdouble vadj_value; /* Sauvegarde de défilement #2 */
- gint switched; /* Mémorise l'état de bascule */
+ GtkTiledPanel **panels; /* Instances complètes ouvertes*/
+ size_t pcount; /* Quantité de ces instances */
};
/* Elément réactif pour panneaux de l'éditeur (classe) */
struct _GPanelItemClass
{
- GEditorItemClass parent; /* A laisser en premier */
-
- get_panel_personality_fc get_personality; /* Fourniture de nature */
- dock_panel_at_startup_fc dock_at_startup; /* Recommandation d'accroche */
- can_search_panel_fc can_search; /* Contenu fouillable ? */
- get_panel_path_fc get_path; /* Chemin vers la place idéale */
- get_panel_bindings_fc get_bindings; /* Raccourci clavier éventuel */
-
- ack_dock_process_fc ack_dock; /* Prise en compte d'accroche */
- ack_undock_process_fc ack_undock; /* Prise en compte de décroche */
+ GObjectClass parent; /* A laisser en premier */
- update_filtered_fc update_filtered; /* Lancement du filtrage */
+ get_panel_item_personality_cb get_personality; /* Fourniture de nature */
- wgroup_id_t gid; /* Groupe de travail dédié */
-
- /* Signaux */
-
- void (* dock_request) (GPanelItem);
- void (* undock_request) (GPanelItem);
+ get_panel_item_widget_cb get_launcher; /* Lancement d'une activité */
+ get_panel_item_widget_cb get_properties;/* Préparation au lancement */
+ get_panel_item_panel_cb get_panel; /* Panneau principal */
};
-/* Fournit une indication sur la personnalité du panneau. */
-PanelItemPersonality gtk_panel_item_class_get_personality_singleton(const GPanelItemClass *);
-
-/* Renvoie false lors d'une consultation de la classe. */
-bool gtk_panel_item_class_return_false(const GPanelItemClass *);
-
-/* Renvoie true lors d'une consultation de la classe. */
-bool gtk_panel_item_class_return_true(const GPanelItemClass *);
-
-
-
-/* ---------------------- MECANISMES DE MISE A JOUR DE PANNEAU ---------------------- */
-
-
-/* Obtient le groupe de travail dédié à une mise à jour. */
-wgroup_id_t g_panel_item_get_group(const GPanelItem *);
-
-/* Bascule l'affichage d'un panneau avant sa mise à jour. */
-void g_panel_item_switch_to_updating_mask(GPanelItem *);
-
-/* Bascule l'affichage d'un panneau après sa mise à jour. */
-void g_panel_item_switch_to_updated_content(GPanelItem *);
-
-
-#endif /* _GUI_PANELS_PANEL_INT_H */
+#endif /* _GUI_PANEL_INT_H */
diff --git a/src/gui/panel.c b/src/gui/panel.c
index 5b21620..6621c4e 100644
--- a/src/gui/panel.c
+++ b/src/gui/panel.c
@@ -2,7 +2,7 @@
/* Chrysalide - Outil d'analyse de fichiers binaires
* panel.c - gestion des éléments réactifs spécifiques aux panneaux
*
- * Copyright (C) 2019 Cyrille Bagard
+ * Copyright (C) 2019-2024 Cyrille Bagard
*
* This file is part of Chrysalide.
*
@@ -25,24 +25,14 @@
#include "panel.h"
-#include <assert.h>
-#include <stdio.h>
-#include <string.h>
+#include "panel-int.h"
-#include "panel-int.h"
-#include "core/global.h"
-#include "core/items.h"
-#include "../common/extstr.h"
-#include "../core/params.h"
-#include "../gtkext/gtkdockable-int.h"
-#include "../gtkext/named.h"
-#include "../plugins/dt.h"
-#include "../plugins/pglist.h"
+
+/* ---------------------- MANIPULATIONS D'UN PANNEAU GRAPHIQUE ---------------------- */
-/* ------------------------- COEUR DES PANNEAUX D'AFFICHAGE ------------------------- */
/* Initialise la classe des panneaux graphiques de l'éditeur. */
@@ -51,51 +41,18 @@ static void g_panel_item_class_init(GPanelItemClass *);
/* Initialise une instance de panneau graphique pour l'éditeur. */
static void g_panel_item_init(GPanelItem *);
-/* Procède à l'initialisation de l'interface d'incrustation. */
-static void g_panel_item_dockable_interface_init(GtkDockableInterface *);
-
/* Supprime toutes les références externes. */
static void g_panel_item_dispose(GPanelItem *);
/* Procède à la libération totale de la mémoire. */
static void g_panel_item_finalize(GPanelItem *);
-/* Construit la chaîne d'accès à un élément de configuration. */
-static char *gtk_panel_item_class_build_configuration_key(const GPanelItemClass *, const char *);
-/* Fournit le nom court du composant encapsulable. */
-static char *gtk_panel_item_get_name(const GPanelItem *);
-/* Fournit le nom long du composant encapsulable. */
-static char *gtk_panel_item_get_desc(const GPanelItem *);
-
-/* Détermine si un panneau peut être filtré. */
-static bool gtk_panel_item_can_search(const GPanelItem *);
-
-/* Fournit le composant graphique intégrable dans un ensemble. */
-static GtkWidget *gtk_panel_item_get_widget(GPanelItem *);
-
-/* Démarre l'actualisation du filtrage du contenu. */
-static void gtk_panel_item_update_filtered(GPanelItem *, const char *);
-
-
-
-/* ---------------------- MECANISMES DE MISE A JOUR DE PANNEAU ---------------------- */
-
-
-/* Présente une copie de l'affichage du composant rafraîchi. */
-static gboolean g_panel_item_draw_mask(GtkWidget *, cairo_t *, GPanelItem *);
-
-
-
-/* ---------------------------------------------------------------------------------- */
-/* COEUR DES PANNEAUX D'AFFICHAGE */
-/* ---------------------------------------------------------------------------------- */
/* Indique le type défini pour un élément destiné à un panneau. */
-G_DEFINE_TYPE_WITH_CODE(GPanelItem, g_panel_item, G_TYPE_EDITOR_ITEM,
- G_IMPLEMENT_INTERFACE(GTK_TYPE_DOCKABLE, g_panel_item_dockable_interface_init));
+G_DEFINE_TYPE(GPanelItem, g_panel_item, G_TYPE_OBJECT);
/******************************************************************************
@@ -113,37 +70,12 @@ G_DEFINE_TYPE_WITH_CODE(GPanelItem, g_panel_item, G_TYPE_EDITOR_ITEM,
static void g_panel_item_class_init(GPanelItemClass *class)
{
GObjectClass *object; /* Autre version de la classe */
- GEditorItemClass *item; /* Encore une autre vision... */
object = G_OBJECT_CLASS(class);
object->dispose = (GObjectFinalizeFunc/* ! */)g_panel_item_dispose;
object->finalize = (GObjectFinalizeFunc)g_panel_item_finalize;
- item = G_EDITOR_ITEM_CLASS(class);
-
- item->get_widget = (get_item_widget_fc)gtk_panel_item_get_widget;
-
- class->get_personality = gtk_panel_item_class_get_personality_singleton;
- class->dock_at_startup = gtk_panel_item_class_return_true;
- class->can_search = gtk_panel_item_class_return_false;
-
- g_signal_new("dock-request",
- G_TYPE_PANEL_ITEM,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(GPanelItemClass, dock_request),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
- g_signal_new("undock-request",
- G_TYPE_PANEL_ITEM,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(GPanelItemClass, undock_request),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
}
@@ -161,23 +93,23 @@ static void g_panel_item_class_init(GPanelItemClass *class)
static void g_panel_item_init(GPanelItem *item)
{
- item->docked = false;
+ //item->docked = false;
- item->widget = NULL;
- item->cached_widget = NULL;
+ //item->widget = NULL;
+ //item->cached_widget = NULL;
- item->filter = NULL;
+ //item->filter = NULL;
- g_atomic_int_set(&item->switched, 0);
+ //g_atomic_int_set(&item->switched, 0);
}
/******************************************************************************
* *
-* Paramètres : iface = interface GTK à initialiser. *
+* Paramètres : item = instance d'objet GLib à traiter. *
* *
-* Description : Procède à l'initialisation de l'interface d'incrustation. *
+* Description : Supprime toutes les références externes. *
* *
* Retour : - *
* *
@@ -185,14 +117,12 @@ static void g_panel_item_init(GPanelItem *item)
* *
******************************************************************************/
-static void g_panel_item_dockable_interface_init(GtkDockableInterface *iface)
+static void g_panel_item_dispose(GPanelItem *item)
{
- iface->get_name = (get_dockable_name_fc)gtk_panel_item_get_name;
- iface->get_desc = (get_dockable_desc_fc)gtk_panel_item_get_desc;
- iface->can_search = (can_dockable_search_fc)gtk_panel_item_can_search;
+ //g_clear_object(&item->widget);
+ //g_clear_object(&item->cached_widget);
- iface->get_widget = (get_dockable_widget_fc)gtk_panel_item_get_widget;
- iface->update_filtered = (update_filtered_data_fc)gtk_panel_item_update_filtered;
+ G_OBJECT_CLASS(g_panel_item_parent_class)->dispose(G_OBJECT(item));
}
@@ -201,7 +131,7 @@ static void g_panel_item_dockable_interface_init(GtkDockableInterface *iface)
* *
* Paramètres : item = instance d'objet GLib à traiter. *
* *
-* Description : Supprime toutes les références externes. *
+* Description : Procède à la libération totale de la mémoire. *
* *
* Retour : - *
* *
@@ -209,58 +139,99 @@ static void g_panel_item_dockable_interface_init(GtkDockableInterface *iface)
* *
******************************************************************************/
-static void g_panel_item_dispose(GPanelItem *item)
+static void g_panel_item_finalize(GPanelItem *item)
{
- g_clear_object(&item->widget);
- g_clear_object(&item->cached_widget);
+ G_OBJECT_CLASS(g_panel_item_parent_class)->finalize(G_OBJECT(item));
- G_OBJECT_CLASS(g_panel_item_parent_class)->dispose(G_OBJECT(item));
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : item = définition de panneau à consulter. *
+* *
+* Description : Fournit une indication sur la personnalité du panneau. *
+* *
+* Retour : Identifiant lié à la nature du panneau. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+PanelItemPersonality g_panel_item_get_personality(const GPanelItem *item)
+{
+ PanelItemPersonality result; /* Personnalité à retourner */
+ GPanelItemClass *class; /* Classe à actionner */
+
+ class = G_PANEL_ITEM_GET_CLASS(item);
+
+ result = class->get_personality(item);
+
+ return result;
}
/******************************************************************************
* *
-* Paramètres : item = instance d'objet GLib à traiter. *
+* Paramètres : item = définition de panneau à manipuler. *
* *
-* Description : Procède à la libération totale de la mémoire. *
+* Description : Fournit un composant pour lancer l'activité d'un panneau. *
* *
-* Retour : - *
+* Retour : Composant GTK (déjà ?) mis en place. *
* *
* Remarques : - *
* *
******************************************************************************/
-static void g_panel_item_finalize(GPanelItem *item)
+GtkWidget *g_panel_item_get_launcher(GPanelItem *item)
{
- if (item->filter != NULL)
- free(item->filter);
+ GtkWidget *result; /* Composant à retourner */
+ GPanelItemClass *class; /* Classe à actionner */
- if (item->surface != NULL)
- cairo_surface_destroy(item->surface);
+ if (item->launcher == NULL)
+ {
+ class = G_PANEL_ITEM_GET_CLASS(item);
+ item->launcher = class->get_launcher(item);
+ }
- G_OBJECT_CLASS(g_panel_item_parent_class)->finalize(G_OBJECT(item));
+ result = item->launcher;
+
+ if (result != NULL)
+ ref_object(result);
+
+ return result;
}
/******************************************************************************
* *
-* Paramètres : class = classe à consulter. *
+* Paramètres : item = définition de panneau à manipuler. *
* *
-* Description : Fournit une indication sur la personnalité du panneau. *
+* Description : Fournit un composant pour paramétrer l'activité d'un panneau.*
* *
-* Retour : Identifiant lié à la nature du panneau. *
+* Retour : Composant GTK (déjà ?) mis en place. *
* *
* Remarques : - *
* *
******************************************************************************/
-PanelItemPersonality gtk_panel_item_class_get_personality(const GPanelItemClass *class)
+GtkWidget *g_panel_item_get_properties(GPanelItem *item)
{
- PanelItemPersonality result; /* Personnalité à retourner */
+ GtkWidget *result; /* Composant à retourner */
+ GPanelItemClass *class; /* Classe à actionner */
+
+ if (item->properties == NULL)
+ {
+ class = G_PANEL_ITEM_GET_CLASS(item);
+ item->properties = class->get_properties(item);
+ }
- result = class->get_personality(class);
+ result = item->properties;
+
+ if (result != NULL)
+ ref_object(result);
return result;
@@ -269,6 +240,120 @@ PanelItemPersonality gtk_panel_item_class_get_personality(const GPanelItemClass
/******************************************************************************
* *
+* Paramètres : item = définition de panneau à manipuler. *
+* *
+* Description : Fournit un composant représentant un panneau graphique. *
+* *
+* Retour : Composant GTK (déjà ?) mis en place. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+GtkTiledPanel *g_panel_item_get_panel(GPanelItem *item)
+{
+ GtkTiledPanel *result; /* Composant à retourner */
+ GPanelItemClass *class; /* Classe à actionner */
+
+ if (item->pcount == 0 /* || !singleton */)
+ {
+ class = G_PANEL_ITEM_GET_CLASS(item);
+ result = class->get_panel(item, item->properties);
+
+ if (result != NULL)
+ {
+ item->panels = realloc(item->panels, ++item->pcount * sizeof(GtkTiledPanel *));
+ item->panels[item->pcount - 1] = result;
+ }
+
+ }
+
+ else
+ result = item->panels[item->pcount - 1];
+
+ if (result != NULL)
+ ref_object(result);
+
+ return result;
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+#if 0
+
+
+#include <assert.h>
+#include <stdio.h>
+#include <string.h>
+
+
+#include "panel-int.h"
+#include "core/global.h"
+#include "core/items.h"
+#include "../common/extstr.h"
+#include "../core/params.h"
+#include "../gtkext/gtkdockable-int.h"
+#include "../gtkext/named.h"
+#include "../plugins/dt.h"
+#include "../plugins/pglist.h"
+
+
+
+/* ------------------------- COEUR DES PANNEAUX D'AFFICHAGE ------------------------- */
+
+
+
+
+/* ------------------------- COEUR D'UN PANNEAU D'AFFICHAGE ------------------------- */
+
+
+/* Construit la chaîne d'accès à un élément de configuration. */
+static char *gtk_panel_item_class_build_configuration_key(const GPanelItemClass *, const char *);
+
+/* Fournit le nom court du composant encapsulable. */
+static char *gtk_panel_item_get_name(const GPanelItem *);
+
+/* Fournit le nom long du composant encapsulable. */
+static char *gtk_panel_item_get_desc(const GPanelItem *);
+
+/* Détermine si un panneau peut être filtré. */
+static bool gtk_panel_item_can_search(const GPanelItem *);
+
+/* Fournit le composant graphique intégrable dans un ensemble. */
+static GtkWidget *gtk_panel_item_get_widget(GPanelItem *);
+
+/* Démarre l'actualisation du filtrage du contenu. */
+static void gtk_panel_item_update_filtered(GPanelItem *, const char *);
+
+
+
+/* ---------------------- MECANISMES DE MISE A JOUR DE PANNEAU ---------------------- */
+
+
+/* Présente une copie de l'affichage du composant rafraîchi. */
+static gboolean g_panel_item_draw_mask(GtkWidget *, cairo_t *, GPanelItem *);
+
+
+
+/* ---------------------------------------------------------------------------------- */
+/* COEUR DES PANNEAUX D'AFFICHAGE */
+/* ---------------------------------------------------------------------------------- */
+
+
+
+/******************************************************************************
+* *
* Paramètres : class = classe à consulter. *
* *
* Description : Fournit une indication sur la personnalité du panneau. *
@@ -1117,3 +1202,6 @@ void g_panel_item_switch_to_updated_content(GPanelItem *item)
g_atomic_int_dec_and_test(&item->switched);
}
+
+
+#endif
diff --git a/src/gui/panel.h b/src/gui/panel.h
index de8d2bf..03b67d4 100644
--- a/src/gui/panel.h
+++ b/src/gui/panel.h
@@ -2,7 +2,7 @@
/* Chrysalide - Outil d'analyse de fichiers binaires
* panel.h - prototypes pour la gestion des éléments réactifs spécifiques aux panneaux
*
- * Copyright (C) 2019 Cyrille Bagard
+ * Copyright (C) 2019-2024 Cyrille Bagard
*
* This file is part of Chrysalide.
*
@@ -22,8 +22,57 @@
*/
-#ifndef _GUI_PANELS_PANEL_H
-#define _GUI_PANELS_PANEL_H
+#ifndef _GUI_PANEL_H
+#define _GUI_PANEL_H
+
+
+#include "../glibext/helpers.h"
+#include "../gtkext/panel.h"
+
+
+#include <gtk/gtk.h>
+
+
+
+#define G_TYPE_PANEL_ITEM (g_panel_item_get_type())
+
+DECLARE_GTYPE(GPanelItem, g_panel_item, G, PANEL_ITEM);
+
+
+/* Types de panneaux pour éditeur */
+typedef enum _PanelItemPersonality
+{
+ PIP_NONE, /* Pas de particularité */
+
+ PIP_MAIN_PANEL, /* Panneau principal */
+ PIP_SINGLETON, /* Instance unique */
+
+ PIP_COUNT
+
+} PanelItemPersonality;
+
+
+/* Fournit une indication sur la personnalité du panneau. */
+PanelItemPersonality g_panel_item_get_personality(const GPanelItem *);
+
+/* Fournit un composant pour lancer l'activité d'un panneau. */
+GtkWidget *g_panel_item_get_launcher(GPanelItem *);
+
+/* Fournit un composant pour paramétrer l'activité d'un panneau. */
+GtkWidget *g_panel_item_get_properties(GPanelItem *);
+
+/* Fournit un composant représentant un panneau graphique. */
+GtkTiledPanel *g_panel_item_get_panel(GPanelItem *);
+
+
+
+
+
+
+
+
+
+#if 0
#include <stdbool.h>
@@ -50,27 +99,11 @@ typedef struct _GPanelItem GPanelItem;
typedef struct _GPanelItemClass GPanelItemClass;
-/* Types de panneaux pour éditeur */
-typedef enum _PanelItemPersonality
-{
- PIP_INVALID, /* Information non initialisée */
-
- PIP_SINGLETON, /* Instance unique */
- PIP_PERSISTENT_SINGLETON, /* Instance unique permanente */
- PIP_BINARY_VIEW, /* Affichage d'un binaire */
- PIP_OTHER, /* Reste du monde */
-
- PIP_COUNT
-
-} PanelItemPersonality;
/* Indique le type défini pour un élément destiné à un panneau. */
GType g_panel_item_get_type(void);
-/* Fournit une indication sur la personnalité du panneau. */
-PanelItemPersonality gtk_panel_item_class_get_personality(const GPanelItemClass *);
-
/* Fournit une indication d'accroche du panneau au démarrage. */
bool gtk_panel_item_class_dock_at_startup(const GPanelItemClass *);
@@ -108,5 +141,8 @@ bool g_panel_item_is_docked(const GPanelItem *);
void g_panel_item_undock(GPanelItem *);
+#endif
+
+
-#endif /* _GUI_PANELS_PANEL_H */
+#endif /* _GUI_PANEL_H */
diff --git a/src/gui/panels/Makefile.am b/src/gui/panels/Makefile.am
index 83e173b..476a436 100644
--- a/src/gui/panels/Makefile.am
+++ b/src/gui/panels/Makefile.am
@@ -3,7 +3,7 @@ DEFAULT_INCLUDES = -idirafter. -I$(top_builddir)
BUILT_SOURCES = resources.h resources.c
-noinst_LTLIBRARIES = libguipanels.la
+noinst_LTLIBRARIES = libguipanels4.la # libguipanels.la
UI_FILES = \
bintree.ui \
@@ -14,8 +14,7 @@ UI_FILES = \
log.ui \
regedit.ui \
strings.ui \
- symbols.ui \
- welcome.ui
+ symbols.ui
libguipanels_la_SOURCES = \
bintree.h bintree.c \
@@ -30,18 +29,38 @@ libguipanels_la_SOURCES = \
symbols.h symbols.c \
updating-int.h \
updating.h updating.c \
- view.h view.c \
- welcome.h welcome.c
+ view.h view.c
libguipanels_la_CFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS)
+IMG_PATH = ../../../data/images
+
+RES_FILES = \
+ binary.ui \
+ binary-launch.ui \
+ binary-props.ui \
+ $(IMG_PATH)/binfile-symbolic.svg \
+ welcome.ui \
+ welcome-hints.txt \
+ $(IMG_PATH)/tipoftheday-symbolic.svg
+
+libguipanels4_la_SOURCES = \
+ binary-int.h \
+ binary.h binary.c \
+ resources.h resources.c \
+ welcome-int.h \
+ welcome.h welcome.c
+
+libguipanels4_la_CFLAGS = $(LIBGTK4_CFLAGS)
+
+
devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%)
dev_HEADERS = $(libguipanels_la_SOURCES:%c=)
-resources.c: gresource.xml $(UI_FILES)
+resources.c: gresource.xml $(RES_FILES)
glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-source --c-name gui_panels gresource.xml
resources.h: gresource.xml
@@ -50,4 +69,4 @@ resources.h: gresource.xml
CLEANFILES = resources.h resources.c
-EXTRA_DIST = gresource.xml $(UI_FILES)
+EXTRA_DIST = gresource.xml $(RES_FILES)
diff --git a/src/gui/panels/binary-int.h b/src/gui/panels/binary-int.h
new file mode 100644
index 0000000..9b3f596
--- /dev/null
+++ b/src/gui/panels/binary-int.h
@@ -0,0 +1,75 @@
+
+/* Chrysalide - Outil d'analyse de fichiers binaires
+ * binary-int.h - prototypes internes pour le panneau d'affichage de contenus d'un binaire, bruts ou non
+ *
+ * Copyright (C) 2024 Cyrille Bagard
+ *
+ * This file is part of Chrysalide.
+ *
+ * Chrysalide is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Chrysalide is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#ifndef _GUI_PANELS_BINARY_INT_H
+#define _GUI_PANELS_BINARY_INT_H
+
+
+#include "binary.h"
+#include "../panel-int.h"
+#include "../../gtkext/panel-int.h"
+
+
+
+/* ------------------------- COEUR D'UN PANNEAU D'AFFICHAGE ------------------------- */
+
+
+/* Panneau d'accueil par défaut (instance) */
+struct _GtkBinaryPanel
+{
+ GtkTiledPanel parent; /* A laisser en premier */
+
+ GtkScrolledWindow *hex_scroll; /* Défilement pour contenu #0 */
+
+};
+
+/* Panneau d'accueil par défaut (classe) */
+struct _GtkBinaryPanelClass
+{
+ GtkTiledPanelClass parent; /* A laisser en premier */
+
+};
+
+
+
+/* ---------------------- MANIPULATIONS D'UN PANNEAU GRAPHIQUE ---------------------- */
+
+
+/* Définition pour gestion part le framework d'un panneau graphique (instance) */
+struct _GBinaryPanel
+{
+ GPanelItem parent; /* A laisser en premier */
+
+};
+
+/* Définition pour gestion part le framework d'un panneau graphique (classe) */
+struct _GBinaryPanelClass
+{
+ GPanelItemClass parent; /* A laisser en premier */
+
+};
+
+
+
+#endif /* _GUI_PANELS_BINARY_INT_H */
diff --git a/src/gui/panels/binary-launch.ui b/src/gui/panels/binary-launch.ui
new file mode 100644
index 0000000..c4ed3f7
--- /dev/null
+++ b/src/gui/panels/binary-launch.ui
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+
+ <object class="GtkGrid" id="launcher">
+ <property name="margin-bottom">12</property>
+ <property name="margin-end">12</property>
+ <property name="margin-start">12</property>
+ <property name="margin-top">12</property>
+ <property name="column-spacing">12</property>
+ <child>
+ <object class="GtkImage">
+ <property name="icon-name">binfile-symbolic</property>
+ <property name="pixel-size">48</property>
+ <layout>
+ <property name="column">0</property>
+ <property name="row">0</property>
+ <property name="row-span">2</property>
+ </layout>
+ <style>
+ <class name="icon-dropshadow"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label">&lt;b&gt;Binary analysis&lt;/b&gt;</property>
+ <property name="use-markup">TRUE</property>
+ <property name="xalign">0</property>
+ <layout>
+ <property name="column">1</property>
+ <property name="row">0</property>
+ </layout>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label">Load a binary content and parse its format if recognized</property>
+ <property name="xalign">0</property>
+ <layout>
+ <property name="column">1</property>
+ <property name="row">1</property>
+ </layout>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImage">
+ <property name="icon-name">go-next-symbolic</property>
+ <property name="margin-start">12</property>
+ <layout>
+ <property name="column">2</property>
+ <property name="row">0</property>
+ <property name="row-span">2</property>
+ </layout>
+ <style>
+ <class name="icon-dropshadow"/>
+ </style>
+ </object>
+ </child>
+ </object>
+
+</interface>
diff --git a/src/gui/panels/binary-props.ui b/src/gui/panels/binary-props.ui
new file mode 100644
index 0000000..bd48ea8
--- /dev/null
+++ b/src/gui/panels/binary-props.ui
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+
+ <object class="GtkGrid" id="properties">
+ <property name="margin-bottom">12</property>
+ <property name="margin-end">12</property>
+ <property name="margin-start">12</property>
+ <property name="margin-top">12</property>
+ <property name="column-spacing">12</property>
+ <property name="row-spacing">8</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="label">Load and analyze a new file:</property>
+ <property name="xalign">0</property>
+ <layout>
+ <property name="column">0</property>
+ <property name="row">0</property>
+ </layout>
+ </object>
+ </child>
+ <child>
+ <object class="GtkEntry" id="new_file">
+ <property name="secondary-icon-name">document-open-symbolic</property>
+ <property name="placeholder-text">File location</property>
+ <property name="hexpand">TRUE</property>
+ <property name="hexpand-set">TRUE</property>
+ <layout>
+ <property name="column">0</property>
+ <property name="row">1</property>
+ </layout>
+ <style>
+ <class name="background"/>
+ </style>
+ <signal name="icon-release" handler="g_binary_panel_on_new_file_entry_icon_release"/>
+ </object>
+ </child>
+ </object>
+
+</interface>
diff --git a/src/gui/panels/binary.c b/src/gui/panels/binary.c
new file mode 100644
index 0000000..88b19d2
--- /dev/null
+++ b/src/gui/panels/binary.c
@@ -0,0 +1,513 @@
+
+/* Chrysalide - Outil d'analyse de fichiers binaires
+ * welcome.c - panneau d'affichage de contenus d'un binaire, bruts ou non
+ *
+ * Copyright (C) 2024 Cyrille Bagard
+ *
+ * This file is part of Chrysalide.
+ *
+ * Chrysalide is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Chrysalide is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#include "binary.h"
+
+
+#include "binary-int.h"
+#include "../../analysis/contents/file.h"
+#include "../../gtkext/helpers.h"
+#include "../../gtkext/hexview.h"
+
+
+
+/* ------------------------- COEUR D'UN PANNEAU D'AFFICHAGE ------------------------- */
+
+
+/* Initialise la classe des panneaux d'accueil par défaut. */
+static void gtk_binary_panel_class_init(GtkBinaryPanelClass *);
+
+/* Initialise une instance de panneau d'accueil par défaut. */
+static void gtk_binary_panel_init(GtkBinaryPanel *);
+
+/* Supprime toutes les références externes. */
+static void gtk_binary_panel_dispose(GtkBinaryPanel *);
+
+/* Procède à la libération totale de la mémoire. */
+static void gtk_binary_panel_finalize(GtkBinaryPanel *);
+
+
+
+/* --------------------- IMPLEMENTATION DES FONCTIONS DE CLASSE --------------------- */
+
+
+
+
+
+
+/* ---------------------- MANIPULATIONS D'UN PANNEAU GRAPHIQUE ---------------------- */
+
+
+/* Initialise la classe des panneaux graphiques pour binaires. */
+static void g_binary_panel_class_init(GBinaryPanelClass *);
+
+/* Initialise une instance de panneau graphique pour binaire. */
+static void g_binary_panel_init(GBinaryPanel *);
+
+/* Supprime toutes les références externes. */
+static void g_binary_panel_dispose(GBinaryPanel *);
+
+/* Procède à la libération totale de la mémoire. */
+static void g_binary_panel_finalize(GBinaryPanel *);
+
+
+
+/* --------------------- IMPLEMENTATION DES FONCTIONS DE CLASSE --------------------- */
+
+
+/* Fournit une indication sur la personnalité du panneau. */
+static PanelItemPersonality g_binary_panel_get_personality(const GBinaryPanel *);
+
+/* Fournit un composant pour lancer l'activité d'un panneau. */
+static GtkWidget *g_binary_panel_get_launcher(GBinaryPanel *);
+
+/* Fournit un composant pour paramétrer l'activité d'un panneau. */
+static GtkWidget *g_binary_panel_get_properties(GBinaryPanel *);
+
+/* Ouvre une boîte de dialogue pour récupérer un fichier. */
+static void g_binary_panel_on_new_file_entry_icon_release(GtkEntry *, GtkEntryIconPosition, gpointer);
+
+/* Fournit un composant représentant un panneau graphique. */
+static GtkTiledPanel *g_binary_panel_get_panel(GBinaryPanel *, GtkWidget *);
+
+
+
+/* ---------------------------------------------------------------------------------- */
+/* COEUR D'UN PANNEAU D'AFFICHAGE */
+/* ---------------------------------------------------------------------------------- */
+
+
+/* Indique le type défini pour un panneau d'accueil. */
+G_DEFINE_TYPE(GtkBinaryPanel, gtk_binary_panel, GTK_TYPE_TILED_PANEL);
+
+
+/******************************************************************************
+* *
+* Paramètres : class = classe à initialiser. *
+* *
+* Description : Initialise la classe des panneaux d'accueil par défaut. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static void gtk_binary_panel_class_init(GtkBinaryPanelClass *class)
+{
+ GObjectClass *object; /* Autre version de la classe */
+ GtkWidgetClass *widget; /* Classe de haut niveau */
+
+ object = G_OBJECT_CLASS(class);
+
+ object->dispose = (GObjectFinalizeFunc/* ! */)gtk_binary_panel_dispose;
+ object->finalize = (GObjectFinalizeFunc)gtk_binary_panel_finalize;
+
+ widget = GTK_WIDGET_CLASS(class);
+
+ gtk_widget_class_set_template_from_resource(widget, "/re/chrysalide/framework/gui/panels/binary.ui");
+
+ gtk_widget_class_bind_template_child(widget, GtkBinaryPanel, hex_scroll);
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : panel = instance à initialiser. *
+* *
+* Description : Initialise une instance de panneau d'accueil par défaut. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static void gtk_binary_panel_init(GtkBinaryPanel *panel)
+{
+ gtk_widget_init_template(GTK_WIDGET(panel));
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : panel = instance d'objet GLib à traiter. *
+* *
+* Description : Supprime toutes les références externes. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static void gtk_binary_panel_dispose(GtkBinaryPanel *panel)
+{
+ gtk_widget_dispose_template(GTK_WIDGET(panel), GTK_TYPE_BINARY_PANEL);
+
+ G_OBJECT_CLASS(gtk_binary_panel_parent_class)->dispose(G_OBJECT(panel));
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : panel = instance d'objet GLib à traiter. *
+* *
+* Description : Procède à la libération totale de la mémoire. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static void gtk_binary_panel_finalize(GtkBinaryPanel *panel)
+{
+ G_OBJECT_CLASS(gtk_binary_panel_parent_class)->finalize(G_OBJECT(panel));
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : content = contenu brut à exposer. *
+* *
+* Description : Crée une nouvelle instance de panneau d'accueil. *
+* *
+* Retour : Composant GTK mis en place. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+GtkTiledPanel *gtk_binary_panel_new_for_content(GBinContent *content)
+{
+ GtkTiledPanel *result; /* Instance à retourner */
+ GtkHexView *view; /* Composant d'affichage */
+
+ result = g_object_new(GTK_TYPE_BINARY_PANEL, NULL);
+
+ view = gtk_hex_view_new(content);
+ gtk_scrolled_window_set_child(GTK_BINARY_PANEL(result)->hex_scroll, GTK_WIDGET(view));
+
+ return result;
+
+}
+
+
+
+/* ---------------------------------------------------------------------------------- */
+/* IMPLEMENTATION DES FONCTIONS DE CLASSE */
+/* ---------------------------------------------------------------------------------- */
+
+
+
+
+
+
+
+
+
+/* ---------------------------------------------------------------------------------- */
+/* MANIPULATIONS D'UN PANNEAU GRAPHIQUE */
+/* ---------------------------------------------------------------------------------- */
+
+
+/* Indique le type défini pour une manipulation de panneau pour binaires. */
+G_DEFINE_TYPE(GBinaryPanel, g_binary_panel, G_TYPE_PANEL_ITEM);
+
+
+/******************************************************************************
+* *
+* Paramètres : class = classe à initialiser. *
+* *
+* Description : Initialise la classe des panneaux graphiques pour binaires. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static void g_binary_panel_class_init(GBinaryPanelClass *class)
+{
+ GObjectClass *object; /* Autre version de la classe */
+ GPanelItemClass *panel; /* Encore une autre vision... */
+
+ object = G_OBJECT_CLASS(class);
+
+ object->dispose = (GObjectFinalizeFunc/* ! */)g_binary_panel_dispose;
+ object->finalize = (GObjectFinalizeFunc)g_binary_panel_finalize;
+
+ panel = G_PANEL_ITEM_CLASS(class);
+
+ panel->get_personality = (get_panel_item_personality_cb)g_binary_panel_get_personality;
+ panel->get_launcher = (get_panel_item_widget_cb)g_binary_panel_get_launcher;
+ panel->get_properties = (get_panel_item_widget_cb)g_binary_panel_get_properties;
+ panel->get_panel = (get_panel_item_panel_cb)g_binary_panel_get_panel;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : panel = instance à initialiser. *
+* *
+* Description : Initialise une instance de panneau graphique pour binaire. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static void g_binary_panel_init(GBinaryPanel *panel)
+{
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : panel = instance d'objet GLib à traiter. *
+* *
+* Description : Supprime toutes les références externes. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static void g_binary_panel_dispose(GBinaryPanel *panel)
+{
+ G_OBJECT_CLASS(g_binary_panel_parent_class)->dispose(G_OBJECT(panel));
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : panel = instance d'objet GLib à traiter. *
+* *
+* Description : Procède à la libération totale de la mémoire. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static void g_binary_panel_finalize(GBinaryPanel *panel)
+{
+ G_OBJECT_CLASS(g_binary_panel_parent_class)->finalize(G_OBJECT(panel));
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : - *
+* *
+* Description : Constitue une définition de manipulation de panneau. *
+* *
+* Retour : Définition de propriétés mise en place. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+GPanelItem *g_binary_panel_new(void)
+{
+ GPanelItem *result; /* Structure à retourner */
+
+ result = g_object_new(G_TYPE_BINARY_PANEL, NULL);
+
+ return result;
+
+}
+
+
+
+/* ---------------------------------------------------------------------------------- */
+/* IMPLEMENTATION DES FONCTIONS DE CLASSE */
+/* ---------------------------------------------------------------------------------- */
+
+
+/******************************************************************************
+* *
+* Paramètres : panel = définition de panneau à consulter. *
+* *
+* Description : Fournit une indication sur la personnalité du panneau. *
+* *
+* Retour : Identifiant lié à la nature du panneau. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static PanelItemPersonality g_binary_panel_get_personality(const GBinaryPanel *panel)
+{
+ PanelItemPersonality result; /* Personnalité à retourner */
+
+ result = PIP_MAIN_PANEL;
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : panel = définition de panneau à manipuler. *
+* *
+* Description : Fournit un composant pour lancer l'activité d'un panneau. *
+* *
+* Retour : Composant GTK (déjà ?) mis en place. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static GtkWidget *g_binary_panel_get_launcher(GBinaryPanel *panel)
+{
+ GtkWidget *result; /* Composant à retourner */
+ GtkBuilder *builder; /* Constructeur d'UI */
+
+ builder = gtk_builder_new_from_resource("/re/chrysalide/framework/gui/panels/binary-launch.ui");
+
+ result = GTK_WIDGET(gtk_builder_get_object(builder, "launcher"));
+ ref_object(result);
+
+ unref_object(builder);
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : panel = définition de panneau à manipuler. *
+* *
+* Description : Fournit un composant pour paramétrer l'activité d'un panneau.*
+* *
+* Retour : Composant GTK (déjà ?) mis en place. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static GtkWidget *g_binary_panel_get_properties(GBinaryPanel *panel)
+{
+ GtkWidget *result; /* Composant à retourner */
+ GtkBuilderScope *scope; /* Fonctions pour signaux */
+ GtkBuilderCScope *cscope; /* Fonctions pour signaux */
+ GtkBuilder *builder; /* Constructeur d'UI */
+#ifndef NDEBUG
+ gboolean status; /* Bilan d'un chargement */
+#endif
+
+ scope = gtk_builder_cscope_new();
+ cscope = GTK_BUILDER_CSCOPE(scope);
+
+ gtk_builder_cscope_add_callback_symbol(cscope, BUILDER_CB(g_binary_panel_on_new_file_entry_icon_release));
+
+ builder = gtk_builder_new();
+ gtk_builder_set_scope(builder, scope);
+
+#ifndef NDEBUG
+ status = gtk_builder_add_from_resource(builder, "/re/chrysalide/framework/gui/panels/binary-props.ui", NULL);
+ assert(status);
+#else
+ gtk_builder_add_from_resource(builder, "/re/chrysalide/framework/gui/panels/binary-props.ui", NULL);
+#endif
+
+ result = GTK_WIDGET(gtk_builder_get_object(builder, "properties"));
+ ref_object(result);
+
+ unref_object(builder);
+ unref_object(scope);
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : entry =
+* icon_pos = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx
+* panel = définition de panneau à manipuler. *
+* *
+* Description : Ouvre une boîte de dialogue pour récupérer un fichier. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static void g_binary_panel_on_new_file_entry_icon_release(GtkEntry *entry, GtkEntryIconPosition icon_pos, gpointer user_data)
+{
+
+
+ printf("open...\n");
+
+
+
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : panel = définition de panneau à manipuler. *
+* props = éventuels éléments graphiques de paramétrages. *
+* *
+* Description : Fournit un composant représentant un panneau graphique. *
+* *
+* Retour : Composant GTK (déjà ?) mis en place. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static GtkTiledPanel *g_binary_panel_get_panel(GBinaryPanel *panel, GtkWidget *props)
+{
+ GtkTiledPanel *result; /* Composant à retourner */
+ GBinContent *content; /* Contenu binaire à afficher */
+
+ content = g_file_content_new("/bin/id");
+
+ result = gtk_binary_panel_new_for_content(content);
+
+ unref_object(content);
+
+ return result;
+
+}
diff --git a/src/gui/panels/binary.h b/src/gui/panels/binary.h
new file mode 100644
index 0000000..bcf8707
--- /dev/null
+++ b/src/gui/panels/binary.h
@@ -0,0 +1,64 @@
+
+/* Chrysalide - Outil d'analyse de fichiers binaires
+ * binary.h - prototypes pour le panneau d'accueil par défaut
+ *
+ * Copyright (C) 2012-2024 Cyrille Bagard
+ *
+ * This file is part of Chrysalide.
+ *
+ * Chrysalide is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Chrysalide is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#ifndef _GUI_PANELS_BINARY_H
+#define _GUI_PANELS_BINARY_H
+
+
+#include <gtk/gtk.h>
+
+
+#include "../panel.h"
+#include "../../glibext/helpers.h"
+#include "../../gtkext/panel.h"
+
+
+
+/* ------------------------- COEUR D'UN PANNEAU D'AFFICHAGE ------------------------- */
+
+
+#define GTK_TYPE_BINARY_PANEL (gtk_binary_panel_get_type())
+
+DECLARE_GTYPE(GtkBinaryPanel, gtk_binary_panel, GTK, BINARY_PANEL);
+
+
+/* Crée une nouvelle instance de panneau d'accueil. */
+GtkTiledPanel *gtk_binary_panel_new(void);
+
+
+
+/* ---------------------- MANIPULATIONS D'UN PANNEAU GRAPHIQUE ---------------------- */
+
+
+#define G_TYPE_BINARY_PANEL (g_binary_panel_get_type())
+
+DECLARE_GTYPE(GBinaryPanel, g_binary_panel, G, BINARY_PANEL);
+
+
+/* Constitue une définition de manipulation de panneau. */
+GPanelItem *g_binary_panel_new(void);
+
+
+
+#endif /* _GUI_PANELS_WELCOME_H */
diff --git a/src/gui/panels/binary.ui b/src/gui/panels/binary.ui
new file mode 100644
index 0000000..a34c409
--- /dev/null
+++ b/src/gui/panels/binary.ui
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+
+ <template class="GtkBinaryPanel" parent="GtkTiledPanel">
+ <child>
+ <object class="GtkScrolledWindow" id="hex_scroll">
+ <property name="hscrollbar-policy">automatic</property>
+ <property name="vscrollbar-policy">automatic</property>
+ <property name="hexpand">TRUE</property>
+ <property name="vexpand">TRUE</property>
+ <property name="has-frame">0</property>
+ </object>
+ </child>
+ </template>
+
+</interface>
diff --git a/src/gui/panels/gresource.xml b/src/gui/panels/gresource.xml
index d996ef1..d00953d 100644
--- a/src/gui/panels/gresource.xml
+++ b/src/gui/panels/gresource.xml
@@ -1,20 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
- <gresource prefix="/org/chrysalide/gui/panels">
- <file compressed="true">../../../pixmaps/tbutton_list_view.png</file>
- <file compressed="true">../../../pixmaps/tbutton_tree_view.png</file>
- <file compressed="true">../../../pixmaps/tbutton_collapse.png</file>
- <file compressed="true">../../../pixmaps/tbutton_expand.png</file>
- <file compressed="true">../../../pixmaps/symbol_class_classic.png</file>
- <file compressed="true">bintree.ui</file>
- <file compressed="true">bookmarks.ui</file>
- <file compressed="true">errors.ui</file>
- <file compressed="true">glance.ui</file>
- <file compressed="true">history.ui</file>
- <file compressed="true">log.ui</file>
- <file compressed="true">regedit.ui</file>
- <file compressed="true">strings.ui</file>
- <file compressed="true">symbols.ui</file>
+ <gresource prefix="/re/chrysalide/framework/gui/panels">
+ <file compressed="true">binary.ui</file>
+ <file compressed="true">binary-launch.ui</file>
+ <file compressed="true">binary-props.ui</file>
<file compressed="true">welcome.ui</file>
+ <file compressed="true">welcome-hints.txt</file>
+ </gresource>
+ <gresource prefix="/re/chrysalide/framework/gui/icons/scalable/actions">
+ <file compressed="true" alias="binfile-symbolic.svg">../../../data/images/binfile-symbolic.svg</file>
+ <file compressed="true" alias="tipoftheday-symbolic.svg">../../../data/images/tipoftheday-symbolic.svg</file>
</gresource>
</gresources>
diff --git a/src/gui/panels/welcome-hints.txt b/src/gui/panels/welcome-hints.txt
new file mode 100644
index 0000000..a35ea64
--- /dev/null
+++ b/src/gui/panels/welcome-hints.txt
@@ -0,0 +1,23 @@
+Chrysalide's GUI offers launchers at startup in order to run main activities quickly.
+
+Once an activity is selected, options get displayed and allow some tunning before starting new processes.
+
+Such options are usually saved between runs.
+
+
+There is no need to install Chrysalide on your system if you only want to give it a try.
+
+Just compile the source code and run the program from there.
+
+
+Chrysalide can be used in external Python scripts by setting PYTHONPATH to the directory containing the 'pychrysalide.so' file. For instance:
+
+ cd plugins/pychrysa/.libs/
+ export PYTHONPATH=$PWD
+
+Then run the interpreter suitable to your configuration (debug or release):
+
+ python3-dbg -c 'import pychrysalide ; print(pychrysalide.mod_version())'
+
+
+All the configuration files for Chrysalide are located in $HOME/.config/chrysalide/. \ No newline at end of file
diff --git a/src/gui/panels/welcome-int.h b/src/gui/panels/welcome-int.h
new file mode 100644
index 0000000..34bf922
--- /dev/null
+++ b/src/gui/panels/welcome-int.h
@@ -0,0 +1,89 @@
+
+/* Chrysalide - Outil d'analyse de fichiers binaires
+ * welcome-int.h - prototypes internes pour le panneau d'accueil par défaut
+ *
+ * Copyright (C) 2024 Cyrille Bagard
+ *
+ * This file is part of Chrysalide.
+ *
+ * Chrysalide is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Chrysalide is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#ifndef _GUI_PANELS_WELCOME_INT_H
+#define _GUI_PANELS_WELCOME_INT_H
+
+
+#include "welcome.h"
+#include "../panel-int.h"
+#include "../../gtkext/panel-int.h"
+
+
+
+/* ------------------------- COEUR D'UN PANNEAU D'AFFICHAGE ------------------------- */
+
+
+/* Panneau d'accueil par défaut (instance) */
+struct _GtkWelcomePanel
+{
+ GtkTiledPanel parent; /* A laisser en premier */
+
+ GListStore *store; /* Données brutes */
+ GtkListBox *list; /* Liste de lanceurs */
+ GtkStack *properties; /* Premières propriétés */
+
+ GtkWidget *def_child; /* Contenu par défaut */
+ GtkLabel *hints; /* Affichage d'astuces du jour */
+ GtkWidget *other_child; /* Autre contenu, alternatif */
+
+ gchar **raw_hints; /* Liste d'astuces */
+ guint raw_count; /* Taille de cette liste */
+ guint cur_hint; /* Position dans le parcours */
+
+};
+
+/* Panneau d'accueil par défaut (classe) */
+struct _GtkWelcomePanelClass
+{
+ GtkTiledPanelClass parent; /* A laisser en premier */
+
+};
+
+
+/* Met en place un nouveau panneau d'accueil. */
+bool gtk_welcome_panel_create(GtkWelcomePanel *);
+
+
+
+/* ---------------------- MANIPULATIONS D'UN PANNEAU GRAPHIQUE ---------------------- */
+
+
+/* Définition pour gestion part le framework d'un panneau graphique (instance) */
+struct _GWelcomePanel
+{
+ GPanelItem parent; /* A laisser en premier */
+
+};
+
+/* Définition pour gestion part le framework d'un panneau graphique (classe) */
+struct _GWelcomePanelClass
+{
+ GPanelItemClass parent; /* A laisser en premier */
+
+};
+
+
+
+#endif /* _GUI_PANELS_WELCOME_INT_H */
diff --git a/src/gui/panels/welcome.c b/src/gui/panels/welcome.c
index 60593d1..d10b16a 100644
--- a/src/gui/panels/welcome.c
+++ b/src/gui/panels/welcome.c
@@ -2,7 +2,7 @@
/* Chrysalide - Outil d'analyse de fichiers binaires
* welcome.c - panneau d'accueil par défaut
*
- * Copyright (C) 2012-2019 Cyrille Bagard
+ * Copyright (C) 2012-2024 Cyrille Bagard
*
* This file is part of Chrysalide.
*
@@ -26,130 +26,98 @@
#include <assert.h>
-#include <malloc.h>
-#include <stdbool.h>
-#include <stdlib.h>
-#include <string.h>
#include <i18n.h>
-#include "../panel-int.h"
-#include "../core/global.h"
-#include "../../common/cpp.h"
-#include "../../common/io.h"
-#include "../../common/net.h"
+#include "welcome-int.h"
+#include "../core/panels.h"
#include "../../common/shuffle.h"
-#include "../../core/global.h"
-#include "../../core/params.h"
-#include "../../core/paths.h"
-#include "../../gtkext/easygtk.h"
-#include "../../gtkext/named.h"
+#include "../../gtkext/helpers.h"
-/* Panneau d'accueil par défaut (instance) */
-struct _GWelcomePanel
-{
- GPanelItem parent; /* A laisser en premier */
+/* ------------------------- COEUR D'UN PANNEAU D'AFFICHAGE ------------------------- */
- cairo_surface_t *background; /* Fond pour astuces */
- char **tips; /* Liste de toutes les astuces */
- size_t count; /* Quantité d'astuces */
- size_t current; /* Indice de l'astuce courante */
+/* Initialise la classe des panneaux d'accueil par défaut. */
+static void gtk_welcome_panel_class_init(GtkWelcomePanelClass *);
- bool uorigin; /* Origine de l'affichage */
+/* Initialise une instance de panneau d'accueil par défaut. */
+static void gtk_welcome_panel_init(GtkWelcomePanel *);
- gulong sig_id; /* Connexion par signal */
+/* Supprime toutes les références externes. */
+static void gtk_welcome_panel_dispose(GtkWelcomePanel *);
-};
+/* Procède à la libération totale de la mémoire. */
+static void gtk_welcome_panel_finalize(GtkWelcomePanel *);
-/* Panneau d'accueil par défaut (classe) */
-struct _GWelcomePanelClass
-{
- GPanelItemClass parent; /* A laisser en premier */
+/* Intègre une définition de panneau enregistrée. */
+static bool gtk_welcome_panel_add_launcher(GPanelItem *, GListStore *);
-};
+/* Prépare un composant pour représenter une définition. */
+static GtkWidget *gtk_welcome_panel_create_launcher_widget(GPanelItem *, gpointer);
+/* Réagit à un changement de sélection de la liste de panneaux. */
+static void gtk_welcome_panel_on_selected_rows_changed(GtkListBox *, GtkWelcomePanel *);
-/* Colonnes de la liste des messages */
-typedef enum _RecentProjectColumn
-{
- RPC_VALID, /* Validité de l'entrée */
- RPC_FULLPATH, /* Chemin d'accès à un projet */
+/* Réagit à une demande d'affichage de l'astuce précédente. */
+static void gtk_welcome_panel_on_prev_hint_clicked(GtkButton *, GtkWelcomePanel *);
- RPC_COUNT /* Nombre de colonnes */
+/* Réagit à une demande d'affichage de l'astuce suivante. */
+static void gtk_welcome_panel_on_next_hint_clicked(GtkButton *, GtkWelcomePanel *);
-} RecentProjectColumn;
-/* Initialise la classe des panneaux d'accueil par défaut. */
-static void g_welcome_panel_class_init(GWelcomePanelClass *);
+/* --------------------- IMPLEMENTATION DES FONCTIONS DE CLASSE --------------------- */
-/* Initialise une instance de panneau d'accueil par défaut. */
-static void g_welcome_panel_init(GWelcomePanel *);
-/* Supprime toutes les références externes. */
-static void g_welcome_panel_dispose(GWelcomePanel *);
-/* Procède à la libération totale de la mémoire. */
-static void g_welcome_panel_finalize(GWelcomePanel *);
-/* Fournit le nom interne attribué à l'élément réactif. */
-static char *g_welcome_panel_class_get_key(const GWelcomePanelClass *);
-/* Fournit une indication sur la personnalité du panneau. */
-static PanelItemPersonality g_welcome_panel_class_get_personality(const GWelcomePanelClass *);
-/* Indique le chemin initial de la localisation d'un panneau. */
-static char *g_welcome_panel_class_get_path(const GWelcomePanelClass *);
-/* Place un panneau dans l'ensemble affiché. */
-static void g_welcome_panel_dock(GWelcomePanel *);
+/* ---------------------- MANIPULATIONS D'UN PANNEAU GRAPHIQUE ---------------------- */
-/* Charge l'ensemble des astuces. */
-static void g_welcome_panel_load_tips(GWelcomePanel *);
-/* Assure le dessin du fond de la bulle d'astuce. */
-static gboolean on_tip_background_draw(GtkWidget *, cairo_t *, GWelcomePanel *);
+/* Initialise la classe des panneaux graphiques pour binaires. */
+static void g_welcome_panel_class_init(GWelcomePanelClass *);
+
+/* Initialise une instance de panneau graphique pour binaire. */
+static void g_welcome_panel_init(GWelcomePanel *);
-/* Réagit à la demande d'étude d'un nouveau binaire. */
-static void on_new_binary_clicked(GtkButton *, GWelcomePanel *);
+/* Supprime toutes les références externes. */
+static void g_welcome_panel_dispose(GWelcomePanel *);
-/* Actualise au besoin la liste des projets récents. */
-static void on_recent_list_changed(GtkRecentManager *, GWelcomePanel *);
+/* Procède à la libération totale de la mémoire. */
+static void g_welcome_panel_finalize(GWelcomePanel *);
-/* Recharge une liste à jour des projets récents. */
-static void g_welcome_panel_reload_project_list(GWelcomePanel *, GtkRecentManager *);
-/* Réagit à une sélection décidée d'un projet particulier. */
-static void on_row_activated_for_projects(GtkTreeView *, GtkTreePath *, GtkTreeViewColumn *, GWelcomePanel *);
-/* Enregistre les conditions d'affichage du panneau d'accueil. */
-static void on_startup_toggled(GtkToggleButton *, GWelcomePanel *);
+/* --------------------- IMPLEMENTATION DES FONCTIONS DE CLASSE --------------------- */
-/* Consulte les versions existantes et affiche une conclusion. */
-static void g_welcome_panel_check_version(GWelcomePanel *);
-/* Affiche l'astuce précédente dans la liste globale. */
-static void on_tip_previous_clicked(GtkButton *, GWelcomePanel *);
+/* Fournit une indication sur la personnalité du panneau. */
+static PanelItemPersonality g_welcome_panel_get_personality(const GWelcomePanel *);
-/* Affiche l'astuce suivante dans la liste globale. */
-static void on_tip_next_clicked(GtkButton *, GWelcomePanel *);
+/* Fournit un composant représentant un panneau graphique. */
+static GtkTiledPanel *g_welcome_panel_get_panel(GWelcomePanel *, GtkWidget *);
-/* Actualise l'affichage des astuces. */
-static void g_welcome_panel_refresh_tip(GWelcomePanel *);
+
+
+/* ---------------------------------------------------------------------------------- */
+/* COEUR D'UN PANNEAU D'AFFICHAGE */
+/* ---------------------------------------------------------------------------------- */
/* Indique le type défini pour un panneau d'accueil. */
-G_DEFINE_TYPE(GWelcomePanel, g_welcome_panel, G_TYPE_PANEL_ITEM);
+G_DEFINE_TYPE(GtkWelcomePanel, gtk_welcome_panel, GTK_TYPE_TILED_PANEL);
/******************************************************************************
* *
-* Paramètres : klass = classe à initialiser. *
+* Paramètres : class = classe à initialiser. *
* *
* Description : Initialise la classe des panneaux d'accueil par défaut. *
* *
@@ -159,28 +127,28 @@ G_DEFINE_TYPE(GWelcomePanel, g_welcome_panel, G_TYPE_PANEL_ITEM);
* *
******************************************************************************/
-static void g_welcome_panel_class_init(GWelcomePanelClass *klass)
+static void gtk_welcome_panel_class_init(GtkWelcomePanelClass *class)
{
GObjectClass *object; /* Autre version de la classe */
- GEditorItemClass *item; /* Encore une autre vision... */
- GPanelItemClass *panel; /* Version parente de classe */
+ GtkWidgetClass *widget; /* Classe de haut niveau */
- object = G_OBJECT_CLASS(klass);
+ object = G_OBJECT_CLASS(class);
- object->dispose = (GObjectFinalizeFunc/* ! */)g_welcome_panel_dispose;
- object->finalize = (GObjectFinalizeFunc)g_welcome_panel_finalize;
-
- item = G_EDITOR_ITEM_CLASS(klass);
+ object->dispose = (GObjectFinalizeFunc/* ! */)gtk_welcome_panel_dispose;
+ object->finalize = (GObjectFinalizeFunc)gtk_welcome_panel_finalize;
- item->get_key = (get_item_key_fc)g_welcome_panel_class_get_key;
+ widget = GTK_WIDGET_CLASS(class);
- panel = G_PANEL_ITEM_CLASS(klass);
+ gtk_widget_class_set_template_from_resource(widget, "/re/chrysalide/framework/gui/panels/welcome.ui");
- panel->get_personality = (get_panel_personality_fc)g_welcome_panel_class_get_personality;
- panel->dock_at_startup = gtk_panel_item_class_return_false;
- panel->get_path = (get_panel_path_fc)g_welcome_panel_class_get_path;
+ gtk_widget_class_bind_template_callback_full(widget, BUILDER_CB(gtk_welcome_panel_on_selected_rows_changed));
+ gtk_widget_class_bind_template_callback_full(widget, BUILDER_CB(gtk_welcome_panel_on_prev_hint_clicked));
+ gtk_widget_class_bind_template_callback_full(widget, BUILDER_CB(gtk_welcome_panel_on_next_hint_clicked));
- panel->ack_dock = (ack_undock_process_fc)g_welcome_panel_dock;
+ gtk_widget_class_bind_template_child(widget, GtkWelcomePanel, list);
+ gtk_widget_class_bind_template_child(widget, GtkWelcomePanel, properties);
+ gtk_widget_class_bind_template_child(widget, GtkWelcomePanel, def_child);
+ gtk_widget_class_bind_template_child(widget, GtkWelcomePanel, hints);
}
@@ -197,86 +165,31 @@ static void g_welcome_panel_class_init(GWelcomePanelClass *klass)
* *
******************************************************************************/
-static void g_welcome_panel_init(GWelcomePanel *panel)
+static void gtk_welcome_panel_init(GtkWelcomePanel *panel)
{
- GPanelItem *pitem; /* Version parente du panneau */
- GtkBuilder *builder; /* Constructeur utilisé */
- GtkTreeView *treeview; /* Affichage de la liste */
- GtkCellRenderer *renderer; /* Moteur de rendu de colonne */
- GtkTreeViewColumn *column; /* Colonne de la liste */
- GtkToggleButton *button; /* Bouton à bascule à traiter */
- bool state; /* Etat de la coche à définir */
- gchar *filename; /* Chemin d'accès à une image */
- GtkRecentManager *manager; /* Gestionnaire global */
+ GBytes *bytes; /* Données brutes de ressource */
+ const gchar *data; /* Données brutes natives */
- /* Eléments de base */
+ gtk_widget_init_template(GTK_WIDGET(panel));
- pitem = G_PANEL_ITEM(panel);
+ panel->store = g_list_store_new(G_TYPE_PANEL_ITEM);
- pitem->widget = G_NAMED_WIDGET(gtk_built_named_widget_new_for_panel(_("Welcome"),
- _("Welcome panel"),
- PANEL_WELCOME_ID));
+ panel->other_child = NULL;
- panel->uorigin = !gtk_panel_item_class_dock_at_startup(G_PANEL_ITEM_GET_CLASS(pitem));
+ bytes = g_resources_lookup_data("/re/chrysalide/framework/gui/panels/welcome-hints.txt",
+ G_RESOURCE_LOOKUP_FLAGS_NONE, NULL);
+ assert(bytes != NULL);
- /* Représentation graphique */
+ data = g_bytes_get_data(bytes, NULL);
- builder = gtk_built_named_widget_get_builder(GTK_BUILT_NAMED_WIDGET(pitem->widget));
+ panel->raw_hints = g_strsplit(data, "\n\n\n", -1);
- /* Liste des projets récents */
+ g_bytes_unref(bytes);
- treeview = GTK_TREE_VIEW(gtk_builder_get_object(builder, "treeview"));
+ panel->raw_count = g_strv_length(panel->raw_hints);
+ assert(panel->raw_count > 0);
- column = gtk_tree_view_column_new();
- gtk_tree_view_append_column(treeview, column);
- gtk_tree_view_set_expander_column(treeview, column);
-
- renderer = gtk_cell_renderer_text_new();
- gtk_tree_view_column_pack_start(column, renderer, TRUE);
- gtk_tree_view_column_add_attribute(column, renderer, "markup", RPC_FULLPATH);
-
- /* Affichage au démarrage ? */
-
- button = GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "startup"));
-
- g_generic_config_get_value(get_main_configuration(), MPK_WELCOME_STARTUP, &state);
-
- gtk_toggle_button_set_active(button, state);
-
- /* Chargement de l'image de fond */
-
- filename = find_pixmap_file("tipoftheday.png");
-
- panel->background = cairo_image_surface_create_from_png(filename);
-
- g_free(filename);
-
- /* Connexion des signaux */
-
- gtk_builder_add_callback_symbols(builder,
- BUILDER_CALLBACK(on_tip_background_draw),
- BUILDER_CALLBACK(on_new_binary_clicked),
- BUILDER_CALLBACK(on_row_activated_for_projects),
- BUILDER_CALLBACK(on_startup_toggled),
- BUILDER_CALLBACK(on_tip_previous_clicked),
- BUILDER_CALLBACK(on_tip_next_clicked),
- NULL);
-
- gtk_builder_connect_signals(builder, panel);
-
- g_object_unref(G_OBJECT(builder));
-
- /* Actualisation du contenu du panneau */
-
- manager = get_project_manager();
-
- panel->sig_id = g_signal_connect(manager, "changed", G_CALLBACK(on_recent_list_changed), panel);
-
- g_welcome_panel_reload_project_list(panel, manager);
-
- g_welcome_panel_load_tips(panel);
-
- g_welcome_panel_check_version(panel);
+ panel->cur_hint = 0;
}
@@ -293,20 +206,13 @@ static void g_welcome_panel_init(GWelcomePanel *panel)
* *
******************************************************************************/
-static void g_welcome_panel_dispose(GWelcomePanel *panel)
+static void gtk_welcome_panel_dispose(GtkWelcomePanel *panel)
{
- GtkRecentManager *manager; /* Gestionnaire global */
+ gtk_widget_dispose_template(GTK_WIDGET(panel), GTK_TYPE_WELCOME_PANEL);
- if (panel->sig_id > 0)
- {
- manager = get_project_manager();
-
- g_signal_handler_disconnect(manager, panel->sig_id);
- panel->sig_id = 0;
+ g_clear_object(&panel->other_child);
- }
-
- G_OBJECT_CLASS(g_welcome_panel_parent_class)->dispose(G_OBJECT(panel));
+ G_OBJECT_CLASS(gtk_welcome_panel_parent_class)->dispose(G_OBJECT(panel));
}
@@ -323,34 +229,35 @@ static void g_welcome_panel_dispose(GWelcomePanel *panel)
* *
******************************************************************************/
-static void g_welcome_panel_finalize(GWelcomePanel *panel)
+static void gtk_welcome_panel_finalize(GtkWelcomePanel *panel)
{
- cairo_surface_destroy(panel->background);
+ G_OBJECT_CLASS(gtk_welcome_panel_parent_class)->finalize(G_OBJECT(panel));
- free(panel->tips);
-
- G_OBJECT_CLASS(g_welcome_panel_parent_class)->finalize(G_OBJECT(panel));
+ g_strfreev(panel->raw_hints);
}
/******************************************************************************
* *
-* Paramètres : class = classe à consulter. *
+* Paramètres : - *
* *
-* Description : Fournit le nom interne attribué à l'élément réactif. *
+* Description : Crée une nouvelle instance de panneau d'accueil. *
* *
-* Retour : Désignation (courte) de l'élément de l'éditeur. *
+* Retour : Composant GTK mis en place. *
* *
* Remarques : - *
* *
******************************************************************************/
-static char *g_welcome_panel_class_get_key(const GWelcomePanelClass *class)
+GtkTiledPanel *gtk_welcome_panel_new(void)
{
- char *result; /* Description à renvoyer */
+ GtkTiledPanel *result; /* Instance à retourner */
+
+ result = g_object_new(GTK_TYPE_WELCOME_PANEL, NULL);
- result = strdup(PANEL_WELCOME_ID);
+ if (!gtk_welcome_panel_create(GTK_WELCOME_PANEL(result)))
+ g_clear_object(&result);
return result;
@@ -359,67 +266,41 @@ static char *g_welcome_panel_class_get_key(const GWelcomePanelClass *class)
/******************************************************************************
* *
-* Paramètres : class = classe à consulter. *
+* Paramètres : panel = panneau d'accueil à initialiser. *
* *
-* Description : Fournit une indication sur la personnalité du panneau. *
+* Description : Met en place un nouveau panneau d'accueil. *
* *
-* Retour : Identifiant lié à la nature unique du panneau. *
+* Retour : Bilan de l'opération. *
* *
* Remarques : - *
* *
******************************************************************************/
-static PanelItemPersonality g_welcome_panel_class_get_personality(const GWelcomePanelClass *class)
+bool gtk_welcome_panel_create(GtkWelcomePanel *panel)
{
- PanelItemPersonality result; /* Personnalité à retourner */
+ bool result; /* Bilan à retourner */
+ int min; /* Taille à gauche minimale */
- result = PIP_PERSISTENT_SINGLETON;
+ /* Constitution de la liste des démarreurs */
- return result;
+ result = browse_all_item_panels(true, (handle_panel_item_fc)gtk_welcome_panel_add_launcher, panel->store);
-}
+ gtk_list_box_bind_model(panel->list, G_LIST_MODEL(panel->store),
+ (GtkListBoxCreateWidgetFunc)gtk_welcome_panel_create_launcher_widget,
+ NULL, NULL);
-/******************************************************************************
-* *
-* Paramètres : class = classe à consulter. *
-* *
-* Description : Indique le chemin initial de la localisation d'un panneau. *
-* *
-* Retour : Chemin fixé associé à la position initiale. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-static char *g_welcome_panel_class_get_path(const GWelcomePanelClass *class)
-{
- char *result; /* Emplacement à retourner */
+ /* Dimensionnement de la zone d'astuces */
- result = strdup("M");
+ gtk_widget_measure(GTK_WIDGET(panel->list), GTK_ORIENTATION_HORIZONTAL, -1, &min, NULL, NULL, NULL);
- return result;
+ if (min > 150)
+ min -= 150;
-}
+ g_object_set(G_OBJECT(panel->hints), "width-request", min, NULL);
-
-/******************************************************************************
-* *
-* Paramètres : - *
-* *
-* Description : Crée un panneau d'accueil par défaut. *
-* *
-* Retour : Adresse de la structure mise en place. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GPanelItem *g_welcome_panel_new(void)
-{
- GPanelItem *result; /* Structure à retourner */
-
- result = g_object_new(G_TYPE_WELCOME_PANEL, NULL);
+ gtk_label_set_markup(panel->hints, panel->raw_hints[panel->cur_hint]);
return result;
@@ -428,157 +309,129 @@ GPanelItem *g_welcome_panel_new(void)
/******************************************************************************
* *
-* Paramètres : panel = composant à présenter à l'affichage. *
+* Paramètres : item = définition de panneau à intégrer. *
+* store = liste à compléter. *
* *
-* Description : Place un panneau dans l'ensemble affiché. *
+* Description : Intègre une définition de panneau enregistrée. *
* *
-* Retour : - *
+* Retour : true pour un parcours complet de la liste des définitions. *
* *
* Remarques : - *
* *
******************************************************************************/
-static void g_welcome_panel_dock(GWelcomePanel *panel)
+static bool gtk_welcome_panel_add_launcher(GPanelItem *item, GListStore *store)
{
- g_welcome_panel_set_user_origin(panel, true);
+ bool result; /* Poursuite du parcours */
+
+ result = true;
+
+ g_list_store_append(store, G_OBJECT(item));
+
+ return result;
}
/******************************************************************************
* *
-* Paramètres : panel = panneau d'accueil à mettre à jour. *
+* Paramètres : item = définition de panneau à consulter. *
+* unused = adresse non utilisée ici. *
* *
-* Description : Charge l'ensemble des astuces. *
+* Description : Prépare un composant pour représenter une définition. *
* *
-* Retour : - *
+* Retour : Composant de représentation de définition de panneau. *
* *
* Remarques : - *
* *
******************************************************************************/
-static void g_welcome_panel_load_tips(GWelcomePanel *panel)
+static GtkWidget *gtk_welcome_panel_create_launcher_widget(GPanelItem *item, gpointer unused)
{
- size_t i; /* Boucle de parcours */
-
- char *tips[] = {
-
- _("There is no need to install Chrysalide on your system if you only want to give it a try.\n\n"
- "Just compile the source code and run the program from there."),
-
- _("Chrysalide can be used in external Python scripts by setting PYTHONPATH to the directory "
- "containing the 'pychrysalide.so' file. For instance:\n\n"
- " cd plugins/pychrysa/.libs/\n"
- " export PYTHONPATH=$PWD\n\n"
- "Then run the interpreter suitable to your configuration (debug or release):\n\n"
- " python3-dbg -c 'import pychrysalide ; print(pychrysalide.mod_version())'"),
-
- _("All the configuration files for Chrysalide are located in $HOME/.config/chrysalide/."),
-
- _("The behavior of the main menu bar is copied from the one of a well known browser "
- "with a fox mascot.\n\n"
- "To make the menu bar appear and disappear, just press and release the Alt key.")
-
- };
-
- panel->count = ARRAY_SIZE(tips);
-
- panel->tips = (char **)calloc(panel->count, sizeof(char *));
-
- for (i = 0; i < panel->count; i++)
- panel->tips[i] = tips[i];
-
- shuffle(panel->tips, panel->count, sizeof(char *));
+ GtkWidget *result; /* Composant GTK à retourner */
- panel->current = 0;
+ result = g_panel_item_get_launcher(item);
- g_welcome_panel_refresh_tip(panel);
+ return result;
}
/******************************************************************************
* *
-* Paramètres : widget = composant graphique à redessiner. *
-* cr = contexte graphique à utiliser. *
-* panel = panneau associé comportant des informations utiles. *
+* Paramètres : box = liste GTK concernée par l'appel. *
+* panel = panneau d'accueil lié à la liste. *
* *
-* Description : Assure le dessin du fond de la bulle d'astuce. *
+* Description : Réagit à un changement de sélection de la liste de panneaux. *
* *
-* Retour : FALSE pour poursuivre la propagation de l'événement. *
+* Retour : - *
* *
* Remarques : - *
* *
******************************************************************************/
-static gboolean on_tip_background_draw(GtkWidget *widget, cairo_t *cr, GWelcomePanel *panel)
+static void gtk_welcome_panel_on_selected_rows_changed(GtkListBox *box, GtkWelcomePanel *panel)
{
- int wgt_width; /* Largeur disponible totale */
- int wgt_height; /* Hauteur disponible totale */
- int img_width; /* Largeur de l'image de fond */
- int img_height; /* Hauteur de l'image de fond */
- double scale; /* Echelle à appliquer */
-
- if (cairo_surface_status(panel->background) == CAIRO_STATUS_SUCCESS)
- {
- wgt_width = gtk_widget_get_allocated_width(widget);
- wgt_height = gtk_widget_get_allocated_height(widget);
+ GtkListBoxRow *row; /* Ligne sélectionnée */
+ int selected; /* Indice de sélection */
+ GPanelItem *item; /* Elément correspondant */
+ GtkWidget *new; /* Nouvelles propriétés */
- img_width = cairo_image_surface_get_width(panel->background);
- img_height = cairo_image_surface_get_height(panel->background);
+ row = gtk_list_box_get_selected_row(box);
- scale = wgt_height / (2.0 * img_height);
-
- cairo_scale(cr, scale, scale);
+ /**
+ * Perte de sélection : bascule sur les informations d'accueil.
+ */
+ if (row == NULL)
+ {
+ assert(panel->other_child != NULL);
- cairo_set_source_surface(cr, panel->background,
- (wgt_width / scale) - img_width,
- ((wgt_height / scale) - img_height) / 2);
+ gtk_stack_set_visible_child(panel->properties, panel->def_child);
- cairo_paint(cr);
+ gtk_stack_remove(panel->properties, panel->other_child);
+ g_clear_object(&panel->other_child);
}
- return FALSE;
+ /**
+ * Bascule vers une nouvelle fenêtre.
+ */
+ else
+ {
+ selected = gtk_list_box_row_get_index(row);
+ item = g_list_model_get_item(G_LIST_MODEL(panel->store), selected);
-}
+ new = g_panel_item_get_properties(item);
+ if (new == panel->other_child)
+ unref_object(new);
-/******************************************************************************
-* *
-* Paramètres : button = bouton impliqué dans la procédure. *
-* panel = panneau associé comportant des informations utiles. *
-* *
-* Description : Réagit à la demande d'étude d'un nouveau binaire. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void on_new_binary_clicked(GtkButton *button, GWelcomePanel *panel)
-{
- GObject *ref; /* Espace de référencements */
- GtkMenuItem *item; /* Elément de menu simulé */
+ else
+ {
+ gtk_stack_add_child(panel->properties, new);
+ gtk_stack_set_visible_child(panel->properties, new);
- ref = G_OBJECT(get_editor_window());
+ if (panel->other_child != NULL)
+ {
+ gtk_stack_remove(panel->properties, panel->other_child);
+ g_clear_object(&panel->other_child);
+ }
- item = GTK_MENU_ITEM(g_object_get_data(ref, "mnu_project_add_binary"));
+ panel->other_child = new;
- g_object_unref(ref);
+ }
- gtk_menu_item_activate(item);
+ }
}
/******************************************************************************
* *
-* Paramètres : manager = gestion de fichiers récemment utilisés. *
-* panel = panneau associé comportant des informations utiles.*
+* Paramètres : button = bouton GTK concerné par l'appel. *
+* panel = panneau d'accueil lié à la liste. *
* *
-* Description : Actualise au besoin la liste des projets récents. *
+* Description : Réagit à une demande d'affichage de l'astuce précédente. *
* *
* Retour : - *
* *
@@ -586,19 +439,24 @@ static void on_new_binary_clicked(GtkButton *button, GWelcomePanel *panel)
* *
******************************************************************************/
-static void on_recent_list_changed(GtkRecentManager *manager, GWelcomePanel *panel)
+static void gtk_welcome_panel_on_prev_hint_clicked(GtkButton *button, GtkWelcomePanel *panel)
{
- g_welcome_panel_reload_project_list(panel, manager);
+ if (panel->cur_hint > 0)
+ panel->cur_hint--;
+ else
+ panel->cur_hint = panel->raw_count - 1;
+
+ gtk_label_set_markup(panel->hints, panel->raw_hints[panel->cur_hint]);
}
/******************************************************************************
* *
-* Paramètres : panel = panneau comportant des informations utiles. *
-* manager = gestion de fichiers récemment utilisés. *
+* Paramètres : button = bouton GTK concerné par l'appel. *
+* panel = panneau d'accueil lié à la liste. *
* *
-* Description : Recharge une liste à jour des projets récents. *
+* Description : Réagit à une demande d'affichage de l'astuce suivante. *
* *
* Retour : - *
* *
@@ -606,82 +464,45 @@ static void on_recent_list_changed(GtkRecentManager *manager, GWelcomePanel *pan
* *
******************************************************************************/
-static void g_welcome_panel_reload_project_list(GWelcomePanel *panel, GtkRecentManager *manager)
+static void gtk_welcome_panel_on_next_hint_clicked(GtkButton *button, GtkWelcomePanel *panel)
{
- GtkBuilder *builder; /* Constructeur utilisé */
- GtkListStore *store; /* Modèle de gestion */
- bool empty; /* Liste vide ? */
- GList *recents; /* Liste des fichiers récents */
- GList *recent; /* Elément à traiter */
- GtkRecentInfo *info; /* Informations sur l'élément */
- GtkTreeIter iter; /* Point d'insertion */
-
- /* Réinitialisation */
-
- builder = gtk_built_named_widget_get_builder(GTK_BUILT_NAMED_WIDGET(G_PANEL_ITEM(panel)->widget));
-
- store = GTK_LIST_STORE(gtk_builder_get_object(builder, "store"));
+ if ((panel->cur_hint + 1) < panel->raw_count)
+ panel->cur_hint++;
+ else
+ panel->cur_hint = 0;
- gtk_list_store_clear(store);
+ gtk_label_set_markup(panel->hints, panel->raw_hints[panel->cur_hint]);
- empty = true;
+}
- /* Chargement */
- recents = gtk_recent_manager_get_items(manager);
- if (recents != NULL)
- {
- for (recent = g_list_first(recents); recent != NULL; recent = g_list_next(recent))
- {
- info = recent->data;
+/* ---------------------------------------------------------------------------------- */
+/* IMPLEMENTATION DES FONCTIONS DE CLASSE */
+/* ---------------------------------------------------------------------------------- */
- if (strcmp(gtk_recent_info_get_mime_type(info), "application/chrysalide.project") == 0)
- {
- gtk_list_store_append(store, &iter);
- gtk_list_store_set(store, &iter,
- RPC_VALID, true,
- RPC_FULLPATH, gtk_recent_info_get_uri_display(info),
- -1);
- empty = false;
- }
- gtk_recent_info_unref(info);
- }
- g_list_free(recents);
- }
- /* Indication par défaut */
- if (empty)
- {
- gtk_list_store_append(store, &iter);
-
- gtk_list_store_set(store, &iter,
- RPC_VALID, false,
- RPC_FULLPATH, _("<i>(No recent project)</i>"),
- -1);
-
- }
+/* ---------------------------------------------------------------------------------- */
+/* MANIPULATIONS D'UN PANNEAU GRAPHIQUE */
+/* ---------------------------------------------------------------------------------- */
- g_object_unref(G_OBJECT(builder));
-}
+/* Indique le type défini pour une manipulation de panneau de bienvenue. */
+G_DEFINE_TYPE(GWelcomePanel, g_welcome_panel, G_TYPE_PANEL_ITEM);
/******************************************************************************
* *
-* Paramètres : treeview = liste graphique concernée par la procédure. *
-* path = chemin d'accès à la ligne sélectionnée. *
-* column = colonne concernée par la sélection. *
-* panel = panneau associé avec des informations utiles. *
+* Paramètres : class = classe à initialiser. *
* *
-* Description : Réagit à une sélection décidée d'un projet particulier. *
+* Description : Initialise la classe des panneaux graphiques pour binaires. *
* *
* Retour : - *
* *
@@ -689,47 +510,29 @@ static void g_welcome_panel_reload_project_list(GWelcomePanel *panel, GtkRecentM
* *
******************************************************************************/
-static void on_row_activated_for_projects(GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *column, GWelcomePanel *panel)
+static void g_welcome_panel_class_init(GWelcomePanelClass *class)
{
- GtkTreeModel *model; /* Modèle de gestion */
- GtkTreeIter iter; /* Point de la consultation */
- gboolean valid; /* Validité de l'entrée */
- gchar *filename; /* Chemin d'accès au projet */
- GStudyProject *project; /* Nouveau projet à ouvrir */
-
- model = gtk_tree_view_get_model(treeview);
-
- if (gtk_tree_model_get_iter(model, &iter, path))
- {
- gtk_tree_model_get(model, &iter, RPC_VALID, &valid, RPC_FULLPATH, &filename, -1);
-
- if (valid)
- {
- project = g_study_project_open(filename, true);
-
- if (project != NULL)
- {
- set_current_project(project);
+ GObjectClass *object; /* Autre version de la classe */
+ GPanelItemClass *panel; /* Encore une autre vision... */
- push_project_into_recent_list(project);
+ object = G_OBJECT_CLASS(class);
- }
+ object->dispose = (GObjectFinalizeFunc/* ! */)g_welcome_panel_dispose;
+ object->finalize = (GObjectFinalizeFunc)g_welcome_panel_finalize;
- g_free(filename);
+ panel = G_PANEL_ITEM_CLASS(class);
- }
-
- }
+ panel->get_personality = (get_panel_item_personality_cb)g_welcome_panel_get_personality;
+ panel->get_panel = (get_panel_item_panel_cb)g_welcome_panel_get_panel;
}
/******************************************************************************
* *
-* Paramètres : button = bouton de défilement des astuces activé; *
-* panel = panneau associé comportant des informations utiles. *
+* Paramètres : panel = instance à initialiser. *
* *
-* Description : Enregistre les conditions d'affichage du panneau d'accueil. *
+* Description : Initialise une instance de panneau graphique pour binaire. *
* *
* Retour : - *
* *
@@ -737,19 +540,17 @@ static void on_row_activated_for_projects(GtkTreeView *treeview, GtkTreePath *pa
* *
******************************************************************************/
-static void on_startup_toggled(GtkToggleButton *button, GWelcomePanel *panel)
+static void g_welcome_panel_init(GWelcomePanel *panel)
{
- g_generic_config_set_value(get_main_configuration(),
- MPK_WELCOME_STARTUP, gtk_toggle_button_get_active(button));
}
/******************************************************************************
* *
-* Paramètres : panel = panneau d'accueil à mettre à jour. *
+* Paramètres : panel = instance d'objet GLib à traiter. *
* *
-* Description : Consulte les versions existantes et affiche une conclusion. *
+* Description : Supprime toutes les références externes. *
* *
* Retour : - *
* *
@@ -757,114 +558,18 @@ static void on_startup_toggled(GtkToggleButton *button, GWelcomePanel *panel)
* *
******************************************************************************/
-static void g_welcome_panel_check_version(GWelcomePanel *panel)
+static void g_welcome_panel_dispose(GWelcomePanel *panel)
{
- bool skip; /* Saut de la vérification */
- bool unknown; /* Impossibilité de comparaison*/
- int current; /* Version courante */
- int sock; /* Canal de communication */
- bool status; /* Bilan d'une communication */
- char buffer[1024]; /* Tampon de réception */
- size_t got; /* Quantité de données reçues */
- char *version; /* Version récupérée */
- int available; /* Version disponible */
- GtkBuilder *builder; /* Constructeur utilisé */
- GtkLabel *label; /* Etiquette à éditer */
- char *msg; /* Message à faire paraître */
-
- g_generic_config_get_value(get_main_configuration(), MPK_WELCOME_CHECK, &skip);
- skip = !skip;
-
- unknown = true;
-
- current = atoi(VERSION);
-
- if (skip) goto check_process;
-
- /* Recherche en ligne */
-
- sock = connect_via_tcp("www.chrysalide.re", "80", NULL);
- if (sock == -1) goto check_process;
-
-#define REQUEST "GET /version.last HTTP/1.1\r\nHost: www.chrysalide.re\r\n\r\n"
-
- status = safe_send(sock, REQUEST, strlen(REQUEST), 0);
- if (!status) goto check_done;
-
- status = recv_all(sock, buffer, sizeof(buffer), &got);
- if (!status) goto check_done;
-
- version = strstr(buffer, "\r\n\r\n");
-
- if (version != NULL)
- {
- available = atoi(version + 4);
-
- unknown = false;
-
- }
-
- check_done:
-
- close(sock);
-
- check_process:
-
- /* Affichage */
-
- builder = gtk_built_named_widget_get_builder(GTK_BUILT_NAMED_WIDGET(G_PANEL_ITEM(panel)->widget));
-
- label = GTK_LABEL(gtk_builder_get_object(builder, "version"));
-
- if (skip)
- asprintf(&msg,
- "Your version is: <b>%d</b>\n\n" \
- "Automatic version check is disabled.",
- current);
-
- else
- {
- if (unknown)
- asprintf(&msg,
- "Your version is: <b>%d</b>\n\n" \
- "Lastest available version is unknown.",
- current);
-
- else
- {
- if (current >= available)
- asprintf(&msg,
- "Your version is: <b>%d</b>\n\n" \
- "Lastest version is: <b>%d</b>\n\n" \
- "Your software is <span color='green'><b>up-to-date</b></span>.",
- current, available);
-
- else
- asprintf(&msg,
- "Your version is: <b>%d</b>\n\n" \
- "Lastest version is: <b>%d</b>\n\n" \
- "Your software is <span color='red'><b>outdated</b></span>.",
- current, available);
-
- }
-
- }
-
- gtk_label_set_markup(label, msg);
-
- free(msg);
-
- g_object_unref(G_OBJECT(builder));
+ G_OBJECT_CLASS(g_welcome_panel_parent_class)->dispose(G_OBJECT(panel));
}
/******************************************************************************
* *
-* Paramètres : button = bouton de défilement des astuces activé; *
-* panel = panneau associé comportant des informations utiles. *
+* Paramètres : panel = instance d'objet GLib à traiter. *
* *
-* Description : Affiche l'astuce précédente dans la liste globale. *
+* Description : Procède à la libération totale de la mémoire. *
* *
* Retour : - *
* *
@@ -872,107 +577,89 @@ static void g_welcome_panel_check_version(GWelcomePanel *panel)
* *
******************************************************************************/
-static void on_tip_previous_clicked(GtkButton *button, GWelcomePanel *panel)
+static void g_welcome_panel_finalize(GWelcomePanel *panel)
{
- if (panel->current > 0)
- panel->current--;
- else
- panel->current = panel->count - 1;
-
- g_welcome_panel_refresh_tip(panel);
+ G_OBJECT_CLASS(g_welcome_panel_parent_class)->finalize(G_OBJECT(panel));
}
/******************************************************************************
* *
-* Paramètres : button = bouton de défilement des astuces activé; *
-* panel = panneau associé comportant des informations utiles. *
+* Paramètres : - *
* *
-* Description : Affiche l'astuce suivante dans la liste globale. *
+* Description : Constitue une définition de manipulation de panneau. *
* *
-* Retour : - *
+* Retour : Définition de propriétés mise en place. *
* *
* Remarques : - *
* *
******************************************************************************/
-static void on_tip_next_clicked(GtkButton *button, GWelcomePanel *panel)
+GPanelItem *g_welcome_panel_new(void)
{
- if ((panel->current + 1) < panel->count)
- panel->current++;
- else
- panel->current = 0;
+ GPanelItem *result; /* Structure à retourner */
- g_welcome_panel_refresh_tip(panel);
+ result = g_object_new(G_TYPE_WELCOME_PANEL, NULL);
+
+ return result;
}
+
+/* ---------------------------------------------------------------------------------- */
+/* IMPLEMENTATION DES FONCTIONS DE CLASSE */
+/* ---------------------------------------------------------------------------------- */
+
+
/******************************************************************************
* *
-* Paramètres : panel = panneau associé comportant des informations utiles. *
+* Paramètres : panel = définition de panneau à consulter. *
* *
-* Description : Actualise l'affichage des astuces. *
+* Description : Fournit une indication sur la personnalité du panneau. *
* *
-* Retour : - *
+* Retour : Identifiant lié à la nature du panneau. *
* *
* Remarques : - *
* *
******************************************************************************/
-static void g_welcome_panel_refresh_tip(GWelcomePanel *panel)
+static PanelItemPersonality g_welcome_panel_get_personality(const GWelcomePanel *panel)
{
- GtkBuilder *builder; /* Constructeur utilisé */
- GtkLabel *label; /* Etiquette de présentation */
-
- assert(panel->current < panel->count);
-
- builder = gtk_built_named_widget_get_builder(GTK_BUILT_NAMED_WIDGET(G_PANEL_ITEM(panel)->widget));
-
- label = GTK_LABEL(gtk_builder_get_object(builder, "tip"));
+ PanelItemPersonality result; /* Personnalité à retourner */
- gtk_label_set_markup(label, panel->tips[panel->current]);
+ result = PIP_MAIN_PANEL | PIP_SINGLETON;
- g_object_unref(G_OBJECT(builder));
+ return result;
}
/******************************************************************************
* *
-* Paramètres : panel = panneau associé comportant des informations utiles. *
+* Paramètres : panel = définition de panneau à manipuler. *
+* props = éventuels éléments graphiques de paramétrages. *
* *
-* Description : Indique l'origine de l'affichage du panneau d'accueil. *
+* Description : Fournit un composant représentant un panneau graphique. *
* *
-* Retour : true si l'affichage est le fait de l'utilisateur. *
+* Retour : Composant GTK (déjà ?) mis en place. *
* *
* Remarques : - *
* *
******************************************************************************/
-bool g_welcome_panel_get_user_origin(const GWelcomePanel *panel)
+static GtkTiledPanel *g_welcome_panel_get_panel(GWelcomePanel *panel, GtkWidget *props)
{
- return panel->uorigin;
+ GtkTiledPanel *result; /* Composant à retourner */
-}
+ /**
+ * Il n'existe pas de composants de paramètrage pour ce panneau.
+ */
+ assert(props == NULL);
+ result = gtk_welcome_panel_new();
-/******************************************************************************
-* *
-* Paramètres : panel = panneau associé comportant des informations utiles.*
-* uorigin = true si l'affichage est le fait de l'utilisateur. *
-* *
-* Description : Détermine l'origine de l'affichage du panneau d'accueil. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-void g_welcome_panel_set_user_origin(GWelcomePanel *panel, bool uorigin)
-{
- panel->uorigin = uorigin;
+ return result;
}
diff --git a/src/gui/panels/welcome.h b/src/gui/panels/welcome.h
index 5cdd6a1..d267f80 100644
--- a/src/gui/panels/welcome.h
+++ b/src/gui/panels/welcome.h
@@ -2,7 +2,7 @@
/* Chrysalide - Outil d'analyse de fichiers binaires
* welcome.h - prototypes pour le panneau d'accueil par défaut
*
- * Copyright (C) 2012-2019 Cyrille Bagard
+ * Copyright (C) 2012-2024 Cyrille Bagard
*
* This file is part of Chrysalide.
*
@@ -26,42 +26,38 @@
#define _GUI_PANELS_WELCOME_H
-#include <i18n.h>
+#include <gtk/gtk.h>
#include "../panel.h"
+#include "../../glibext/helpers.h"
+#include "../../gtkext/panel.h"
-#define PANEL_WELCOME_ID "welcome"
+/* ------------------------- COEUR D'UN PANNEAU D'AFFICHAGE ------------------------- */
-#define G_TYPE_WELCOME_PANEL g_welcome_panel_get_type()
-#define G_WELCOME_PANEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), g_welcome_panel_get_type(), GWelcomePanel))
-#define G_IS_WELCOME_PANEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), g_welcome_panel_get_type()))
-#define G_WELCOME_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_WELCOME_PANEL, GWelcomePanelClass))
-#define G_IS_WELCOME_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_WELCOME_PANEL))
-#define G_WELCOME_PANEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_WELCOME_PANEL, GWelcomePanelClass))
+#define GTK_TYPE_WELCOME_PANEL (gtk_welcome_panel_get_type())
+DECLARE_GTYPE(GtkWelcomePanel, gtk_welcome_panel, GTK, WELCOME_PANEL);
-/* Panneau d'accueil par défaut (instance) */
-typedef struct _GWelcomePanel GWelcomePanel;
-/* Panneau d'accueil par défaut (classe) */
-typedef struct _GWelcomePanelClass GWelcomePanelClass;
+/* Crée une nouvelle instance de panneau d'accueil. */
+GtkTiledPanel *gtk_welcome_panel_new(void);
-/* Indique le type défini pour un panneau d'accueil. */
-GType g_welcome_panel_get_type(void);
-/* Crée un panneau d'accueil par défaut. */
-GPanelItem *g_welcome_panel_new(void);
+/* ---------------------- MANIPULATIONS D'UN PANNEAU GRAPHIQUE ---------------------- */
+
+
+#define G_TYPE_WELCOME_PANEL (g_welcome_panel_get_type())
-/* Indique l'origine de l'affichage du panneau d'accueil. */
-bool g_welcome_panel_get_user_origin(const GWelcomePanel *);
+DECLARE_GTYPE(GWelcomePanel, g_welcome_panel, G, WELCOME_PANEL);
-/* Détermine l'origine de l'affichage du panneau d'accueil. */
-void g_welcome_panel_set_user_origin(GWelcomePanel *, bool);
+
+/* Constitue une définition de manipulation de panneau. */
+GPanelItem *g_welcome_panel_new(void);
diff --git a/src/gui/panels/welcome.ui b/src/gui/panels/welcome.ui
index d016907..422e2ad 100644
--- a/src/gui/panels/welcome.ui
+++ b/src/gui/panels/welcome.ui
@@ -1,245 +1,217 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
<interface>
- <requires lib="gtk+" version="3.12"/>
- <object class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-new</property>
- <property name="icon_size">6</property>
- </object>
- <object class="GtkListStore" id="store">
- <columns>
- <!-- column-name valid -->
- <column type="gboolean"/>
- <!-- column-name fullpath -->
- <column type="gchararray"/>
- </columns>
- </object>
- <object class="GtkOffscreenWindow" id="offscreenwindow1">
- <property name="can_focus">False</property>
- <child>
- <object class="GtkBox" id="box">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkBox" id="box2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_left">8</property>
- <property name="margin_right">8</property>
- <property name="margin_top">8</property>
- <property name="margin_bottom">8</property>
- <property name="orientation">vertical</property>
- <property name="spacing">8</property>
- <child>
- <object class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">center</property>
- <property name="top_padding">180</property>
- <property name="bottom_padding">30</property>
- <child>
- <object class="GtkButton" id="button1">
- <property name="label" translatable="yes">New binary...</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="image">image1</property>
- <property name="image_position">top</property>
- <property name="always_show_image">True</property>
- <signal name="clicked" handler="on_new_binary_clicked" swapped="no"/>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Last projects:</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkTreeView" id="treeview">
- <property name="height_request">250</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="margin_left">8</property>
- <property name="hexpand">True</property>
- <property name="model">store</property>
- <property name="headers_visible">False</property>
- <property name="rules_hint">True</property>
- <signal name="row-activated" handler="on_row_activated_for_projects" swapped="no"/>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="treeview-selection1"/>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="startup">
- <property name="label" translatable="yes">Show this panel at startup.</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="halign">start</property>
- <property name="valign">end</property>
- <property name="vexpand">True</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="on_startup_toggled" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">3</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
+
+ <template class="GtkWelcomePanel" parent="GtkTiledPanel">
<child>
- <object class="GtkBox" id="box3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_left">8</property>
- <property name="margin_right">8</property>
- <property name="margin_top">8</property>
- <property name="margin_bottom">8</property>
- <property name="orientation">vertical</property>
- <property name="spacing">8</property>
- <child>
- <object class="GtkBox" id="box4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLabel" id="version">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="opacity">0.81999999977648264</property>
- <property name="use_markup">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="opacity">0.81999999999999995</property>
- <property name="label" translatable="yes">Get access to the online documentation and stay tuned by visiting the official website : &lt;a href="http://chrysalide.re"&gt;chrysalide.re&lt;/a&gt;
-
-You can also follow Chrysalide on Twitter : &lt;a href="http://twitter.com/chrysalide_ref"&gt;@chrysalide_ref&lt;/a&gt;</property>
- <property name="use_markup">True</property>
- <property name="wrap">True</property>
- <property name="track_visited_links">False</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="tip">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="yalign">1</property>
- <property name="xpad">8</property>
- <property name="ypad">8</property>
- <property name="label" translatable="yes">label</property>
- <property name="wrap">True</property>
- <property name="selectable">True</property>
- <signal name="draw" handler="on_tip_background_draw" swapped="no"/>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButtonBox" id="buttonbox1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">8</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="button3">
- <property name="label" translatable="yes">Previous</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <signal name="clicked" handler="on_tip_previous_clicked" swapped="no"/>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
+ <object class="GtkScrolledWindow">
+ <property name="hscrollbar-policy">automatic</property>
+ <property name="vscrollbar-policy">automatic</property>
+ <property name="hexpand">TRUE</property>
+ <property name="vexpand">TRUE</property>
+ <property name="has-frame">0</property>
<child>
- <object class="GtkButton" id="button2">
- <property name="label" translatable="yes">Next</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <signal name="clicked" handler="on_tip_next_clicked" swapped="no"/>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
+ <object class="GtkGizmo">
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="margin-bottom">32</property>
+ <property name="margin-end">32</property>
+ <property name="margin-start">32</property>
+ <property name="margin-top">32</property>
+
+ <!-- Layout -->
+ <property name="layout-manager">
+ <object class="GtkConstraintLayout">
+ <constraints>
+
+ <!-- Central point -->
+
+ <guide name="guide-center"
+ min-width="1" nat-width="1" max-width="1"
+ min-height="1" nat-height="1" max-height="1"/>
+
+ <constraint target="guide-center" target-attribute="left"
+ source="super" source-attribute="width"
+ relation="eq"
+ multiplier="0.5"
+ strength="required"/>
+
+ <constraint target="guide-center" target-attribute="top"
+ source="super" source-attribute="height"
+ relation="eq"
+ multiplier="0.5"
+ strength="required"/>
+
+ <!-- Widgets -->
+
+ <constraint target="list" target-attribute="right"
+ source="guide-center" source-attribute="left"
+ relation="eq"
+ constant="-32"
+ strength="required"/>
+
+ <constraint target="list" target-attribute="center-y"
+ source="guide-center" source-attribute="top"
+ relation="eq"
+ strength="required"/>
+
+ <constraint target="properties" target-attribute="left"
+ source="guide-center" source-attribute="left"
+ relation="eq"
+ constant="32"
+ strength="required"/>
+
+ <constraint target="properties" target-attribute="width"
+ source="list" source-attribute="width"
+ relation="eq"
+ strength="required"/>
+
+ <constraint target="properties" target-attribute="center-y"
+ source="guide-center" source-attribute="top"
+ relation="eq"
+ strength="required"/>
+
+ <!-- Surface for viewport -->
+
+ <constraint target="super" target-attribute="left"
+ source="list" source-attribute="left"
+ relation="le"
+ strength="required"/>
+
+ <constraint target="super" target-attribute="left"
+ source="properties" source-attribute="left"
+ relation="le"
+ strength="required"/>
+
+ <constraint target="super" target-attribute="right"
+ source="list" source-attribute="right"
+ relation="ge"
+ strength="required"/>
+
+ <constraint target="super" target-attribute="right"
+ source="properties" source-attribute="right"
+ relation="ge"
+ strength="required"/>
+
+ <constraint target="super" target-attribute="top"
+ source="list" source-attribute="top"
+ relation="le"
+ strength="required"/>
+
+ <constraint target="super" target-attribute="top"
+ source="properties" source-attribute="top"
+ relation="le"
+ strength="required"/>
+
+ <constraint target="super" target-attribute="bottom"
+ source="list" source-attribute="bottom"
+ relation="ge"
+ strength="required"/>
+
+ <constraint target="super" target-attribute="bottom"
+ source="properties" source-attribute="bottom"
+ relation="ge"
+ strength="required"/>
+
+ </constraints>
+ </object>
+ </property>
+
+ <!-- Launcher list -->
+ <child>
+ <object class="GtkListBox" id="list">
+ <property name="halign">end</property>
+ <property name="valign">center</property>
+ <property name="selection-mode">GTK_SELECTION_SINGLE</property>
+ <property name="activate-on-single-click">0</property>
+ <style>
+ <class name="boxed-list"/>
+ <class name="frame"/>
+ </style>
+ <signal name="selected-rows-changed" handler="gtk_welcome_panel_on_selected_rows_changed"/>
+ </object>
+ </child>
+
+ <!-- Hints / options -->
+ <child>
+ <object class="GtkStack" id="properties">
+ <property name="halign">start</property>
+ <property name="valign">fill</property>
+ <child>
+
+ <object class="GtkStackPage">
+ <property name="name">default</property>
+ <property name="title">Welcome</property>
+ <property name="child">
+ <object class="GtkGrid" id="def_child">
+ <property name="halign">start</property>
+ <property name="valign">fill</property>
+ <property name="column-spacing">16</property>
+ <property name="column-homogeneous">FALSE</property>
+
+ <!-- Text -->
+ <child>
+ <object class="GtkLabel" id="hints">
+ <property name="halign">start</property>
+ <property name="valign">fill</property>
+ <property name="xalign">0</property>
+ <property name="yalign">1</property>
+ <property name="vexpand">1</property>
+ <property name="width-request">50</property>
+ <property name="wrap">TRUE</property>
+ <layout>
+ <property name="column">0</property>
+ <property name="row">0</property>
+ </layout>
+ </object>
+ </child>
+
+ <!-- Prev/Next buttons -->
+ <child>
+ <object class="GtkBox">
+ <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
+ <property name="halign">fill</property>
+ <property name="valign">center</property>
+ <property name="homogeneous">TRUE</property>
+ <layout>
+ <property name="column">1</property>
+ <property name="row">1</property>
+ </layout>
+ <child>
+ <object class="GtkButton">
+ <property name="icon-name">go-previous-symbolic</property>
+ <property name="halign">end</property>
+ <signal name="clicked" handler="gtk_welcome_panel_on_prev_hint_clicked"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkButton">
+ <property name="icon-name">go-next-symbolic</property>
+ <property name="halign">start</property>
+ <signal name="clicked" handler="gtk_welcome_panel_on_next_hint_clicked"/>
+ </object>
+ </child>
+ <style>
+ <class name="linked"/>
+ </style>
+ </object>
+ </child>
+
+ <style>
+ <class name="hints"/>
+ </style>
+
+ </object>
+
+ </property>
+ </object>
+ </child>
+
+ </object>
+ </child>
+ </object>
</child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
+ </object>
</child>
- </object>
- </child>
- </object>
+ </template>
+
</interface>
diff --git a/src/gui/style.css b/src/gui/style.css
new file mode 100644
index 0000000..b0853ab
--- /dev/null
+++ b/src/gui/style.css
@@ -0,0 +1,46 @@
+
+.boxed-widget {
+
+ border-top-left-radius: 12px;
+ border-top-right-radius: 12px;
+
+ border-bottom-left-radius: 12px;
+ border-bottom-right-radius: 12px;
+
+}
+
+
+list.boxed-list, list.boxed-list > row:first-child {
+
+ border-top-left-radius: 12px;
+ border-top-right-radius: 12px;
+
+}
+
+list.boxed-list, list.boxed-list > row:last-child {
+
+ border-bottom-left-radius: 12px;
+ border-bottom-right-radius: 12px;
+
+}
+
+
+
+/* welcome.css */
+
+grid.hints {
+
+ background-image: -gtk-icontheme('tipoftheday-symbolic');
+ background-position: right top;
+ background-size: 200px auto;
+ background-repeat: no-repeat;
+
+ min-height: 250px;
+
+}
+
+grid.hints > box {
+
+ min-width: 130px;
+
+}